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

# Get quota usage for a specific metric

> Returns current usage and limit for a single quota metric. Metric must be URL-encoded (e.g., compute%2Fcpu).



## OpenAPI

````yaml /openapi.json get /v1/quotas/{metric}
openapi: 3.1.0
info:
  title: CNAP API
  version: 1.0.0
  description: >-
    Public API for managing CNAP workspaces, clusters, templates, products, and
    deployments.


    Authenticate with a Personal Access Token via the `Authorization: Bearer
    cnap_pat_...` header.


    Workspace-scoped endpoints require the `X-Workspace-Id` header.
servers:
  - url: https://api.cnap.tech
    description: Production
security: []
paths:
  /v1/quotas/{metric}:
    get:
      tags:
        - Quotas
      summary: Get quota usage for a specific metric
      description: >-
        Returns current usage and limit for a single quota metric. Metric must
        be URL-encoded (e.g., compute%2Fcpu).
      parameters:
        - schema:
            type: string
            example: compute/machines
            description: Quota metric (URL-encoded service/resource)
          required: true
          description: Quota metric (URL-encoded service/resource)
          name: metric
          in: path
      responses:
        '200':
          description: Quota info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuotaInfo'
        '401':
          description: Unauthorized
        '404':
          description: Unknown metric
      security:
        - BearerAuth: []
components:
  schemas:
    QuotaInfo:
      type: object
      properties:
        metric:
          type: string
          example: compute/machines
          description: 'Metric: service/resource'
        type:
          type: string
          enum:
            - allocation
            - rate
            - concurrency
          example: allocation
        display_name:
          type: string
          example: Compute machines
        unit:
          type: string
          example: count
          description: count, cores, bytes, count/day
        limit:
          type: number
          example: 1
        usage:
          type: number
          example: 0
        remaining:
          type: number
          example: 1
        resets_at:
          type: string
          description: 'For rate quotas: ISO 8601 reset time'
      required:
        - metric
        - type
        - display_name
        - unit
        - limit
        - usage
        - remaining
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Personal Access Token (cnap_pat_...) or OAuth2 JWT. Create tokens at
        https://cnap.tech/account/tokens

````