curl --request PUT \
--url https://app.miget.com/api/v1/apps/{uuid}/scaling_profile \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"replicas": 123,
"auto_scaling_enabled": true,
"auto_min_replicas": 123,
"auto_max_replicas": 123,
"scaling_start_time": "<string>",
"scaling_end_time": "<string>",
"within_resources": true,
"cpu_threshold": 123,
"memory_threshold": 123,
"period_enabled": true,
"max_monthly_budget": 123,
"budget_notification_enabled": true,
"stop_at_budget_limit_enabled": true
}
'import requests
url = "https://app.miget.com/api/v1/apps/{uuid}/scaling_profile"
payload = {
"replicas": 123,
"auto_scaling_enabled": True,
"auto_min_replicas": 123,
"auto_max_replicas": 123,
"scaling_start_time": "<string>",
"scaling_end_time": "<string>",
"within_resources": True,
"cpu_threshold": 123,
"memory_threshold": 123,
"period_enabled": True,
"max_monthly_budget": 123,
"budget_notification_enabled": True,
"stop_at_budget_limit_enabled": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
replicas: 123,
auto_scaling_enabled: true,
auto_min_replicas: 123,
auto_max_replicas: 123,
scaling_start_time: '<string>',
scaling_end_time: '<string>',
within_resources: true,
cpu_threshold: 123,
memory_threshold: 123,
period_enabled: true,
max_monthly_budget: 123,
budget_notification_enabled: true,
stop_at_budget_limit_enabled: true
})
};
fetch('https://app.miget.com/api/v1/apps/{uuid}/scaling_profile', 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://app.miget.com/api/v1/apps/{uuid}/scaling_profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'replicas' => 123,
'auto_scaling_enabled' => true,
'auto_min_replicas' => 123,
'auto_max_replicas' => 123,
'scaling_start_time' => '<string>',
'scaling_end_time' => '<string>',
'within_resources' => true,
'cpu_threshold' => 123,
'memory_threshold' => 123,
'period_enabled' => true,
'max_monthly_budget' => 123,
'budget_notification_enabled' => true,
'stop_at_budget_limit_enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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://app.miget.com/api/v1/apps/{uuid}/scaling_profile"
payload := strings.NewReader("{\n \"replicas\": 123,\n \"auto_scaling_enabled\": true,\n \"auto_min_replicas\": 123,\n \"auto_max_replicas\": 123,\n \"scaling_start_time\": \"<string>\",\n \"scaling_end_time\": \"<string>\",\n \"within_resources\": true,\n \"cpu_threshold\": 123,\n \"memory_threshold\": 123,\n \"period_enabled\": true,\n \"max_monthly_budget\": 123,\n \"budget_notification_enabled\": true,\n \"stop_at_budget_limit_enabled\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<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.put("https://app.miget.com/api/v1/apps/{uuid}/scaling_profile")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"replicas\": 123,\n \"auto_scaling_enabled\": true,\n \"auto_min_replicas\": 123,\n \"auto_max_replicas\": 123,\n \"scaling_start_time\": \"<string>\",\n \"scaling_end_time\": \"<string>\",\n \"within_resources\": true,\n \"cpu_threshold\": 123,\n \"memory_threshold\": 123,\n \"period_enabled\": true,\n \"max_monthly_budget\": 123,\n \"budget_notification_enabled\": true,\n \"stop_at_budget_limit_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.miget.com/api/v1/apps/{uuid}/scaling_profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"replicas\": 123,\n \"auto_scaling_enabled\": true,\n \"auto_min_replicas\": 123,\n \"auto_max_replicas\": 123,\n \"scaling_start_time\": \"<string>\",\n \"scaling_end_time\": \"<string>\",\n \"within_resources\": true,\n \"cpu_threshold\": 123,\n \"memory_threshold\": 123,\n \"period_enabled\": true,\n \"max_monthly_budget\": 123,\n \"budget_notification_enabled\": true,\n \"stop_at_budget_limit_enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}Update scaling profile
Configures auto-scaling behavior for the application. Set replica counts, CPU/memory thresholds for scaling triggers, and optional time-based scaling windows. Not available on free plans. An application on Usage Billing can also have a monthly budget: when its own usage this billing cycle (not its add-ons’) reaches it, admins are emailed at 50% and 75% and at the budget if budget_notification_enabled, and with stop_at_budget_limit_enabled it is scaled down to one replica. It keeps running and serving, its storage and that replica keep being charged for, and a scale-up is refused with 422 until the next cycle, when it gets back the scaling it had, or until the budget is raised above its usage, removed, or stop_at_budget_limit_enabled is turned off, which puts that scaling back at once. A budget on an application on a resource or in a workspace pool is refused with 422.
curl --request PUT \
--url https://app.miget.com/api/v1/apps/{uuid}/scaling_profile \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"replicas": 123,
"auto_scaling_enabled": true,
"auto_min_replicas": 123,
"auto_max_replicas": 123,
"scaling_start_time": "<string>",
"scaling_end_time": "<string>",
"within_resources": true,
"cpu_threshold": 123,
"memory_threshold": 123,
"period_enabled": true,
"max_monthly_budget": 123,
"budget_notification_enabled": true,
"stop_at_budget_limit_enabled": true
}
'import requests
url = "https://app.miget.com/api/v1/apps/{uuid}/scaling_profile"
payload = {
"replicas": 123,
"auto_scaling_enabled": True,
"auto_min_replicas": 123,
"auto_max_replicas": 123,
"scaling_start_time": "<string>",
"scaling_end_time": "<string>",
"within_resources": True,
"cpu_threshold": 123,
"memory_threshold": 123,
"period_enabled": True,
"max_monthly_budget": 123,
"budget_notification_enabled": True,
"stop_at_budget_limit_enabled": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
replicas: 123,
auto_scaling_enabled: true,
auto_min_replicas: 123,
auto_max_replicas: 123,
scaling_start_time: '<string>',
scaling_end_time: '<string>',
within_resources: true,
cpu_threshold: 123,
memory_threshold: 123,
period_enabled: true,
max_monthly_budget: 123,
budget_notification_enabled: true,
stop_at_budget_limit_enabled: true
})
};
fetch('https://app.miget.com/api/v1/apps/{uuid}/scaling_profile', 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://app.miget.com/api/v1/apps/{uuid}/scaling_profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'replicas' => 123,
'auto_scaling_enabled' => true,
'auto_min_replicas' => 123,
'auto_max_replicas' => 123,
'scaling_start_time' => '<string>',
'scaling_end_time' => '<string>',
'within_resources' => true,
'cpu_threshold' => 123,
'memory_threshold' => 123,
'period_enabled' => true,
'max_monthly_budget' => 123,
'budget_notification_enabled' => true,
'stop_at_budget_limit_enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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://app.miget.com/api/v1/apps/{uuid}/scaling_profile"
payload := strings.NewReader("{\n \"replicas\": 123,\n \"auto_scaling_enabled\": true,\n \"auto_min_replicas\": 123,\n \"auto_max_replicas\": 123,\n \"scaling_start_time\": \"<string>\",\n \"scaling_end_time\": \"<string>\",\n \"within_resources\": true,\n \"cpu_threshold\": 123,\n \"memory_threshold\": 123,\n \"period_enabled\": true,\n \"max_monthly_budget\": 123,\n \"budget_notification_enabled\": true,\n \"stop_at_budget_limit_enabled\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<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.put("https://app.miget.com/api/v1/apps/{uuid}/scaling_profile")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"replicas\": 123,\n \"auto_scaling_enabled\": true,\n \"auto_min_replicas\": 123,\n \"auto_max_replicas\": 123,\n \"scaling_start_time\": \"<string>\",\n \"scaling_end_time\": \"<string>\",\n \"within_resources\": true,\n \"cpu_threshold\": 123,\n \"memory_threshold\": 123,\n \"period_enabled\": true,\n \"max_monthly_budget\": 123,\n \"budget_notification_enabled\": true,\n \"stop_at_budget_limit_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.miget.com/api/v1/apps/{uuid}/scaling_profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"replicas\": 123,\n \"auto_scaling_enabled\": true,\n \"auto_min_replicas\": 123,\n \"auto_max_replicas\": 123,\n \"scaling_start_time\": \"<string>\",\n \"scaling_end_time\": \"<string>\",\n \"within_resources\": true,\n \"cpu_threshold\": 123,\n \"memory_threshold\": 123,\n \"period_enabled\": true,\n \"max_monthly_budget\": 123,\n \"budget_notification_enabled\": true,\n \"stop_at_budget_limit_enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}Authorizations
Body
Update scaling profile
false scales an application on a resource beyond its plan: the first replica runs on the resource, and every replica past it, up to the workspace's replicas_per_process limit, is billed by usage: for its RAM, sharing the resource's CPU, or on a dedicated-CPU resource for its CPU and RAM, which the resource's CPU is raised by. Only on a paid resource, not on an enterprise contract, not with RWO storage and while Usage Billing is on for the workspace. Turning it off takes apps:manage. true brings every replica back onto the resource and is refused when they do not fit

