Get a filter segment in Dynatrace with the Grail Filter Segments API by UID, and optionally add fields to return more details.
| GET | SaaS | https://{your-environment-id}.apps.dynatrace.com/v1/filter-segments/{filterSegmentUid} |
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.
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.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| filterSegmentUid | string | UID of the filter-segment | path | Required |
| add-fields | string[] | Add additional fields. The element can hold these values
| query | Optional |
| Code | Type | Description |
|---|---|---|
| 200 | Detailed | Filter-segment successfully retrieved. |
| 400 | Error | bad request |
| 401 | Error | unauthorized |
| 403 | Error | missing permissions |
| 404 | Error | Not found: the server cannot find the requested filter-segment. |
DetailedFilterSegment object| Element | Type | Description |
|---|---|---|
| allowedOperations | string[] | Defines the allowed operations of the current user. The element can hold these values
|
| description | string | Description of the filter-segment. |
| externalId | string | Optional unique identifier of the filter-segment. Used for Dynatrace Configuration as Code |
| includes | Include[] | List of includes of the filter-segment. |
| isPublic | boolean | Indicates if the filter-segment is publicly accessible within the tenant. |
| isReadyMade | boolean | Indicates if the segment is ready-made. |
| name | string | Name of the filter-segment. |
| owner | string | Defines the owner of the filter-segment. |
| uid | string | Unique identifier of the filter-segment. |
| variables | Filter | Variables of the filter-segment. |
| version | integer | 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. |
Include objectList of includes of the filter-segment.
| Element | Type | Description |
|---|---|---|
| applyTo | string[] | [Experimental] The tables that the entity-filter will be applied to. |
| dataObject | string | The data object that the filter will be applied to. Use '_all_data_object' to apply it to all dataObjects. |
| filter | string | Data will be filtered by this value. Field names must only contain letters, numbers and underscores, otherwise they need to be escaped using quotes(`). |
| relationship | Relationship | [Experimental] The relationship of an include which has to be be specified when the data object is an entity view. |
Relationship object[Experimental] The relationship of an include which has to be be specified when the data object is an entity view.
| Element | Type | Description |
|---|---|---|
| name | string | Name of the relationship. |
| target | string | Target of the relationship. |
FilterSegmentVariables objectVariables of the filter-segment.
| Element | Type | Description |
|---|---|---|
| type | string | Type of the variable. |
| value | string | Value of the variable. |
ErrorEnvelope object| Element | Type | Description |
|---|---|---|
| error | Exceptional | - |
ExceptionalReturn object| Element | Type | Description |
|---|---|---|
| code | integer | - |
| errorDetails | (Custom | - |
| message | string | - |
CustomValidationErrorInfo objectErrorInfo object| Element | Type | Description |
|---|---|---|
| message | string | - |
InvalidAuditEventsErrorInfo objectMediaTypeErrorInfo objectParameterErrorInfo objectProxyErrorInfo objectQueryFrontendRawErrorInfo objectRequestBodyErrorInfo object{"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"}]}}