Headers
-
Unique identifier of an integration
Minimum length is
24
, maximum length is24
. Format should match the following pattern:IN[A-Za-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: INx3zt0ygAcQGBAQEBAQEBAQ" \
--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":{"breachThreshold":"99.9%","windowDuration":"1h"}}'
Request examples
# Headers
x-integration-id: INx3zt0ygAcQGBAQEBAQEBAQ
# 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": {
"breachThreshold": "99.9%",
"windowDuration": "1h"
}
}
Response examples (200)
{
"routeKey": "RKyx_d19M6zrA"
}
Response examples (201)
{
"routeKey": "RKyx_d19M6zrA"
}
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"
}