---
title: "Usage trend of one API proxy"
method: GET
path: "/apiops/projects/{projectName}/api-proxies/{apiProxyName}/usage/timeseries"
tags: ["UsageReport"]
---

# Usage trend of one API proxy

`GET /apiops/projects/{projectName}/api-proxies/{apiProxyName}/usage/timeseries`

## Request

- Base URL: `http://167.86.118.166:32080`
- URL: `http://167.86.118.166:32080/apiops/projects/{projectName}/api-proxies/{apiProxyName}/usage/timeseries`
- Auth: none declared
- TypeScript: <https://skmtc.dev/apinizer/apis/apinizer-management-apis/docs/apiops/projects/:projectName/api-proxies/:apiProxyName/usage/timeseries/get.ts> (a function with typed inputs; its response is checked against the schema)

Token, cost and traffic figures of the subject, bucketed by day, week or month. Every bucket of the period is present: a quiet day is zero, while an unreadable source sets partial and names the environment. AI figures come from the same source the summary report declares. A non-AI proxy answers a traffic series with zero tokens and the note not-ai-proxy.

## Path parameters

- `projectName` string, required
- `apiProxyName` string, required

## Query parameters

- `from` string
- `to` string
- `granularity` string
- `include` string
- `model` string
- `environmentName` string

## Response `200`

successful operation!

- ApiOpsUsageTimeseriesDTO: Period trend of one subject, bucketed by day, week or month.
  - `scope` Scope: The subject of the report.
    - `type` 'ORGANIZATION' | 'CONSUMER' | 'APPLICATION' | 'API_CLIENT' | 'API_PROXY'
    - `key` string: The subject's stable key: organization code, consumerKey, applicationKey, apiClientKey or api proxy name.
    - `name` string: Display name of the subject.
  - `period` Period: Requested and effective period, always UTC.
    - `from` string
    - `to` string
    - `effectiveFrom` string: from, rounded down to the UTC day start when a day-grained source was read.
    - `effectiveTo` string: to, rounded up to the end of its UTC day when a day-grained source was read.
    - `timeZone` string
  - `filters` Filters: Applied filters.
    - `model` string: Exact LLM model id the report was narrowed to, or null.
    - `environmentName` string: Environment name the traffic-log blocks were narrowed to, or null for every environment of the project.
    - `environmentApplied` boolean: False when environmentName could not be applied to a block because its source carries no environment dimension.
  - `granularity` 'DAY' | 'WEEK' | 'MONTH': Bucket width of the series.
  - `aiDataSource` string: Where the AI figures came from: ROLLUP_DAILY or TRAFFIC_LOG. Null when AI was not requested.
  - `aiFreshness` string: How fresh the AI figures are.
  - `trafficDataSource` string: Where the traffic figures came from. Null when traffic was not requested.
  - `series` Point[]: One row per bucket, oldest first. Empty buckets are present with zeros.
    - `bucketStart` string: Start of the bucket, UTC. A day, the Monday of the week, or the 1st of the month.
    - `tokenInput` integer: Prompt tokens. Null when AI was not requested.
    - `tokenOutput` integer: Completion tokens. Null when AI was not requested.
    - `tokenCached` integer: Cached input tokens. Null when AI was not requested.
    - `tokenTotal` integer: tokenInput + tokenOutput + tokenCached. Null when AI was not requested.
    - `costUsd` number: Cost in US dollars. Null when AI was not requested.
    - `aiRequests` integer: Calls that carried an LLM model. Null when AI was not requested.
    - `aiFailedRequests` integer: Of those, the ones that did not succeed. Null when AI was not requested.
    - `requests` integer: Gateway requests. Null when traffic was not requested.
    - `failedRequests` integer: Gateway requests that did not end in SUCCESS (errored or blocked). Null when traffic was not requested.
    - `avgTimeMs` number, double: Average total gateway time in milliseconds. Null for a bucket with no request.
  - `total` integer: Number of buckets in the series.
  - `partial` boolean: True when at least one source could not be read; the answer is still 200 with what was readable.
  - `unavailableEnvironments` string[]: Names of the environments whose traffic log could not be read.
  - `notes` string[]: Machine-readable notes explaining zero or missing numbers.

## Other responses

- `400`: Invalid period, granularity, include, or the platform (admin) project.
- `401`: not authorized for this operation!

## Changes

- **2026-10-20** `d1a546deccf0`: 3 breaking
  - removed the enum value `day` from the `query` request parameter `granularity`
  - removed the enum value `month` from the `query` request parameter `granularity`
  - removed the enum value `week` from the `query` request parameter `granularity`
  - …this revision’s changelog is incomplete
- **2026-09-12** `90cf59a80235`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/apinizer/apis/apinizer-management-apis/changes/apiops/projects/:projectName/api-proxies/:apiProxyName/usage/timeseries/get.md)

---

[API](https://skmtc.dev/apinizer/apis/apinizer-management-apis.md) - [All operations](https://skmtc.dev/apinizer/apis/apinizer-management-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/apinizer/apis/apinizer-management-apis/revisions/e083046b24cd?raw)
