Create a policy
Changed onpost/v1/workspaces/{workspaceId}/policies
Request
- Base URLhttp://localhost:3001/api
- URLhttp://localhost:3001/api/v1/workspaces/{workspaceId}/policies
- Auth
- API key in header X-API-Key
- or HTTP bearer
Path parameters
workspaceIdstring required
ID of the workspace
Request body
Example request
{
"rules": [
{
"verification": {
"metrics": [
{
"failureCondition": "result.statusCode == 500",
"intervalSeconds": 30,
"provider": {
"url": "http://{{ .resource.name }}.{{ .environment.name }}/health"
},
"successCondition": "result.statusCode == 200"
}
]
}
}
]
}Response
Accepted response
Example response
{
"rules": [
{
"verification": {
"metrics": [
{
"failureCondition": "result.statusCode == 500",
"intervalSeconds": 30,
"provider": {
"url": "http://{{ .resource.name }}.{{ .environment.name }}/health"
},
"successCondition": "result.statusCode == 200"
}
]
}
}
]
}Changes
- warning
added the new
queuedenum value to the////response property for the response status - warning
added the new
queuedenum value to the////response property for the response status - info
added the new
queuedenum value to the request property//// - info
added the new
queuedenum value to the request property////
- warning
- info
the
request property default value100was removed - info
the
response's property default value100was removed for the status
- info