Retrieve Data
https://app.contentstack.com/analytics/v2/job/{jobId}/dataThe Retrieve Data request collects the result of an analytics job. Every other endpoint returns a jobId rather than data, and you pass that jobId here.
Because the jobs run asynchronously, a job may still be in progress when you call. Read the job state from the response body rather than the status code: a queued job returns 200 with the message Job waiting, and a running job returns 200 with Job active. Repeat the request until the body carries your data.
A failed job returns 500 with Job failed. A jobId that does not exist returns 404 with Job not found.
page is optional and defaults to 0. When the job response reported paginated as true, pass a whole number to fetch that page. A page that does not exist, or a value that is not a whole number, returns 404 with No data found.
A jobId can be read only by the user who created it, within the same organization. A request from any other user returns 404, so a jobId cannot be handed between users or integrations.
{
"data": [
{
"total_launch_domain": 62,
"total_launch_env": 42,
"total_launch_project": 52
}
],
"meta": {
"duration": "day",
"from": "2024-01-01",
"includeCount": "true",
"orgUid": "blt426dad4d38234fd5",
"services": "[\"cdn\",\"cma\"]",
"to": "2024-05-28"
},
"uid": "c13878ab-ff27-4b9c-ae99-a085c8f75f7d"
}