---
title: "Retrieve analytics for specific time period"
method: GET
path: "/usage/{period}"
tags: ["Usage"]
---

# Retrieve analytics for specific time period

`GET /usage/{period}`

Get time-series analytics data for week, month, or quarter

## Path parameters

- `period` 'week' | 'month' | 'quarter', required

## Response `200`

period analytics received successful

- object
  - `data` object
    - `flows_execution_stats_by_period` ModelsFlowExecutionStats[]
      - `flow_id` integer
      - `flow_title` string, required
      - `tasks` ModelsTaskExecutionStats[]
        - `subtasks` ModelsSubtaskExecutionStats[]
          - `subtask_id` integer
          - `subtask_title` string, required
          - `total_duration_seconds` number
          - `total_toolcalls_count` integer
        - `task_id` integer
        - `task_title` string, required
        - `total_duration_seconds` number
        - `total_toolcalls_count` integer
      - `total_assistants_count` integer
      - `total_duration_seconds` number
      - `total_toolcalls_count` integer
    - `flows_stats_by_period` ModelsDailyFlowsStats[]
      - `date` string, required
      - `stats` ModelsFlowsStats, required
        - `total_assistants_count` integer
        - `total_flows_count` integer
        - `total_subtasks_count` integer
        - `total_tasks_count` integer
    - `period` string, required
    - `toolcalls_stats_by_period` ModelsDailyToolcallsStats[]
      - `date` string, required
      - `stats` ModelsToolcallsStats, required
        - `total_count` integer
        - `total_duration_seconds` number
    - `usage_stats_by_period` ModelsDailyUsageStats[]
      - `date` string, required
      - `stats` ModelsUsageStats, required
        - `total_usage_cache_in` integer
        - `total_usage_cache_out` integer
        - `total_usage_cost_in` number
        - `total_usage_cost_out` number
        - `total_usage_in` integer
        - `total_usage_out` integer
  - `status` string

## Other responses

- `400` — invalid period parameter
- `403` — getting analytics not permitted
- `500` — internal error on getting analytics

---

[API](https://skmtc.dev/vxcontrol/apis/pentagi-swagger-api.md) · [All operations](https://skmtc.dev/vxcontrol/apis/pentagi-swagger-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/vxcontrol/pentagi-swagger-api/revisions/7c1cbf7abaa1/schema)
