> ## Documentation Index
> Fetch the complete documentation index at: https://docs.costory.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List business metrics

> Business `metricId` values accepted by `metric` series, grouped by datasource. `status` is a stored value and is not refreshed on read for API-key callers.



## OpenAPI

````yaml /api-reference/openapi.json get /queries/metrics
openapi: 3.0.0
info:
  title: Costory
  version: '1.0'
  description: API Documentation
servers:
  - url: ''
    description: Production server
security: []
paths:
  /queries/metrics:
    get:
      tags:
        - Query Costs
      summary: List business metrics
      description: >-
        Business `metricId` values accepted by `metric` series, grouped by
        datasource. `status` is a stored value and is not refreshed on read for
        API-key callers.
      operationId: listQueryMetrics
      responses:
        '200':
          description: Queryable business metrics for the authenticated organization
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/QueryMetric'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '500':
          description: Unexpected server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    QueryMetric:
      type: object
      properties:
        id:
          type: string
        datasourceId:
          type: string
        datasourceName:
          type: string
        metricName:
          type: string
        type:
          type: string
          enum:
            - CSV
            - GoogleSheet
            - Datadog
            - DatadogV2
            - DatadogCIVisibility
            - AWS
            - BigQuery
            - GCS
            - Amplitude
            - AwsS3V2
            - AwsCloudWatch
            - Cursor
        status:
          type: string
          nullable: true
          enum:
            - ACTIVE
            - DRAFT
            - ERROR
            - PENDING
            - null
        dimensions:
          type: array
          items:
            type: string
        unit:
          type: string
      required:
        - id
        - datasourceId
        - datasourceName
        - metricName
        - type
        - status
        - dimensions
      additionalProperties: false
    Unauthorized:
      type: object
      properties:
        error:
          type: string
          description: Unauthorized error message
      required:
        - error
    InternalServerError:
      type: object
      properties:
        error:
          type: string
          enum:
            - INTERNAL_SERVER_ERROR
      required:
        - error
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or Clerk ak_* API key
      description: >-
        Send `Authorization: Bearer <credential>` using either a Clerk session
        JWT or a Clerk API key (`ak_*`). API keys may identify a user (`user_*`)
        or organization (`org_*`) principal and are generated in the Clerk
        Dashboard under API keys.

````