Headers
-
Unique identifier of an integration
Minimum length is
32
, maximum length is32
. Format should match the following pattern:IN[A-Z0-9]+
.
POST
/service-levels
curl \
--request POST '/api/v1/service-levels' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--header "x-integration-id: IN7AB56CD456OP98BN54CAUB43211OU7" \
--data '{"route":{"method":"GET","host":"api.example.com","port":8080,"path":"/api/users/{id}"},"latency":{"percentiles":[{"percentile":"99.9%","breachLatency":"2s"}],"windowDuration":"1h"},"status":{"expected":["200","201","204"],"breachThreshold":"99.9%","windowDuration":"1h"},"validation":{"schemaId":"S7AB56CD456OP98BN54CAUB43211OU78","breachThreshold":"99.9%","windowDuration":"1h"}}'
Request examples
# Headers
x-integration-id: IN7AB56CD456OP98BN54CAUB43211OU7
# Payload
{
"route": {
"method": "GET",
"host": "api.example.com",
"port": 8080,
"path": "/api/users/{id}"
},
"latency": {
"percentiles": [
{
"percentile": "99.9%",
"breachLatency": "2s"
}
],
"windowDuration": "1h"
},
"status": {
"expected": [
"200",
"201",
"204"
],
"breachThreshold": "99.9%",
"windowDuration": "1h"
},
"validation": {
"schemaId": "S7AB56CD456OP98BN54CAUB43211OU78",
"breachThreshold": "99.9%",
"windowDuration": "1h"
}
}
Response examples (200)
{
"routeKey": "GET:api.example.com:8080:/api/users/{id}"
}
Response examples (201)
{
"routeKey": "GET:api.example.com:8080:/api/users/{id}"
}
Response examples (400)
{
"code": "string",
"message": "string"
}
Response examples (401)
{
"code": "string",
"message": "string"
}
Response examples (429)
{
"code": "string",
"message": "string"
}
Response examples (500)
{
"code": "string",
"message": "string"
}