> ## 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.

# Search Capacity

> Search for available EC2 instance type offerings within a specific availability zone and time window.



## OpenAPI

````yaml /api-reference/flex-compute/flex-api.json get /external/api/v1/flexcompute/search
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/search:
    get:
      summary: Search Capacity
      description: >-
        Search for available EC2 instance type offerings within a specific
        availability zone and time window.
      parameters:
        - name: instanceType
          in: query
          required: true
          schema:
            type: string
          description: EC2 instance type to check (e.g., c5.large).
        - name: platform
          in: query
          required: false
          schema:
            type: string
            default: Linux/UNIX
          description: OS/platform for the offering (e.g., Linux/UNIX, Windows Server).
        - name: zoneId
          in: query
          required: true
          schema:
            type: string
          description: >-
            Availability Zone identifier to search within (e.g., usw2-az1,
            aps1-az1).
        - name: startDate
          in: query
          required: true
          schema:
            type: string
            pattern: ^\d{2}/\d{2}/\d{4}$
          description: >-
            Start date of the desired reservation window, format MM/dd/yyyy
            (e.g., 12/20/2024).
        - name: endDate
          in: query
          required: true
          schema:
            type: string
            pattern: ^\d{2}/\d{2}/\d{4}$
          description: >-
            End date of the desired reservation window, format MM/dd/yyyy (e.g.,
            12/25/2024).
        - name: utcOffsetHours
          in: query
          required: true
          schema:
            type: integer
            minimum: -18
            maximum: 18
          description: >-
            Client UTC offset in hours (range -18 to 18), used to interpret
            local dates.
      responses:
        '200':
          description: Success - Returns available instance type offerings
          content:
            application/json:
              example:
                - title: Available (All)
                  status: AVAILABLE_ALL
                  startDateTime: '2026-09-08T00:00:00-08:00'
                  endDateTime: '2026-10-08T23:59:59-08:00'
        '400':
          description: Bad Request - Invalid date format or parameters
          content:
            application/json:
              example:
                error:
                  code: '400'
                  message: Bad Request
                  details:
                    timestamp: '2026-01-08T14:44:01'
                    description: >-
                      endDate: Failed to convert value of type
                      'java.lang.String' to required type 'java.time.LocalDate'
        '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 specified instanceType does not exist
          content:
            application/json:
              example:
                error:
                  code: '404'
                  message: Not Found
                  details:
                    timestamp: '2026-01-08T14:43:14'
                    description: >-
                      Supported instance type c5.large1 and platform Linux/UNIX
                      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

````