---
title: "Usage"
description: "<p>Resource counts, bandwidth, API volume, device and SDK breakdowns.</p>"
url: "https://www.contentstack.com/docs/developers/apis/analytics-api/usage"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-08-27"
---

# Usage

Resource counts, bandwidth, API volume, device and SDK breakdowns.

## Device Usage

### Device Usage

**GET** `/analytics/v2/devices`

The 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.

#### Query Parameters

- **orgUid** (required)
  Enter the UID of your Organization.
- **from** (required)
  Specify the start date for the required data. Use the following date format: YYYY-MM-DD. It cannot be in the future.
- **to** (required)
  Enter the end date for the required data. The date format should be: YYYY-MM-DD. It must be on or after the from date and cannot be in the future.
- **services** (optional)
  Specify the array of services for which you want statistics, such as: \["cma", "ui", "cdn", "graphql", "images", "assets", "automations", "launch"\]. Pass either a JSON array of service names, for example \["cdn","cma"\], or a single service name on its own, for example automations. A comma-separated list is not supported and returns no data.
- **duration** (optional)
  Determines the granularity of the data. Accepted values are sec, minute, hour, day, week, month, year, and historic; any other value returns a 400 error. If you omit duration, the response is not broken down by date.
- **includeCount** (optional)
  Set this parameter to true to include totals in the response. When set, the response includes both totalDocs (the number of records matching your query) and total (the combined count across all matching records). If omitted, no totals are returned.
- **orderBy** (optional)
  Enter 1 to sort the response in ascending order by count or \-1 to sort it in descending order by count. By default, the value is set to \-1, which orders the response in descending order.
- **limit** (optional)
  Specify the number of items to return per request.
- **skip** (optional)
  Enter the number of items to pass over before returning results. For example, a skip value of 10 omits the first 10 items.

#### Headers

- **authorization** (optional)
  An OAuth access token from a machine-to-machine app, for server-to-server calls that need no user session.

Authentication is required. Pass either this header or authtoken, not both. The renderer lists them as separate optional headers, but a request with neither is rejected.
- **authtoken** (optional)
  A Contentstack authtoken, returned by the Log in to your account request on the Content Management API.

Authentication is required. Pass either this header or authorization, not both. The renderer lists them as separate optional headers, but a request with neither is rejected.

An account may hold at most 20 valid authtokens at a time; creating a twenty-first expires the oldest without warning. In an SSO-enabled organization, users who sign in through the identity provider do not receive an authtoken, so only the organization owner and users permitted to bypass SSO can call this API with one.

#### Sample Response

```json
{
  "jobId": "job_7******a-c**f-4**9-9**0-c**********6",
  "paginated": true
}
```

## SDK Usage

### SDK Usage

**GET** `/analytics/v2/sdk`

The 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.

#### Query Parameters

- **from** (required)
  Specify the start date for the required data. Use the following date format: YYYY-MM-DD. It cannot be in the future.
- **to** (required)
  Enter the end date for the required data. The date format should be: YYYY-MM-DD. It must be on or after the from date and cannot be in the future.
- **orgUid** (required)
  Enter the UID of your Organization.
- **includeCount** (optional)
  Set this parameter to true to include totals in the response. When set, the response includes both totalDocs (the number of records matching your query) and total (the combined count across all matching records). If omitted, no totals are returned.
- **services** (required)
  Specify the array of services for which you want statistics, such as: \["cma", "ui", "cdn", "graphql", "images", "assets", "automations", "launch"\]. Pass either a JSON array of service names, for example \["cdn","cma"\], or a single service name on its own, for example automations. A comma-separated list is not supported and returns no data.
- **duration** (optional)
  Determines the granularity of the data. Accepted values are sec, minute, hour, day, week, month, year, and historic; any other value returns a 400 error. If you omit duration, the response is not broken down by date.
- **orderBy** (optional)
  Enter 1 to sort the response in ascending order by count or \-1 to sort it in descending order by count. By default, the value is set to \-1, which orders the response in descending order.
- **limit** (optional)
  Specify the number of items you wish to fetch per request.
- **skip** (optional)
  Enter the number of items to pass over before returning results. For example, a skip value of 10 omits the first 10 items.
- **apiKey** (optional)
  Enter your stack API key to get data for that specific stack.

#### Headers

- **authorization** (optional)
  An OAuth access token from a machine-to-machine app, for server-to-server calls that need no user session.

Authentication is required. Pass either this header or authtoken, not both. The renderer lists them as separate optional headers, but a request with neither is rejected.
- **authtoken** (optional)
  A Contentstack authtoken, returned by the Log in to your account request on the Content Management API.

Authentication is required. Pass either this header or authorization, not both. The renderer lists them as separate optional headers, but a request with neither is rejected.

