# Edge traffic for the workspace or one application, with its busiest domains

> get traffic summary: reference page for this CustomDomain™ API operation in the analytics group. Covers parameters, request body, responses and error codes.

Source: https://docs.customdomain.ai/docs/api-reference/analytics/getTrafficSummary

## `GET https://api.customdomain.ai/v1/traffic`

Requests the CustomDomain™ edge served for the tenant's domains, by status class, and the bytes it relayed to visitors, as a series (one point per hour for `24h` and `7d`, per UTC day for `30d` and `90d`, every bucket present) with totals and the busiest domains. Only traffic that passes through the edge is counted: a domain whose records point at the integrator's own servers (connected for DNS only) never appears. Counts arrive from the edge once a minute. Hourly figures are kept 14 days, daily figures 400 days. API key; any member role; `app_id` narrows to one application of the key's tenant (another tenant's application is a 404).

### Authentication

`apiKey`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `range` | query | `24h`, `7d`, `30d`, `90d` | no |  |
| `app_id` | query | string | no |  |
| `limit` | query | integer | no | How many of the busiest domains to return. |

### Responses

| Status | Description |
| --- | --- |
| `200` | Traffic summary |
| `400` | Error envelope: {code, title, details}. |
| `401` | Error envelope: {code, title, details}. |
| `404` | Error envelope: {code, title, details}. |
| `503` | Error envelope: {code, title, details}. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `application_id` | string | yes | The application the summary is narrowed to; empty for the whole workspace. |
| `range` | `24h`, `7d`, `30d`, `90d` | yes |  |
| `granularity` | `hour`, `day` | yes |  |
| `from` | string | yes |  |
| `to` | string | yes |  |
| `totals` | object | yes |  |
| `series` | array of object | yes |  |
| `top_domains` | array of object | yes | The busiest domains, most requests first. |
| `retention` | object | yes |  |

The full specification is served at `GET https://api.customdomain.ai/v1/openapi.json`.
