This is the Service-level Objectives API classic. For more information on Service-level Objectives API, see SLO Service Public API reference.
Creates a new service-level objective (SLO) alert.
The request consumes an application/json payload.
| POST | SaaS | https://{your-environment-id}.live.dynatrace.com/api/v2/slo/{id}/alert |
| Environment ActiveGateCluster ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v2/slo/{id}/alert |
To execute this request, you need an access token with slo.write scope.
To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of two weeks is used ( | query | optional |
| to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. | query | optional |
| timeFrame | string | The timeframe to calculate the SLO values:
If not set, the
| query | optional |
| id | string | The ID of the required SLO. | path | required |
| body | Abstract | The JSON body of the request. Contains the parameters of the new SLO alert. | body | required |
AbstractSloAlertDto object| Element | Type | Description | Required |
|---|---|---|---|
| alertName | string | Name of the alert. | required |
| alertThreshold | number | Threshold of the alert. Status alerts trigger if they fall below this value, burn rate alerts trigger if they exceed the value. | required |
| alertType | string | Defines the actual set of fields depending on the value. See one of the following objects:
| required |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"alertName": "Payment service availability burn rate alert","alertThreshold": 10,"alertType": "BURN_RATE"}
| Code | Type | Description |
|---|---|---|
| 201 | Entity | Success. The new alert has been created. The response contains the parameters of the new alert. The location response header contains the ID of the new alert. |
| 400 | Error | Failed. The input is invalid. |
| 404 | Error | Failed. The requested resource doesn't exist. |
| 412 | Error | Precondition for creating an SLO alert not fulfilled. The SLO func metric cannot be created or is not created by the SLO. |
| 500 | Error | Internal server error. |
| 4XX | Error | Client side error. |
| 5XX | Error | Server side error. |
EntityShortRepresentation objectThe short representation of a Dynatrace entity.
| Element | Type | Description |
|---|---|---|
| description | string | A short description of the Dynatrace entity. |
| id | string | The ID of the Dynatrace entity. |
| name | string | The name of the Dynatrace entity. |
{"description": "Dynatrace entity for the REST API example","id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a","name": "Dynatrace entity"}