Try it free

Update a service-level objective

  • Latest Dynatrace
  • Reference
  • Published Oct 13, 2026

Update a service-level objective in Dynatrace with the SLO API by ID, using optimistic locking and the updated SLO fields.

PUTSaaShttps://{your-environment-id}.apps.dynatrace.com/platform/slo/v1/slos/{id}

Overview

You provide the service-level objective ID in the path and the optimistic-locking-version query parameter to update safely. The request body can include name, description, sliReference, customSli, criteria, tags, and externalId, and the response returns the updated SLO.

Authentication

To execute this request, you need a platform token or OAuth access token with slo:slos:write scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
idstring

service-level objective ID

pathRequired
optimistic-locking-versionstring

The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.

It's generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.

queryRequired
bodySloConfig

Configuration for a service-level objective. Exactly one of sliReference or customSli must be provided. Providing both or neither results in a 400 Bad Request.

bodyRequired

Request body objects

The SloConfig object

Configuration for a service-level objective. Exactly one of sliReference or customSli must be provided. Providing both or neither results in a 400 Bad Request.

ElementTypeDescriptionRequired
namestring-Required
descriptionstring-Optional
sliReferenceSliReference-Optional
customSliCustomSli-Optional
criteriaCriteria[]-Required
tagsstring[]

A list of tags for this SLO. Tags can be plain strings (e.g. myTag) or key-value pairs separated by a colon (e.g. Stage:DEV). To include a literal colon in a tag, escape it with a backslash (e.g. key\:value).

Optional
externalIdstring

An optional user-provided external identifier for the SLO. Must be unique across all SLOs.

Optional

The SliReference object

ElementTypeDescriptionRequired
templateIdstring

The id of the objective template to use as the SLI definition.

Required
variablesSliReferenceVariable[]-Required

The SliReferenceVariable object

ElementTypeDescriptionRequired
namestring-Required
valuestring-Required

The CustomSli object

ElementTypeDescriptionRequired
indicatorstring-Required
filterSegmentsFilterSegment[]

Represents a collection of filter segments.

Optional

The FilterSegments object

Represents a collection of filter segments.

The FilterSegment object

A filter segment is identified by an ID.

ElementTypeDescriptionRequired
idstring

The identifier of the filter segment.

Required
variablesFilterSegmentVariable[]-Optional

The FilterSegmentVariable object

Defines a variable with a name and a list of values.

ElementTypeDescriptionRequired
namestring

The name of the variable.

Required
valuesstring[]

The list of values for this variable.

Required

The Criteria object

The Timeframe object

ElementTypeDescriptionRequired
timeframeFromstring

The start of the timeframe. Supports relative time expressions (e.g. now-7d) and ISO 8601 timestamps.

Required
timeframeTostring

The end of the timeframe. Supports relative time expressions (e.g. now-7d) and ISO 8601 timestamps. Defaults to now if omitted.

Optional

Request body JSON model

This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.

{
"name": "New SLO",
"description": "This is a description",
"sliReference": {
"templateId": "string",
"variables": [
{
"name": "hostIds",
"value": "\"HOST-123456789ABCDEFG\""
}
]
},
"customSli": {
"indicator": "timeseries sli=avg(dt.host.cpu.idle)",
"filterSegments": [
{
"id": "Frbo6TNENSC",
"variables": [
{
"name": "environment",
"values": [
"production"
]
},
{
"name": "region",
"values": [
"us-east-1",
"eu-west-1"
]
}
]
}
]
},
"criteria": [
{
"target": 99.8,
"warning": 99.9
}
],
"tags": [
"Stage:DEV"
],
"externalId": "string"
}

Response

Response codes

CodeDescription
200

Updated

400-
401-
403-
404-
409-
429-
5XX-
Related tags
Platform APIDynatrace PlatformApplication Observability