Skip to main content

Delete data from a timeless account

POST 

/v1/timeless-indices/:id/delete-data

Deletes the documents of a timeless account that match a time range and the optimizers that wrote them, and returns the number of documents to be deleted. Deleted data can't be restored.

  • optimizerIds is required. Send the IDs of the optimizers whose data to delete, or an empty list to delete the data of every optimizer.
  • Send both timeFrameFrom and timeFrameTo to delete within a time range, or leave both out to delete regardless of time. The range is inclusive and matches the @timestamp of each document.

Run Preview a data deletion from a timeless account with the same request first to see how many documents it matches.

Only documents whose log type is the timeless account's current logType are deleted. This is the log type an optimizer writes with when its output.target.timelessIndex.logType is the timeless account's logType, as Create an optimizer requires.

The deletion runs in the background, so the documents disappear over the next minutes, and the account's used storage goes down after that.

Must be run with an API token that has the Admin role. API tokens created before token roles were introduced have the same permissions as Admin.

Please ensure to change the region in the URL to match your account's region.

Request​

Path Parameters

Body

required
    optimizerIds int32[]required

    The IDs of the optimizers whose data to match. Send an empty list to match the data of every optimizer.

    timeFrameFrom date-time

    The start of the time range, in ISO 8601 format. Send it together with timeFrameTo, or leave both out to match any time.

    timeFrameTo date-time

    The end of the time range, in ISO 8601 format. Send it together with timeFrameFrom, or leave both out to match any time.

Responses​

successful operation. Returns the number of documents to be deleted.

Schema

    integer

Loading...