Trim dataset
Trim dataset
When the endpoint returns the status code 200, it means that the deletion request is queued. The deletion itself might take several hours to complete.
POST
/v1/datasets/{dataset_name}/trimFeatures
Send the token in the Authorization: Bearer API_TOKEN header. See Tokens for which token types this endpoint accepts.
Input2
Sent from your browser straight to the API — never to Docsbook, never stored.
(path) Unique name of the dataset.
Output1
numDeleted has been deprecated on 2022-09-14. There is currently no way to tell how much was trimmed via the trim result. If you need to check how much was deleted you can either query the removed time range, or poll the dataset info endpoint.
Responses
200TrimResult
403Forbidden
Example input
curl -X POST 'https://api.axiom.co/v1/datasets/{dataset_name}/trim' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"maxDuration":"1h"}'Example output
{
"numDeleted": 0
}