An account may hold at most 20 valid authtokens at a time; creating a twenty-first expires the oldest without warning. In an SSO-enabled organization, users who sign in through the identity provider do not receive an authtoken, so only the organization owner and users permitted to bypass SSO can call this API with one.

#### Sample Response

```json
{
  "jobId": "job_7******a-c**f-4**9-9**0-c**********6",
  "paginated": true
}
```

## Subscription Usage

### Subscription Usage

**GET** `/analytics/v2/subscription`

The 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.

#### Query Parameters

- **orgUid** (required)
  Enter the UID of your Organization.
- **services** (required)
  Enter the service for which the subscription usage is required. Only one value is accepted, and it must be launch, cs-assets, or agents. If you pass an unrecognized value, or more than one value, the request does not fail; it is treated as launch. Launch data is also returned when this parameter is not passed.
- **from** (required)
  Specify the start date for the required data. Use the following date format: YYYY-MM-DD. It cannot be in the future. Required when services is launch; not used for cs-assets or agents.
- **to** (required)
  Enter the end date for the required data. The date format should be: YYYY-MM-DD. It must be on or after the from date and cannot be in the future. Required when services is launch; not used for cs-assets or agents.
- **date** (optional)
  Provide the date for which the snapshot of subscription usage is required, in YYYY-MM-DD format. Applies when services is cs-assets or agents; ignored for launch. If you omit it, the value of to is used; if that is also absent, today’s date is used. A date older than 90 days does not return an error; the response comes back with empty or zero values.

#### Headers

- **authorization** (optional)
  An OAuth access token from a machine-to-machine app, for server-to-server calls that need no user session.

Authentication is required. Pass either this header or authtoken, not both. The renderer lists them as separate optional headers, but a request with neither is rejected.
- **authtoken** (optional)
  A Contentstack authtoken, returned by the Log in to your account request on the Content Management API.

Authentication is required. Pass either this header or authorization, not both. The renderer lists them as separate optional headers, but a request with neither is rejected.

An account may hold at most 20 valid authtokens at a time; creating a twenty-first expires the oldest without warning. In an SSO-enabled organization, users who sign in through the identity provider do not receive an authtoken, so only the organization owner and users permitted to bypass SSO can call this API with one.

#### Sample Response

```json
{
  "jobId": "job_7******a-c**f-4**9-9**0-c**********6",
  "paginated": false
}
```

## Usage Analytics

### Usage Analytics

**GET** `/analytics/v2/usage`

The 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.

#### Query Parameters

- **orgUid** (required)
  Enter the UID of your Organization.
- **from** (required)
  Specify the start date for the required data. Use the following date format: YYYY-MM-DD. It cannot be in the future.
- **to** (required)
  Enter the end date for the required data. The date format should be: YYYY-MM-DD. It must be on or after the from date and cannot be in the future.
- **services** (optional)
  Specify the array of services for which you want statistics, such as: \["cma", "ui", "cdn", "graphql", "images", "assets", "automations", "launch", "cs-assets"\]. Pass either a JSON array of service names, for example \["cdn","cma"\], or a single service name on its own, for example automations. A comma-separated list is not supported and returns no data.
- **duration** (optional)
  Determines the granularity of the data. Accepted values are sec, minute, hour, day, week, month, year, and historic; any other value returns a 400 error. If you omit duration, the response is not broken down by date.
- **apiKey** (optional)
  Enter the API key of the stack.
- **projectUid** (optional)
  Enter the Launch project UID to retrieve data from that specific project.
- **environmentUid** (optional)
  Enter the environment UID of the Launch project.
- **space_uid** (optional)
  Enter a space UID to filter the response to that space, or all to include every space. The value is not case-sensitive. Only available when services is set to cs-assets on its own. Passing it alongside any other service returns a 400 error.
- **subService** (optional)
  Enter all, delivery-api, or management-api to filter the response to one part of the cs-assets service. The value is not case-sensitive; any other value returns a 400 error. Defaults to all. Like space\_uid, it can only be used when services is set to cs-assets on its own.

#### Headers

- **authorization** (optional)
  An OAuth access token from a machine-to-machine app, for server-to-server calls that need no user session.

Authentication is required. Pass either this header or authtoken, not both. The renderer lists them as separate optional headers, but a request with neither is rejected.
- **authtoken** (optional)
  A Contentstack authtoken, returned by the Log in to your account request on the Content Management API.

Authentication is required. Pass either this header or authorization, not both. The renderer lists them as separate optional headers, but a request with neither is rejected.

An account may hold at most 20 valid authtokens at a time; creating a twenty-first expires the oldest without warning. In an SSO-enabled organization, users who sign in through the identity provider do not receive an authtoken, so only the organization owner and users permitted to bypass SSO can call this API with one.

#### Sample Response

```json
{
  "jobId": "job_7******a-c**f-4**9-9**0-c**********6",
  "paginated": false
}
```