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

# List the regions available for new clusters and nodes.

> Sort order: Distance (based on client IP address)



## OpenAPI

````yaml /openapi/cloud/2022-03-31.json get /api/v1/clusters/available-regions
openapi: 3.0.0
info:
  title: CockroachDB Cloud API
  description: >-
    This is an early access, experimental version of the Cloud API. The
    interface and output is subject to change, and there may be bugs.


    # Authentication


    <!-- ReDoc-Inject: <security-definitions> -->
  version: '2022-03-31'
  contact:
    name: Cockroach Labs Support
    url: https://support.cockroachlabs.com
    email: support@cockroachlabs.com
servers:
  - url: https://cockroachlabs.cloud
security:
  - Bearer: []
tags:
  - name: CockroachCloud
externalDocs:
  description: Use the CockroachDB Cloud API
  url: https://www.cockroachlabs.com/docs/cockroachcloud/cloud-api
paths:
  /api/v1/clusters/available-regions:
    get:
      tags:
        - CockroachCloud
      summary: List the regions available for new clusters and nodes.
      description: 'Sort order: Distance (based on client IP address)'
      operationId: CockroachCloud_ListAvailableRegions
      parameters:
        - name: provider
          description: |-
            Optional CloudProvider for filtering.

             - GCP: The Google Cloud Platform cloud provider.
             - AWS: The Amazon Web Services cloud provider.
          in: query
          required: false
          schema:
            type: string
            enum:
              - CLOUD_PROVIDER_UNSPECIFIED
              - GCP
              - AWS
            default: CLOUD_PROVIDER_UNSPECIFIED
        - name: serverless
          description: >-
            Optional filter to only show regions available for serverless
            clusters.
          in: query
          required: false
          schema:
            type: boolean
            default: 'false'
        - name: pagination.start_key
          in: query
          required: false
          schema:
            type: string
        - name: pagination.direction
          in: query
          required: false
          schema:
            type: string
            enum:
              - PAGE_DIRECTION_NEXT
              - PAGE_DIRECTION_LAST
            default: PAGE_DIRECTION_NEXT
        - name: pagination.limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: pagination.time
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: pagination.order
          description: ' - DESC: Sort in descending order. The default order is ascending.'
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: ASC
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAvailableRegionsResponse'
        '400':
          description: Returned when a request field is invalid.
          content:
            application/json:
              schema: {}
        '401':
          description: Returned when the token bearer cannot be authenticated.
          content:
            application/json:
              schema: {}
        '403':
          description: >-
            Returned when the user does not have permission to access the
            resource.
          content:
            application/json:
              schema: {}
        '404':
          description: Returned when the resource does not exist.
          content:
            application/json:
              schema: {}
        5XX:
          description: Server error
          content:
            application/json:
              schema: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      x-codeSamples:
        - lang: curl
          source: |-
            curl --request GET \
              --url 'https://cockroachlabs.cloud/api/v1/clusters/available-regions?provider=SOME_STRING_VALUE&serverless=SOME_BOOLEAN_VALUE&pagination.start_key=SOME_STRING_VALUE&pagination.direction=SOME_STRING_VALUE&pagination.limit=SOME_INTEGER_VALUE&pagination.time=SOME_STRING_VALUE&pagination.order=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
components:
  schemas:
    ListAvailableRegionsResponse:
      type: object
      properties:
        regions:
          type: array
          items:
            $ref: '#/components/schemas/CloudProviderRegion'
        pagination:
          $ref: '#/components/schemas/KeysetPaginationResponse'
      required:
        - regions
    Status:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/Any'
    CloudProviderRegion:
      type: object
      properties:
        name:
          type: string
        location:
          type: string
        provider:
          $ref: '#/components/schemas/api.CloudProvider'
        serverless:
          type: boolean
        distance:
          type: number
          format: float
          title: Distance in miles, based on client IP address
      required:
        - name
        - location
        - provider
        - serverless
        - distance
    KeysetPaginationResponse:
      type: object
      properties:
        next:
          type: string
        last:
          type: string
        limit:
          type: integer
          format: int32
        time:
          type: string
          format: date-time
        order:
          $ref: '#/components/schemas/SortOrder'
    Any:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    api.CloudProvider:
      type: string
      enum:
        - CLOUD_PROVIDER_UNSPECIFIED
        - GCP
        - AWS
      default: CLOUD_PROVIDER_UNSPECIFIED
      description: |2-
         - GCP: The Google Cloud Platform cloud provider.
         - AWS: The Amazon Web Services cloud provider.
    SortOrder:
      type: string
      enum:
        - ASC
        - DESC
      default: ASC
      description: ' - DESC: Sort in descending order. The default order is ascending.'
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````