Try it free

Get a filter segment

  • Latest Dynatrace
  • Reference
  • Published Oct 13, 2026

Get a filter segment in Dynatrace with the Grail Filter Segments API by UID, and optionally add fields to return more details.

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

Overview

You provide the filterSegmentUid path parameter to identify the filter segment, and you can use add-fields to request additional fields. The operation returns the matching filter segment.

Authentication

To execute this request, you need a platform token or OAuth access token with storage:filter-segments:read scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
filterSegmentUidstring

UID of the filter-segment

pathRequired
add-fieldsstring[]

Add additional fields.

The element can hold these values
  • INCLUDES
  • VARIABLES
  • EXTERNALID
  • RESOURCECONTEXT
queryOptional

Response

Response codes

CodeTypeDescription
200DetailedFilterSegment

Filter-segment successfully retrieved.

400ErrorEnvelope

bad request

401ErrorEnvelope

unauthorized

403ErrorEnvelope

missing permissions

404ErrorEnvelope

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

Response body objects

The DetailedFilterSegment object

ElementTypeDescription
allowedOperationsstring[]

Defines the allowed operations of the current user.

The element can hold these values
  • READ
  • WRITE
  • DELETE
  • SHARE
descriptionstring

Description of the filter-segment.

externalIdstring

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

includesInclude[]

List of includes of the filter-segment.

isPublicboolean

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

isReadyMadeboolean

Indicates if the segment is ready-made.

namestring

Name of the filter-segment.

ownerstring

Defines the owner of the filter-segment.

uidstring

Unique identifier of the filter-segment.

variablesFilterSegmentVariables

Variables of the filter-segment.

versioninteger

Used for optimistic locking. Update requests define with this on which version the data updated is based on. This must match with the version stored, otherwise the update will fail due to concurrent modification.

The Include object

List of includes of the filter-segment.

ElementTypeDescription
applyTostring[]

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

dataObjectstring

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

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(`).

relationshipRelationship

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

The Relationship object

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

ElementTypeDescription
namestring

Name of the relationship.

targetstring

Target of the relationship.

The FilterSegmentVariables object

Variables of the filter-segment.

ElementTypeDescription
typestring

Type of the variable.

valuestring

Value of the variable.

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

{
"uid": "D82a1jdA23a",
"name": "dev_environment",
"description": "only includes data of the dev environment",
"variables": {
"type": "query",
"value": "fetch logs | limit 1"
},
"isPublic": false,
"owner": "john.doe",
"includes": [
{
"filter": "here goes the filter",
"dataObject": "logs"
},
{
"filter": "here goes another filter",
"dataObject": "events"
}
],
"version": 1
}
{
"error": {
"code": 400,
"message": "Missing request header",
"errorDetails": [
{
"type": "parameter",
"parameterDescriptor": "Dt-Tenant",
"message": "is required"
}
]
}
}
Related tags
Platform APIDynatrace Platform