Endpoints
Set endpoint Release Guard policy
PUT
/
api
/
v1
/
endpoints
/
{name}
/
release-guard
/
policy
Set endpoint Release Guard policy
curl --request PUT \
--url http://127.0.0.1:18000/api/v1/endpoints/{name}/release-guard/policy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"max_error_rate_increase": 0.5,
"max_latency_regression_percent": 1,
"max_output_throughput_drop_percent": 1,
"max_ttft_regression_percent": 1,
"minimum_requests": 50000,
"require_compatibility_evidence": true
}
'import requests
url = "http://127.0.0.1:18000/api/v1/endpoints/{name}/release-guard/policy"
payload = {
"enabled": True,
"max_error_rate_increase": 0.5,
"max_latency_regression_percent": 1,
"max_output_throughput_drop_percent": 1,
"max_ttft_regression_percent": 1,
"minimum_requests": 50000,
"require_compatibility_evidence": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
max_error_rate_increase: 0.5,
max_latency_regression_percent: 1,
max_output_throughput_drop_percent: 1,
max_ttft_regression_percent: 1,
minimum_requests: 50000,
require_compatibility_evidence: true
})
};
fetch('http://127.0.0.1:18000/api/v1/endpoints/{name}/release-guard/policy', 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/endpoints/{name}/release-guard/policy"
payload := strings.NewReader("{\n \"enabled\": true,\n \"max_error_rate_increase\": 0.5,\n \"max_latency_regression_percent\": 1,\n \"max_output_throughput_drop_percent\": 1,\n \"max_ttft_regression_percent\": 1,\n \"minimum_requests\": 50000,\n \"require_compatibility_evidence\": true\n}")
req, _ := http.NewRequest("PUT", 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:
0 <= x <= 1Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
1 <= x <= 100000Response
Success
The response is of type object.
⌘I
Set endpoint Release Guard policy
curl --request PUT \
--url http://127.0.0.1:18000/api/v1/endpoints/{name}/release-guard/policy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"max_error_rate_increase": 0.5,
"max_latency_regression_percent": 1,
"max_output_throughput_drop_percent": 1,
"max_ttft_regression_percent": 1,
"minimum_requests": 50000,
"require_compatibility_evidence": true
}
'import requests
url = "http://127.0.0.1:18000/api/v1/endpoints/{name}/release-guard/policy"
payload = {
"enabled": True,
"max_error_rate_increase": 0.5,
"max_latency_regression_percent": 1,
"max_output_throughput_drop_percent": 1,
"max_ttft_regression_percent": 1,
"minimum_requests": 50000,
"require_compatibility_evidence": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
max_error_rate_increase: 0.5,
max_latency_regression_percent: 1,
max_output_throughput_drop_percent: 1,
max_ttft_regression_percent: 1,
minimum_requests: 50000,
require_compatibility_evidence: true
})
};
fetch('http://127.0.0.1:18000/api/v1/endpoints/{name}/release-guard/policy', 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/endpoints/{name}/release-guard/policy"
payload := strings.NewReader("{\n \"enabled\": true,\n \"max_error_rate_increase\": 0.5,\n \"max_latency_regression_percent\": 1,\n \"max_output_throughput_drop_percent\": 1,\n \"max_ttft_regression_percent\": 1,\n \"minimum_requests\": 50000,\n \"require_compatibility_evidence\": true\n}")
req, _ := http.NewRequest("PUT", 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
}
}