---
title: "Analytics | SDK Usage"
description: "API Documentation"
url: "https://www.contentstack.com/docs/developers/apis/analytics-api/sdk-usage"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-06-02"
---

# Analytics | SDK Usage

### SDK Usage

**GET** `/analytics/v2/sdk?from={YYYY-MM-DD}&to={YYYY-MM-DD}&orgUid={organization_uid}&includeCount={boolean_value}&services={["cdn","cma"]}&duration={duration}`

The SDK Usage request gets you the number of requests that were made using the SDKs. It helps you get an overview of the SDK usage by your customers.

Here’s how your response body would look like when you pass the jobId in the [Retrieve Data](/docs/developers/apis/analytics-api#retrieve-data) endpoint.

```
{    "total": 16,    "totalDocs": 4,    "data": [        {            "count": 7,            "type": "cdn",            "sdk": "cda-collection/v9.31.0",            "date": "2024-02-09"        },        {            "count": 4,            "type": "cdn",            "sdk": "cda-collection/v9.31.0",            "date": "2024-02-12"        },        {            "count": 3,            "type": "cdn",            "sdk": "cda-collection/v9.31.0",            "date": "2024-02-08"        },        {            "count": 2,            "type": "cdn",            "sdk": "cda-collection/v9.31.0",            "date": "2024-02-15"        },        {            "date": "2024-02-28"        }    ],    "meta": {        "orderBy": -1,        "from": "2024-01-31",        "to": "2024-02-28",        "orgUid": "blt**************87",        "includeCount": true,        "services": "[\"cdn\",\"cma\"]",        "duration": "day"    },    "uid": "0f****46-5ee9-4f38-9146-1f********8"}
```

The response body provides detailed insights into how SDKs are being used across different services. Here’s a breakdown of the key elements:

*   count: The number of requests executed using a specific SDK on a given date.
*   type: The service type, such as "cdn".
*   sdk: The SDK version used for the requests.
*   date: The date when the SDK requests were executed.

This response helps organizations track SDK adoption and effectiveness by revealing usage patterns and frequency.

#### 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

- **authtoken** (required)
  Enter your authtoken.
  Default: `your_authtoken`

#### Sample Response

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