Execute record deletion in Dynatrace with the Grail Storage Record Deletion API using DQL and a time frame. It accepts the request for asynchronous processing.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/storage/record/v1/delete:execute |
Execute record deletion. Removing data depends on the load and can be very time-consuming.
Timeframe length is limited to 24 hours. ISO-8601 and RFC-3339 are recommended to use. Additionally, end time must end at least 4 hours from now.
Subsequent record deletion requests are queued and executed in the order of their arrival.
Allowed query commands: fetch, fields, fieldsAdd, fieldsRemove, filter, parse
Allowed query functions: concat, contains, timestamp, timeframe, asNumber, asDouble,
asLong, asString, asBoolean, toDouble, toLong, toString, toBoolean, now,
matchesPhrase, matchesValue, matchesPattern
The fetch command parameters scanLimitGBytes and samplingRatio aren't available in the Record Deletion API.
To execute this request, you need a platform token or OAuth access token with all of the following scopes:
storage:records:deletestorage:bizevents:readTo learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| body | Delete | The request consists of the following parameters:
| body | Required |
DeleteRecordsRequest object| Element | Type | Description | Required |
|---|---|---|---|
| locale | string | - | Optional |
| query | string | - | Required |
| timeFrame | Time | - | Optional |
| timezone | string | - | Optional |
TimeFrame object| Element | Type | Description | Required |
|---|---|---|---|
| end | string | - | Required |
| start | string | - | Required |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"query": "fetch logs | filter contains(content, \"delete_records_test\")","timeFrame": {"start": "2023-04-04T00:00:00","end": "2023-04-04T01:00:00"},"timezone": "UTC","locale": "en-US"}
| Code | Type | Description |
|---|---|---|
| 202 | Execute | Accepted the record deletion request. |
| 204 | - | There are no records to delete. |
| 400 | Error | Bad request for executing the record deletion request. |
| 401 | Error | Unauthorized. |
| 403 | Error | Access forbidden. |
| 503 | Error | Service unavailable. |
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{"error": {"code": 1,"errorDetails": [{"message": "string"}],"message": "string"}}