---
title: "List analytics views"
method: GET
path: "/analytics/views"
tags: ["Analytics"]
---

# List analytics views

`GET /analytics/views`

## Request

- Base URL: `https://us.api.flexprice.io/v1`
- URL: `https://us.api.flexprice.io/v1/analytics/views`
- Auth: API key in header `x-api-key`

Lists saved views, optionally filtered by family.

## Query parameters

- `family` string

## Response `200`

OK

- ListViewsResponse
  - `items` ViewResponse[]
    - `created_at` string, date-time
    - `created_by` string
    - `definition` AnalyticsViewDefinition
      - `compare` 'previous_period' | 'previous_year'
      - `currency` string
      - `dimensions` string[]
      - `display` 'chart' | 'table'
      - `family` 'usage' | 'billing' | 'report'
      - `filters` AnalyticsFilter[]
        - `field` string
        - `op` 'eq' | 'contains' | 'not_contains' | 'gt' | 'lt' | 'gte' | 'in' | 'not_in' | 'before' | 'after'
        - `optional` boolean
        - `value` string[]
      - `limit` integer
      - `metrics` TypesMetric[], required
      - `shape` 'timeseries' | 'breakdown' | 'scalar', required
      - `sort` AnalyticsSortSpec[]
        - `dir` 'asc' | 'desc'
        - `field` string
      - `time` AnalyticsTimeSpecRaw
        - `grain` 'hour' | 'day' | 'week' | 'month'
        - `range` string
      - `variables` AnalyticsVariable[]
        - `default` string[]
        - `name` string
        - `required` boolean
        - `type` 'date_range' | 'string' | 'string_list' | 'number' | 'enum' | 'boolean', required
    - `id` string
    - `name` string
    - `updated_at` string, date-time
    - `version` integer

## Other responses

- `400`: Invalid request
- `500`: Server error

## Changes

- **2026-10-25** `4746c65d9396`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/flexprice/apis/flexprice-api/changes/analytics/views/get.md)

---

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