Scale app service
curl --request POST \
--url https://api.rafftechnologies.com/api/v1/apps/services/{service_id}/scale \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"replicas": 123,
"autoscaling_set": true,
"autoscaling_enabled": true,
"min_replicas": 123,
"max_replicas": 123,
"autoscaling_metric": "<string>",
"autoscaling_target": 123,
"scale_to_zero": true
}
'import requests
url = "https://api.rafftechnologies.com/api/v1/apps/services/{service_id}/scale"
payload = {
"replicas": 123,
"autoscaling_set": True,
"autoscaling_enabled": True,
"min_replicas": 123,
"max_replicas": 123,
"autoscaling_metric": "<string>",
"autoscaling_target": 123,
"scale_to_zero": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
replicas: 123,
autoscaling_set: true,
autoscaling_enabled: true,
min_replicas: 123,
max_replicas: 123,
autoscaling_metric: '<string>',
autoscaling_target: 123,
scale_to_zero: true
})
};
fetch('https://api.rafftechnologies.com/api/v1/apps/services/{service_id}/scale', 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}/scale",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'replicas' => 123,
'autoscaling_set' => true,
'autoscaling_enabled' => true,
'min_replicas' => 123,
'max_replicas' => 123,
'autoscaling_metric' => '<string>',
'autoscaling_target' => 123,
'scale_to_zero' => 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}/scale"
payload := strings.NewReader("{\n \"replicas\": 123,\n \"autoscaling_set\": true,\n \"autoscaling_enabled\": true,\n \"min_replicas\": 123,\n \"max_replicas\": 123,\n \"autoscaling_metric\": \"<string>\",\n \"autoscaling_target\": 123,\n \"scale_to_zero\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.rafftechnologies.com/api/v1/apps/services/{service_id}/scale")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"replicas\": 123,\n \"autoscaling_set\": true,\n \"autoscaling_enabled\": true,\n \"min_replicas\": 123,\n \"max_replicas\": 123,\n \"autoscaling_metric\": \"<string>\",\n \"autoscaling_target\": 123,\n \"scale_to_zero\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafftechnologies.com/api/v1/apps/services/{service_id}/scale")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"replicas\": 123,\n \"autoscaling_set\": true,\n \"autoscaling_enabled\": true,\n \"min_replicas\": 123,\n \"max_replicas\": 123,\n \"autoscaling_metric\": \"<string>\",\n \"autoscaling_target\": 123,\n \"scale_to_zero\": 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>",
"region": "<string>",
"url": "<string>",
"internal_host": "<string>",
"status": "pending",
"status_message": "<string>",
"paused_by_cap": true,
"billing_type": "payg",
"current_deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Services
Scale app service
Update the replica count, autoscaling bounds, or scale-to-zero. Live services apply the change with no downtime.
POST
/
api
/
v1
/
apps
/
services
/
{service_id}
/
scale
Scale app service
curl --request POST \
--url https://api.rafftechnologies.com/api/v1/apps/services/{service_id}/scale \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"replicas": 123,
"autoscaling_set": true,
"autoscaling_enabled": true,
"min_replicas": 123,
"max_replicas": 123,
"autoscaling_metric": "<string>",
"autoscaling_target": 123,
"scale_to_zero": true
}
'import requests
url = "https://api.rafftechnologies.com/api/v1/apps/services/{service_id}/scale"
payload = {
"replicas": 123,
"autoscaling_set": True,
"autoscaling_enabled": True,
"min_replicas": 123,
"max_replicas": 123,
"autoscaling_metric": "<string>",
"autoscaling_target": 123,
"scale_to_zero": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
replicas: 123,
autoscaling_set: true,
autoscaling_enabled: true,
min_replicas: 123,
max_replicas: 123,
autoscaling_metric: '<string>',
autoscaling_target: 123,
scale_to_zero: true
})
};
fetch('https://api.rafftechnologies.com/api/v1/apps/services/{service_id}/scale', 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}/scale",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'replicas' => 123,
'autoscaling_set' => true,
'autoscaling_enabled' => true,
'min_replicas' => 123,
'max_replicas' => 123,
'autoscaling_metric' => '<string>',
'autoscaling_target' => 123,
'scale_to_zero' => 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}/scale"
payload := strings.NewReader("{\n \"replicas\": 123,\n \"autoscaling_set\": true,\n \"autoscaling_enabled\": true,\n \"min_replicas\": 123,\n \"max_replicas\": 123,\n \"autoscaling_metric\": \"<string>\",\n \"autoscaling_target\": 123,\n \"scale_to_zero\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.rafftechnologies.com/api/v1/apps/services/{service_id}/scale")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"replicas\": 123,\n \"autoscaling_set\": true,\n \"autoscaling_enabled\": true,\n \"min_replicas\": 123,\n \"max_replicas\": 123,\n \"autoscaling_metric\": \"<string>\",\n \"autoscaling_target\": 123,\n \"scale_to_zero\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafftechnologies.com/api/v1/apps/services/{service_id}/scale")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"replicas\": 123,\n \"autoscaling_set\": true,\n \"autoscaling_enabled\": true,\n \"min_replicas\": 123,\n \"max_replicas\": 123,\n \"autoscaling_metric\": \"<string>\",\n \"autoscaling_target\": 123,\n \"scale_to_zero\": 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>",
"region": "<string>",
"url": "<string>",
"internal_host": "<string>",
"status": "pending",
"status_message": "<string>",
"paused_by_cap": true,
"billing_type": "payg",
"current_deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"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
application/json
Last modified on August 26, 2026
⌘I