Burst Guard
Persist a fresh budget-bounded overflow decision
POST
/
api
/
v1
/
deployments
/
{name}
/
burst-guard
/
evaluate
Persist a fresh budget-bounded overflow decision
curl --request POST \
--url http://127.0.0.1:18000/api/v1/deployments/{name}/burst-guard/evaluate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"max_incremental_cost_microusd_hour": 2,
"observed_at": "2023-11-07T05:31:56Z",
"breach_intervals": 2,
"cooldown_seconds": 2,
"enabled": true,
"external_healthy": true,
"incremental_cost_microusd_hour": 1,
"queue_depth": 1,
"queue_threshold": 1,
"recovery_intervals": 2,
"signal_max_age_seconds": 150
}
'import requests
url = "http://127.0.0.1:18000/api/v1/deployments/{name}/burst-guard/evaluate"
payload = {
"max_incremental_cost_microusd_hour": 2,
"observed_at": "2023-11-07T05:31:56Z",
"breach_intervals": 2,
"cooldown_seconds": 2,
"enabled": True,
"external_healthy": True,
"incremental_cost_microusd_hour": 1,
"queue_depth": 1,
"queue_threshold": 1,
"recovery_intervals": 2,
"signal_max_age_seconds": 150
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
max_incremental_cost_microusd_hour: 2,
observed_at: '2023-11-07T05:31:56Z',
breach_intervals: 2,
cooldown_seconds: 2,
enabled: true,
external_healthy: true,
incremental_cost_microusd_hour: 1,
queue_depth: 1,
queue_threshold: 1,
recovery_intervals: 2,
signal_max_age_seconds: 150
})
};
fetch('http://127.0.0.1:18000/api/v1/deployments/{name}/burst-guard/evaluate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/deployments/{name}/burst-guard/evaluate"
payload := strings.NewReader("{\n \"max_incremental_cost_microusd_hour\": 2,\n \"observed_at\": \"2023-11-07T05:31:56Z\",\n \"breach_intervals\": 2,\n \"cooldown_seconds\": 2,\n \"enabled\": true,\n \"external_healthy\": true,\n \"incremental_cost_microusd_hour\": 1,\n \"queue_depth\": 1,\n \"queue_threshold\": 1,\n \"recovery_intervals\": 2,\n \"signal_max_age_seconds\": 150\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Minimum string length:
1Body
application/json
Required range:
x >= 1Required range:
x >= 1Required range:
x >= 1Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 1Required range:
1 <= x <= 300Response
Created
The response is of type object.
⌘I
Persist a fresh budget-bounded overflow decision
curl --request POST \
--url http://127.0.0.1:18000/api/v1/deployments/{name}/burst-guard/evaluate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"max_incremental_cost_microusd_hour": 2,
"observed_at": "2023-11-07T05:31:56Z",
"breach_intervals": 2,
"cooldown_seconds": 2,
"enabled": true,
"external_healthy": true,
"incremental_cost_microusd_hour": 1,
"queue_depth": 1,
"queue_threshold": 1,
"recovery_intervals": 2,
"signal_max_age_seconds": 150
}
'import requests
url = "http://127.0.0.1:18000/api/v1/deployments/{name}/burst-guard/evaluate"
payload = {
"max_incremental_cost_microusd_hour": 2,
"observed_at": "2023-11-07T05:31:56Z",
"breach_intervals": 2,
"cooldown_seconds": 2,
"enabled": True,
"external_healthy": True,
"incremental_cost_microusd_hour": 1,
"queue_depth": 1,
"queue_threshold": 1,
"recovery_intervals": 2,
"signal_max_age_seconds": 150
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
max_incremental_cost_microusd_hour: 2,
observed_at: '2023-11-07T05:31:56Z',
breach_intervals: 2,
cooldown_seconds: 2,
enabled: true,
external_healthy: true,
incremental_cost_microusd_hour: 1,
queue_depth: 1,
queue_threshold: 1,
recovery_intervals: 2,
signal_max_age_seconds: 150
})
};
fetch('http://127.0.0.1:18000/api/v1/deployments/{name}/burst-guard/evaluate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/deployments/{name}/burst-guard/evaluate"
payload := strings.NewReader("{\n \"max_incremental_cost_microusd_hour\": 2,\n \"observed_at\": \"2023-11-07T05:31:56Z\",\n \"breach_intervals\": 2,\n \"cooldown_seconds\": 2,\n \"enabled\": true,\n \"external_healthy\": true,\n \"incremental_cost_microusd_hour\": 1,\n \"queue_depth\": 1,\n \"queue_threshold\": 1,\n \"recovery_intervals\": 2,\n \"signal_max_age_seconds\": 150\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}