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

# List of Capacities

> Retrieve a paginated list of FlexCompute capacity policies with optional filtering and sorting.



## OpenAPI

````yaml /api-reference/flex-compute/flex-api.json get /external/api/v1/flexcompute/capacities
openapi: 3.1.0
info:
  title: Cloudidr FlexCompute API
  description: API for managing compute schedule policies and capacity reservations.
  version: 1.0.0
servers:
  - url: https://public-api.cloudidr.com
    description: Production server
security:
  - bearerAuth: []
paths:
  /external/api/v1/flexcompute/capacities:
    get:
      summary: List of Capacities
      description: >-
        Retrieve a paginated list of FlexCompute capacity policies with optional
        filtering and sorting.
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
          description: The page number for paginated results.
        - name: pageSize
          in: query
          required: false
          schema:
            type: integer
            default: 10
          description: The number of records per page.
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
          description: Sort direction by creation date (asc or desc).
        - name: statuses
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - ACTIVE
                - READY_FOR_PURCHASE
                - EXPIRED
                - CANCELED
                - FAILED
                - COMPLETED
          description: >-
            Filter by policy status. Allowed values: ACTIVE, READY_FOR_PURCHASE,
            EXPIRED, CANCELED, FAILED, COMPLETED.
      responses:
        '200':
          description: Success Response - Returns a paginated list of capacity policies
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                  page:
                    type: integer
                  pageSize:
                    type: integer
                  total:
                    type: integer
        '401':
          description: Unauthorized - Unable to process access token
          content:
            application/json:
              example:
                error:
                  code: '401'
                  message: Unauthorized
                  details:
                    timestamp: '2025-03-04T17:01:01'
                    description: Unable to process access token
        '404':
          description: >-
            Not Found - The resource or parameter value (e.g., incorrect policy
            status) was not found
          content:
            application/json:
              example:
                error:
                  code: '404'
                  message: Not Found
                  details:
                    timestamp: '2025-03-04T16:59:58'
                    description: Provided policy status CANCELED1 not found
        '500':
          description: Internal Server Error - Unexpected error occurred
          content:
            application/json:
              example:
                error:
                  code: '500'
                  message: Internal Server Error
                  details:
                    timestamp: '2025-03-04T17:17:08'
                    description: Unexpected error. Our team is working on it
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````