CockroachDB Backup Restore API

Manage cluster backups, backup configurations, and restore operations for CockroachDB clusters.

Operations 6

GET /api/v1/clusters/{cluster_id}/backups List backups #
GET /api/v1/clusters/{cluster_id}/backups-config Get backup configuration #
PATCH /api/v1/clusters/{cluster_id}/backups-config Update backup configuration #
GET /api/v1/clusters/{cluster_id}/restores List restores #
POST /api/v1/clusters/{cluster_id}/restores Create a restore #
GET /api/v1/clusters/{cluster_id}/restores/{restore_id} Get a restore #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cockroachdb-backup-restore-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cockroachdb-backup-restore-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CockroachDB Cloud Backup Restore API
  description: The CockroachDB Cloud API is a REST interface that provides programmatic access to manage the lifecycle of clusters within a CockroachDB Cloud organization.
  version: '2024-09-16'
  contact:
    name: Cockroach Labs Support
    url: https://support.cockroachlabs.com
  termsOfService: https://www.cockroachlabs.com/cloud-terms-and-conditions/
servers:
- url: https://cockroachlabs.cloud
  description: CockroachDB Cloud Production Server
security:
- bearerAuth: []
tags:
- name: Backup Restore
  description: Manage cluster backups, backup configurations, and restore operations for CockroachDB clusters.
