curl --request PATCH \
--url https://api.rafftechnologies.com/api/v1/apps/services/{service_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"tier_id": 123,
"start_command": "<string>",
"http_port": 123,
"health_check_path": "<string>",
"cron_schedule": "<string>",
"cron_timezone": "<string>",
"repo_branch": "<string>",
"repo_root_dir": "<string>",
"dockerfile_path": "<string>",
"previews_enabled": true,
"redeploy": true
}
'import requests
url = "https://api.rafftechnologies.com/api/v1/apps/services/{service_id}"
payload = {
"name": "<string>",
"description": "<string>",
"tier_id": 123,
"start_command": "<string>",
"http_port": 123,
"health_check_path": "<string>",
"cron_schedule": "<string>",
"cron_timezone": "<string>",
"repo_branch": "<string>",
"repo_root_dir": "<string>",
"dockerfile_path": "<string>",
"previews_enabled": True,
"redeploy": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
tier_id: 123,
start_command: '<string>',
http_port: 123,
health_check_path: '<string>',
cron_schedule: '<string>',
cron_timezone: '<string>',
repo_branch: '<string>',
repo_root_dir: '<string>',
dockerfile_path: '<string>',
previews_enabled: true,
redeploy: true
})
};
fetch('https://api.rafftechnologies.com/api/v1/apps/services/{service_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rafftechnologies.com/api/v1/apps/services/{service_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'tier_id' => 123,
'start_command' => '<string>',
'http_port' => 123,
'health_check_path' => '<string>',
'cron_schedule' => '<string>',
'cron_timezone' => '<string>',
'repo_branch' => '<string>',
'repo_root_dir' => '<string>',
'dockerfile_path' => '<string>',
'previews_enabled' => true,
'redeploy' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rafftechnologies.com/api/v1/apps/services/{service_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tier_id\": 123,\n \"start_command\": \"<string>\",\n \"http_port\": 123,\n \"health_check_path\": \"<string>\",\n \"cron_schedule\": \"<string>\",\n \"cron_timezone\": \"<string>\",\n \"repo_branch\": \"<string>\",\n \"repo_root_dir\": \"<string>\",\n \"dockerfile_path\": \"<string>\",\n \"previews_enabled\": true,\n \"redeploy\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.rafftechnologies.com/api/v1/apps/services/{service_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tier_id\": 123,\n \"start_command\": \"<string>\",\n \"http_port\": 123,\n \"health_check_path\": \"<string>\",\n \"cron_schedule\": \"<string>\",\n \"cron_timezone\": \"<string>\",\n \"repo_branch\": \"<string>\",\n \"repo_root_dir\": \"<string>\",\n \"dockerfile_path\": \"<string>\",\n \"previews_enabled\": true,\n \"redeploy\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafftechnologies.com/api/v1/apps/services/{service_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tier_id\": 123,\n \"start_command\": \"<string>\",\n \"http_port\": 123,\n \"health_check_path\": \"<string>\",\n \"cron_schedule\": \"<string>\",\n \"cron_timezone\": \"<string>\",\n \"repo_branch\": \"<string>\",\n \"repo_root_dir\": \"<string>\",\n \"dockerfile_path\": \"<string>\",\n \"previews_enabled\": true,\n \"redeploy\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"service": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_id": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"service_type": "web",
"source_type": "git",
"builder": "buildpacks",
"repo_full_name": "<string>",
"repo_branch": "<string>",
"repo_root_dir": "<string>",
"dockerfile_path": "<string>",
"image_ref": "<string>",
"start_command": "<string>",
"tier_id": 123,
"tier_name": "<string>",
"replicas": 123,
"autoscaling_enabled": true,
"min_replicas": 123,
"max_replicas": 123,
"autoscaling_metric": "<string>",
"autoscaling_target": 123,
"scale_to_zero": true,
"http_port": 123,
"health_check_path": "<string>",
"cron_schedule": "<string>",
"cron_timezone": "<string>",
"cron_concurrency": "forbid",
"region": "<string>",
"url": "<string>",
"internal_host": "<string>",
"primary_domain": "<string>",
"status": "pending",
"status_message": "<string>",
"paused_by_cap": true,
"billing_type": "payg",
"previews_enabled": true,
"preview_count": 123,
"max_previews": 123,
"waiting_for_database": true,
"github_status": "",
"github_login": "<string>",
"github_settings_url": "<string>",
"current_deployment_id": "<string>",
"current_deployment_number": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Update app service
Change an app’s settings. Fields you leave out stay as they are. A change to how a live app runs (size, start command, port, health check, schedule) rolls out as a new deployment of the current image, and a change to a failed app deploys it. A paused app keeps the change and applies it when resumed. Scaling has its own endpoint.
curl --request PATCH \
--url https://api.rafftechnologies.com/api/v1/apps/services/{service_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"tier_id": 123,
"start_command": "<string>",
"http_port": 123,
"health_check_path": "<string>",
"cron_schedule": "<string>",
"cron_timezone": "<string>",
"repo_branch": "<string>",
"repo_root_dir": "<string>",
"dockerfile_path": "<string>",
"previews_enabled": true,
"redeploy": true
}
'import requests
url = "https://api.rafftechnologies.com/api/v1/apps/services/{service_id}"
payload = {
"name": "<string>",
"description": "<string>",
"tier_id": 123,
"start_command": "<string>",
"http_port": 123,
"health_check_path": "<string>",
"cron_schedule": "<string>",
"cron_timezone": "<string>",
"repo_branch": "<string>",
"repo_root_dir": "<string>",
"dockerfile_path": "<string>",
"previews_enabled": True,
"redeploy": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
tier_id: 123,
start_command: '<string>',
http_port: 123,
health_check_path: '<string>',
cron_schedule: '<string>',
cron_timezone: '<string>',
repo_branch: '<string>',
repo_root_dir: '<string>',
dockerfile_path: '<string>',
previews_enabled: true,
redeploy: true
})
};
fetch('https://api.rafftechnologies.com/api/v1/apps/services/{service_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rafftechnologies.com/api/v1/apps/services/{service_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'tier_id' => 123,
'start_command' => '<string>',
'http_port' => 123,
'health_check_path' => '<string>',
'cron_schedule' => '<string>',
'cron_timezone' => '<string>',
'repo_branch' => '<string>',
'repo_root_dir' => '<string>',
'dockerfile_path' => '<string>',
'previews_enabled' => true,
'redeploy' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rafftechnologies.com/api/v1/apps/services/{service_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tier_id\": 123,\n \"start_command\": \"<string>\",\n \"http_port\": 123,\n \"health_check_path\": \"<string>\",\n \"cron_schedule\": \"<string>\",\n \"cron_timezone\": \"<string>\",\n \"repo_branch\": \"<string>\",\n \"repo_root_dir\": \"<string>\",\n \"dockerfile_path\": \"<string>\",\n \"previews_enabled\": true,\n \"redeploy\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.rafftechnologies.com/api/v1/apps/services/{service_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tier_id\": 123,\n \"start_command\": \"<string>\",\n \"http_port\": 123,\n \"health_check_path\": \"<string>\",\n \"cron_schedule\": \"<string>\",\n \"cron_timezone\": \"<string>\",\n \"repo_branch\": \"<string>\",\n \"repo_root_dir\": \"<string>\",\n \"dockerfile_path\": \"<string>\",\n \"previews_enabled\": true,\n \"redeploy\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafftechnologies.com/api/v1/apps/services/{service_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tier_id\": 123,\n \"start_command\": \"<string>\",\n \"http_port\": 123,\n \"health_check_path\": \"<string>\",\n \"cron_schedule\": \"<string>\",\n \"cron_timezone\": \"<string>\",\n \"repo_branch\": \"<string>\",\n \"repo_root_dir\": \"<string>\",\n \"dockerfile_path\": \"<string>\",\n \"previews_enabled\": true,\n \"redeploy\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"service": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_id": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"service_type": "web",
"source_type": "git",
"builder": "buildpacks",
"repo_full_name": "<string>",
"repo_branch": "<string>",
"repo_root_dir": "<string>",
"dockerfile_path": "<string>",
"image_ref": "<string>",
"start_command": "<string>",
"tier_id": 123,
"tier_name": "<string>",
"replicas": 123,
"autoscaling_enabled": true,
"min_replicas": 123,
"max_replicas": 123,
"autoscaling_metric": "<string>",
"autoscaling_target": 123,
"scale_to_zero": true,
"http_port": 123,
"health_check_path": "<string>",
"cron_schedule": "<string>",
"cron_timezone": "<string>",
"cron_concurrency": "forbid",
"region": "<string>",
"url": "<string>",
"internal_host": "<string>",
"primary_domain": "<string>",
"status": "pending",
"status_message": "<string>",
"paused_by_cap": true,
"billing_type": "payg",
"previews_enabled": true,
"preview_count": 123,
"max_previews": 123,
"waiting_for_database": true,
"github_status": "",
"github_login": "<string>",
"github_settings_url": "<string>",
"current_deployment_id": "<string>",
"current_deployment_number": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
API key for authentication. Each key is bound to a specific account.
Path Parameters
App service ID (UUID) or short id (the service_id field)
Body
Every field is optional. Leave a field out to keep it.
Display name (the address does not change)
Send "" to clear it
New size (see GET /api/v1/apps/tiers). Apps on a subscription change size through support for now.
Web and private apps only
Must start with /
Cron apps only
forbid, allow, replace GitHub apps only
Pull request previews (web apps from GitHub)
Deploy now even when the change alone would not