Record deletion in Grail via API

You can delete records from Grail via API by leveraging DQL. DQL allows you to specify criteria for selecting records to be deleted.

You can delete the following data types:

  • logs
  • events
  • bizevents
  • spans

To delete records in Grail

  1. Search for and select Dynatrace API.
  2. In the Select a definition field, select Grail - Storage Record Deletion.
  3. Authenticate with your API token.
    For details, see Authentication.
  4. Perform one of the following actions.

To do this

Go to Record Delete and select this

Cancel running process

POST/delete:cancel

Start new deletion process

POST/delete:execute

Get status of currently running process

POST/delete:status

To delete your records, you need to use the /delete:execute endpoint and a DQL query which can contain the following commands and functions.

Available DQL commands

Available DQL functions

fetch, fields, fieldsAdd, fieldsRemove, filter, parse

concat, contains, timestamp, timeframe, asNumber, asDouble, asLong, asString, asBoolean, toDouble, toLong, toString, toBoolean, now, matchesPhrase, matchesValue

Record deletion is final and can't be undone.

Record deletion permissions

To delete the records, the policy bound to your user group must contain the following permissions:

  • storage:records:delete
  • storage:events:read
  • storage:logs:read
  • storage:bizevents:read
  • storage:spans:read
  • storage:buckets:read

If you don't have these permissions, you'll get a 403 error. To learn more about permissions, see IAM policies.

Limitations

To avoid excessive deletions on a large volume of records, we introduced the following limitations.

  • You can have 1 deletion in progress per tenant.
  • The timeframe for record deletion is 24 hours.
  • The end of the timeframe must be at least 4 hours prior to the time of record deletion.