paths:
  /api/v1/clusters/{cluster_id}/backups:
    get:
      operationId: ListBackups
      summary: List backups
      description: Returns a list of backups for the specified cluster, optionally filtered by start and end time. Supports pagination.
      tags:
      - Backup Restore
      parameters:
      - $ref: '#/components/parameters/clusterId'
      - name: start_time
        in: query
        description: Filter backups created at or after this RFC3339 timestamp.
        schema:
          type: string
          format: date-time
      - name: end_time
        in: query
        description: Filter backups created before this RFC3339 timestamp.
        schema:
          type: string
          format: date-time
      - $ref: '#/components/parameters/paginationPage'
      - $ref: '#/components/parameters/paginationLimit'
      - $ref: '#/components/parameters/paginationAsOfTime'
      - $ref: '#/components/parameters/paginationSortOrder'
      responses:
        '200':
          description: List of backups returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListBackupsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /api/v1/clusters/{cluster_id}/backups-config:
    get:
      operationId: GetBackupConfiguration
      summary: Get backup configuration
      description: Retrieves the backup configuration for the specified cluster, including retention period and backup frequency.
      tags:
      - Backup Restore
      parameters:
      - $ref: '#/components/parameters/clusterId'
      responses:
        '200':
          description: Backup configuration retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BackupConfiguration'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: UpdateBackupConfiguration
      summary: Update backup configuration
      description: Updates the backup configuration for the specified cluster, including retention period and backup frequency settings.
      tags:
      - Backup Restore
      parameters:
      - $ref: '#/components/parameters/clusterId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBackupConfigurationSpec'
      responses:
        '200':
          description: Backup configuration updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BackupConfiguration'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /api/v1/clusters/{cluster_id}/restores:
    get:
      operationId: ListRestores
      summary: List restores
      description: Returns a list of restore operations for the specified cluster. Supports pagination and time-based filtering.
      tags:
      - Backup Restore
      parameters:
      - $ref: '#/components/parameters/clusterId'
      - name: start_time
        in: query
        description: Filter restores initiated at or after this RFC3339 timestamp.
        schema:
          type: string
          format: date-time
      - name: end_time
        in: query
        description: Filter restores initiated before this RFC3339 timestamp.
        schema:
          type: string
          format: date-time
      - $ref: '#/components/parameters/paginationPage'
      - $ref: '#/components/parameters/paginationLimit'
      - $ref: '#/components/parameters/paginationAsOfTime'
      - $ref: '#/components/parameters/paginationSortOrder'
      responses:
        '200':
          description: List of restore operations returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListRestoresResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: CreateRestore
      summary: Create a restore
      description: Initiates a restore operation to restore a cluster from a backup. The destination_cluster_id identifies the target cluster to restore into.
      tags:
      - Backup Restore
      parameters:
      - $ref: '#/components/parameters/clusterId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRestoreRequest'
      responses:
        '200':
          description: Restore operation initiated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Restore'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/v1/clusters/{cluster_id}/restores/{restore_id}:
    get:
      operationId: GetRestore
      summary: Get a restore
      description: Retrieves the status and details of a specific restore operation by ID.
      tags:
      - Backup Restore
      parameters:
      - $ref: '#/components/parameters/clusterId'
      - name: restore_id
        in: path
        required: true
        description: Unique identifier of the restore operation.
        schema:
          type: string
      responses:
        '200':
          description: Restore operation details retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Restore'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    BackupConfiguration:
      type: object
      description: Backup configuration settings for a CockroachDB cluster.
      properties:
        cluster_id:
          type: string
          description: Cluster ID the configuration applies to.
        frequency_minutes:
          type: integer
          description: How often backups are taken, in minutes.
        retention_days:
          type: integer
          description: Number of days backups are retained.
    Error:
      type: object
      description: Standard error response returned by the API.
      properties:
        code:
          type: integer
          description: HTTP status code of the error.
        message:
          type: string
          description: Human-readable description of the error.
        details:
          type: array
          description: Additional detail objects providing error context.
          items:
            type: object
    CreateRestoreRequest:
      type: object
      description: Request body for initiating a cluster restore.
      required:
      - backup_id
      properties:
        backup_id:
          type: string
          description: ID of the backup to restore from.
        target:
          type: object
          description: Optional target specification for the restore.
    ListRestoresResponse:
      type: object
      description: Paginated list of restore operations.
      properties:
        restores:
          type: array
          description: Array of restore operation objects.
          items:
            $ref: '#/components/schemas/Restore'
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
    UpdateBackupConfigurationSpec:
      type: object
      description: Specification for updating backup configuration.
      properties:
        frequency_minutes:
          type: integer
          description: New backup frequency in minutes.
        retention_days:
          type: integer
          description: New retention period in days.
    Restore:
      type: object
      description: Represents a restore operation on a CockroachDB cluster.
      properties:
        id:
          type: string
          description: Unique identifier of the restore operation.
        cluster_id:
          type: string
          description: ID of the destination cluster being restored into.
        status:
          type: string
          description: Current status of the restore operation.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the restore was initiated.
    PaginationResponse:
      type: object
      description: Pagination metadata included in list responses.
      properties:
        next:
          type: string
          description: Token or cursor for retrieving the next page of results.
        last:
          type: string
          description: Token or cursor for the last page of results.
        time:
          type: string
          format: date-time
          description: Server time at which the paginated query was executed.
    ListBackupsResponse:
      type: object
      description: Paginated list of cluster backups.
      properties:
        backups:
          type: array
          description: Array of backup objects.
          items:
            type: object
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
  responses:
    BadRequest:
      description: The request body or parameters are invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication credentials are missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    paginationLimit:
      name: pagination.limit
      in: query
      description: Maximum number of results to return per page.
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 500
    paginationAsOfTime:
      name: pagination.as_of_time
      in: query
      description: RFC3339 timestamp to return results as they were at a specific point in time (time-travel query).
      schema:
        type: string
        format: date-time
    paginationPage:
      name: pagination.page
      in: query
      description: Page number for paginated results, starting from 1.
      schema:
        type: string
    clusterId:
      name: cluster_id
      in: path
      required: true
      description: Unique identifier of the CockroachDB Cloud cluster.
      schema:
        type: string
    paginationSortOrder:
      name: pagination.sort_order
      in: query
      description: Sort direction for paginated results. Accepted values are ASC and DESC.
      schema:
        type: string
        enum:
        - ASC
        - DESC
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication. Generate a token in the CockroachDB Cloud Console under Organization Settings > API Access.
externalDocs:
  description: CockroachDB Cloud API Documentation
  url: https://www.cockroachlabs.com/docs/cockroachcloud/cloud-api