Device Usage
https://app.contentstack.com/analytics/v2/devicesThe Device Usage request lists the devices and clients your organization's users are calling Contentstack from, so you can see which SDKs, platforms and operating systems are in use.
Each row carries device, describing the client including SDK version, platform and operating system; type, the service the call reached, such as cma; count, how many times that device was seen; and date, the day the usage was recorded.
Set includeCount to true to add two totals to the result: totalDocs, the number of rows matching your query, and total, the combined count across all of them. In a truncated result total is far larger than the counts you can see, because it sums every matching row rather than the returned page.
{
"jobId": "job_7******a-c**f-4**9-9**0-c**********6",
"paginated": true
}SDK Usage
https://app.contentstack.com/analytics/v2/sdkThe SDK Usage request counts the requests made through Contentstack SDKs, so you can see which SDK versions your integrations are running.
Each row carries sdk, the SDK and version; type, the service the call reached, such as cdn; count, the number of requests; and date, the day they were made.
This is the one endpoint whose job is paginated by default, so its response returns paginated as true and you page through the result with page on Retrieve Data.
Set includeCount to true to add totalDocs and total to the result.
{
"jobId": "job_7******a-c**f-4**9-9**0-c**********6",
"paginated": true
}Subscription Usage
https://app.contentstack.com/analytics/v2/subscriptionThe Subscription Usage request returns how many resources exist in your organization for one service: projects, environments, domains, assets, agents and so on. Pass the service in services, which accepts launch, cs-assets or agents. For CMS and Automate figures, use Usage Analytics instead.
The shape of data depends on the service. For launch it is an array holding a single object with total_launch_project, total_launch_env and total_launch_domain. For cs-assets and agents it is a single object.
The cs-assets object reports asset_total, asset_storage, deleted_assets_total, spaces_total, workspace_total, custom_asset_types, fields_total and ai_assets_usage.
The agents object reports agent_total, total_active_agents, total_executions, agent_executions_completed, agent_executions_failed and total_tokens_consumed.
from and to are required on the launch path. For cs-assets and agents the figures are a point-in-time count, so pass date instead; it defaults to to, and then to today.
{
"jobId": "job_7******a-c**f-4**9-9**0-c**********6",
"paginated": false
}Usage Analytics
https://app.contentstack.com/analytics/v2/usageThe Usage Analytics request gives an overview of the bandwidth and API volume your organization consumed over a period.
Each row carries total_api_count and total_api_bandwidth for API traffic, total_cdn_count and total_cdn_bandwidth for CDN traffic, and date for the period the row covers. When services is cs-assets, the rows instead carry asset_api_usage, asset_bandwidth_usage and date.
Several parameter combinations are rejected. apiKey cannot be combined with automations, launch or cs-assets. projectUid and environmentUid apply only to launch. space_uid and subService apply only when services is cs-assets on its own. Each of these returns 400.
When services is cs-assets you must also pass duration. Without it the request succeeds but data comes back empty, which is easy to mistake for having no usage.
{
"jobId": "job_7******a-c**f-4**9-9**0-c**********6",
"paginated": false
}