List filter segments in Dynatrace with the Grail Filter Segments API in a minimal form for faster responses, with optional additional fields.
| GET | SaaS | https://{your-environment-id}.apps.dynatrace.com/v1/filter-segments:lean |
You use add-fields to request additional fields while listing filter segments in a minimal representational form. The operation returns all filter segments and is optimized for quicker response times than the detailed get-all endpoint.
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 |
|---|---|---|---|---|
| add-fields | string[] | Add additional fields. The element can hold these values
| query | Optional |
| Code | Type | Description |
|---|---|---|
| 200 | Lean | Filter-segments successfully retrieved. |
| 400 | Error | bad request |
| 401 | Error | unauthorized |
| 403 | Error | missing permissions |
LeanFilterSegments object| Element | Type | Description |
|---|---|---|
| filterSegments | Lean | List of filter-segments. |
LeanFilterSegment objectList of filter-segments.
| Element | Type | Description |
|---|---|---|
| allowedOperations | string[] | Defines the allowed operations of the current user. The element can hold these values
|
| externalId | string | Optional unique identifier of the filter-segment. Used for Dynatrace Configuration as Code |
| 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. |
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{"filterSegments": [{"uid": "D82a1jdA23a","name": "dev_environment","variables": {"type": "query","value": "fetch logs | limit 1"},"isPublic": false},{"uid": "aa2E2xA01yA","name": "prod_environment","variables": {"type": "query","value": "fetch logs | limit 1"},"isPublic": true}]}
{"error": {"code": 400,"message": "Missing request header","errorDetails": [{"type": "parameter","parameterDescriptor": "Dt-Tenant","message": "is required"}]}}