Try it free

Partially update a filter segment

  • Latest Dynatrace
  • Reference
  • Published Oct 13, 2026

Partially update a filter segment in Dynatrace with the Grail Filter Segments API by UID, changing only the fields you send.

PATCHSaaShttps://{your-environment-id}.apps.dynatrace.com/v1/filter-segments/{filterSegmentUid}

Overview

You provide the filterSegmentUid path parameter and the optimistic-locking-version query parameter, then include the fields to change in the request body. The operation updates the supported fields you send and returns the updated filter segment.

Authentication

To execute this request, you need a platform token or OAuth access token with all of the following scopes:

  • storage:filter-segments:write
  • storage:filter-segments:share to change isPublic to true

To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
filterSegmentUidstring

UID of the filter-segment

pathRequired
optimistic-locking-versioninteger

version which should be updated. used for optimistic locking.

queryRequired
bodyPartialUpdateFilterSegment-bodyRequired

Request body objects

The PartialUpdateFilterSegment object

ElementTypeDescriptionRequired
descriptionstring

Description of the filter-segment.

Optional
externalIdstring

Optional unique identifier of the filter-segment. Used for Dynatrace Configuration as Code

Optional
includesNewInclude[]

List of includes of the filter-segment.

Optional
isPublicboolean

Indicates if the filter-segment is publicly accessible within the tenant.

Optional
namestring

Name of the filter-segment.

Optional
variablesFilterSegmentVariables

Variables of the filter-segment.

Optional

The NewInclude object

List of includes of the filter-segment.

ElementTypeDescriptionRequired
applyTostring[]

[Experimental] The tables that the entity-filter will be applied to.

Optional
dataObjectstring

The data object that the filter will be applied to. Use '_all_data_object' to apply it to all dataObjects.

Required
filterstring

Data will be filtered by this value. Field names must only contain letters, numbers and underscores, otherwise they need to be escaped using quotes(`).

Required
relationshipNewRelationship

[Experimental] The relationship of an include which has to be be specified when the data object is an entity view.

Optional

The NewRelationship object

[Experimental] The relationship of an include which has to be be specified when the data object is an entity view.

ElementTypeDescriptionRequired
namestring

Name of the relationship.

Required
targetstring

Target of the relationship.

Required

The FilterSegmentVariables object

Variables of the filter-segment.

ElementTypeDescriptionRequired
typestring

Type of the variable.

Required
valuestring

Value of the variable.

Required

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.

{
"description": "only includes data of the development environment"
}

Response

Response codes

CodeTypeDescription
200-

Filter-segment successfully updated.

400ErrorEnvelope

bad request

401ErrorEnvelope

unauthorized

403ErrorEnvelope

missing permissions

404ErrorEnvelope

Not found: the server cannot find the requested filter-segment.

Response body objects

The ErrorEnvelope object

ElementTypeDescription
errorExceptionalReturn-

The ExceptionalReturn object

ElementTypeDescription
codeinteger-
errorDetails(CustomValidationErrorInfo | InvalidAuditEventsErrorInfo | MediaTypeErrorInfo | ParameterErrorInfo | ProxyErrorInfo | QueryFrontendRawErrorInfo | RequestBodyErrorInfo)[]-
messagestring-

The CustomValidationErrorInfo object

The ErrorInfo object

ElementTypeDescription
messagestring-

The InvalidAuditEventsErrorInfo object

The MediaTypeErrorInfo object

The ParameterErrorInfo object

The ProxyErrorInfo object

The QueryFrontendRawErrorInfo object

The RequestBodyErrorInfo object

Response body JSON models

{
"error": {
"code": 400,
"message": "Missing request header",
"errorDetails": [
{
"type": "parameter",
"parameterDescriptor": "Dt-Tenant",
"message": "is required"
}
]
}
}
Related tags
Platform APIDynatrace Platform