---
title: "Get usage stats for a deployment channel."
method: GET
path: "/api/v3/over-the-air-updates/deployments/{deployment_id}/usage/{metric}"
tags: ["Over-the-air Updates"]
deprecated: true
---

# Get usage stats for a deployment channel.

`GET /api/v3/over-the-air-updates/deployments/{deployment_id}/usage/{metric}`

## Request

- Base URL: `https://codemagic.io`
- URL: `https://codemagic.io/api/v3/over-the-air-updates/deployments/{deployment_id}/usage/{metric}`
- Auth: API key in header `x-auth-token`
- TypeScript: <https://skmtc.dev/codemagic/apis/codemagic-api/docs/api/v3/over-the-air-updates/deployments/:deployment_id/usage/:metric/get.ts> (a function with typed inputs; its response is checked against the schema)

> **Deprecated.**

Deprecated. Use `GET /ota/deployments/{deployment_id}/usage/{metric}` instead.

## Path parameters

- `deployment_id` string, required
- `metric` 'download_count' | 'deployment_succeeded_count' | 'deployment_failed_count', required: The name of the usage metric to retrieve.

## Query parameters

- `period_from` string, date-time, nullable, required: Datetime in ISO format; the default is set to the first day of the current month.
- `period_to` string, date-time, nullable, required: Datetime in ISO format; default is set to now.

## Response `200`

Request fulfilled, document follows

- OtaDeploymentUsageSchemasUsageSchemaNoPagination
  - `data` OtaDeploymentUsageSchemasUsageSchema, required
    - `series` OtaDeploymentUsageSchemasSeriesSchema[], required
      - `name` string, required
      - `metric` string, required
      - `values` OtaDeploymentUsageSchemasValueSchema[], required
        - `timestamp` string, date-time, required
        - `value` integer, required
    - `meta` OtaDeploymentUsageSchemasMetaSchema, required
      - `period_from` string, date-time, required
      - `period_to` string, date-time, required
      - `interval` '1d', required

## Other responses

- `400`: The request could not be validated
- `401`: Authentication is missing or invalid
- `403`: The caller lacks the required permission
- `404`: The requested resource does not exist
- `429`: The rate limit has been exceeded

---

[API](https://skmtc.dev/codemagic/apis/codemagic-api.md) - [All operations](https://skmtc.dev/codemagic/apis/codemagic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/codemagic/apis/codemagic-api/revisions/be09630f65e2?raw)
