/bulkexport/status API
You can poll for status of bulk export jobs.
You use the /bulkexport/status
endpoint to poll for the progress of a bulk export job.
Request
You must specify the tracking UID from the submit request to display the status for the request.
POST /bulkexport/status
{
"id": "{TRACKING UID}"
}
Request Example
A sample curl command to display status of a bulk export request follows. This example shows values for the AWS region, and the ChaosSearch API key for authentication, and a query:
curl 'https://mycompany.chaossearch.com/bulkexport/status' \
--aws-sigv4 "aws:amz:<region>:s3" --user "<API_Key>:<Secret>" \
-H 'Content-Type: application/json' \
--data-raw '{"id":"5b00d97d-133d-48e7-9e61-a8a98e4d0a38"}'
Response
The status response contains information about the bulk export search request, the export job options, and its progress.
{
"auth": "api_access",
"exportedFilesPath": "my-s3-export-bkt/exports/5b00d97d-133d-48e7-9e61-a8a98e4d0a38",
"message": "Running",
"searchRequest": {
"_type": "chaossumo.query.BulkExportQuery.Request.Search.Elastic",
"dateTime": 1717094476408,
"msearch": {
"_queryRequestOptions": {
"options": []
},
"close": "???",
"id": "???",
"labels": [],
"queryAuthority": {
"_type": "chaossumo.query.QueryAuthority.Root"
},
"queryId": "ae1e85fc-88e5-4b38-bf76-789af977483b",
"request": {
"body": {
"aggregations": {
"maxSizeField": {
"max": {
"field": "tripduration"
},
"meta": null
}
},
"query": {
"range": {
"timestamp": {
"gt": "1542844740000",
"lt": "1700697600000"
}
}
}
},
"params": {
"size": 0
},
"target": {
"indices": "my-chaos-view"
}
}
},
"options": {
"bucket": "my-s3-export-bkt/exports",
"compression": "gzip",
"fileFormat": "JSON",
"id": "5b00d97d-133d-48e7-9e61-a8a98e4d0a38",
"path": "backup2",
"slice": "a57dc165-b7fe-4147-8188-66e9b07aa3b8",
"unitFileSize": 104857600
},
"queryName": "my-export-name"
},
"status": {
"partitions": {
"active": {
"count": 0
},
"completed": {
"count": 0
},
"failed": {
"count": 0
},
"pending": {
"count": 0
},
"retries": 0,
"total": {
"count": 0
}
},
"principal": {
"_type": "chaossumo.query.Principal.BulkExport",
"passthrough": {
"_type": "chaossumo.query.Principal.BulkExport",
"passthrough": {
"_type": "chaossumo.query.Principal.APIAccess"
},
"uniId": "6c270a60-a608-409e-9c3e-6841ce051484"
},
"uniId": "b6023244-184e-4c6c-b605-c4afada159c8"
},
"queryCompleted": false,
"queryID": "fc718811-dc36-4c3b-a8d2-4e29e587b471",
"scheduled": true,
"segments": {
"byteSize": 0,
"cellCount": 0,
"emptyQueryTasks": 0,
"maxChunks": 0,
"rowCount": 0,
"scopeTasks": 0,
"totalChunks": 0
},
"termination": true,
"timing": {
"queue_time_ms": 0,
"retry_time_ms": 0,
"run_time_ms": 0,
"total_time_ms": 0
}
},
"totalFilesExported": 0
}
RBAC Controls for Status
To submit a bulk export status request, you must be granted permission to use the bulk export status feature via a permission block with the chaos:query:export:status
action. Additionally, an optional condition constraint may be included to restrict status to only the jobs created by a specific user (for instance, the current user).
{
"Actions": [
"chaos:query:export:status"
],
"Condition": {
"Conditions": [
{
"Equals": {
"chaos:owner/crn": "${chaos:principal/crn}"
}
}
]
},
"Effect": "Allow",
"Resources": [
"*"
],
"Version": "1.0"
}
Updated 6 months ago