Trim dataset

POST/v1/datasets/{dataset_name}/trim

Trim dataset

Parameters #

PropertyTypeLocationDescription
dataset_namestringRequiredpathUnique name of the dataset.

Body #

application/json
PropertyTypeDescription
maxDurationstringRequired

Request #

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"}'
Try itRun this request against your Axiom organization

Credentials stay in this browser tab and are only sent to Axiom when you run the request.

Response #

200TrimResult
application/json
403Forbidden
application/json
PropertyTypeDescription
numDeletedinteger<int64>RequirednumDeleted 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.