Cockroach Labs · Capability

CockroachDB Cloud API — BackupRestore

CockroachDB Cloud API — BackupRestore. 6 operations. Lead operation: List backups. Self-contained Naftiko capability covering one Cockroach Labs business surface.

Run with Naftiko Cockroach LabsBackupRestore

What You Can Do

GET
Listbackups — List backups
/v1/api/v1/clusters/{cluster-id}/backups
GET
Getbackupconfiguration — Get backup configuration
/v1/api/v1/clusters/{cluster-id}/backups-config
PATCH
Updatebackupconfiguration — Update backup configuration
/v1/api/v1/clusters/{cluster-id}/backups-config
GET
Listrestores — List restores
/v1/api/v1/clusters/{cluster-id}/restores
POST
Createrestore — Create a restore
/v1/api/v1/clusters/{cluster-id}/restores
GET
Getrestore — Get a restore
/v1/api/v1/clusters/{cluster-id}/restores/{restore-id}

MCP Tools

list-backups

List backups

read-only idempotent
get-backup-configuration

Get backup configuration

read-only idempotent
update-backup-configuration

Update backup configuration

idempotent
list-restores

List restores

read-only idempotent
create-restore

Create a restore

get-restore

Get a restore

read-only idempotent

Capability Spec

cloud-backuprestore.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: CockroachDB Cloud API — BackupRestore
  description: 'CockroachDB Cloud API — BackupRestore. 6 operations. Lead operation: List backups. Self-contained Naftiko
    capability covering one Cockroach Labs business surface.'
  tags:
  - Cockroach Labs
  - BackupRestore
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    COCKROACH_LABS_API_KEY: COCKROACH_LABS_API_KEY
capability:
  consumes:
  - type: http
    namespace: cloud-backuprestore
    baseUri: https://cockroachlabs.cloud
    description: CockroachDB Cloud API — BackupRestore business capability. Self-contained, no shared references.
    resources:
    - name: api-v1-clusters-cluster_id-backups
      path: /api/v1/clusters/{cluster_id}/backups
      operations:
      - name: listbackups
        method: GET
        description: List backups
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: start_time
          in: query
          type: string
          description: Filter backups created at or after this RFC3339 timestamp.
        - name: end_time
          in: query
          type: string
          description: Filter backups created before this RFC3339 timestamp.
    - name: api-v1-clusters-cluster_id-backups-config
      path: /api/v1/clusters/{cluster_id}/backups-config
      operations:
      - name: getbackupconfiguration
        method: GET
        description: Get backup configuration
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatebackupconfiguration
        method: PATCH
        description: Update backup configuration
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v1-clusters-cluster_id-restores
      path: /api/v1/clusters/{cluster_id}/restores
      operations:
      - name: listrestores
        method: GET
        description: List restores
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: start_time
          in: query
          type: string
          description: Filter restores initiated at or after this RFC3339 timestamp.
        - name: end_time
          in: query
          type: string
          description: Filter restores initiated before this RFC3339 timestamp.
      - name: createrestore
        method: POST
        description: Create a restore
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v1-clusters-cluster_id-restores-restore_id
      path: /api/v1/clusters/{cluster_id}/restores/{restore_id}
      operations:
      - name: getrestore
        method: GET
        description: Get a restore
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: restore_id
          in: path
          type: string
          description: Unique identifier of the restore operation.
          required: true
    authentication:
      type: bearer
      token: '{{env.COCKROACH_LABS_API_KEY}}'
  exposes:
  - type: rest
    namespace: cloud-backuprestore-rest
    port: 8080
    description: REST adapter for CockroachDB Cloud API — BackupRestore. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/v1/clusters/{cluster-id}/backups
      name: api-v1-clusters-cluster-id-backups
      description: REST surface for api-v1-clusters-cluster_id-backups.
      operations:
      - method: GET
        name: listbackups
        description: List backups
        call: cloud-backuprestore.listbackups
        with:
          start_time: rest.start_time
          end_time: rest.end_time
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/clusters/{cluster-id}/backups-config
      name: api-v1-clusters-cluster-id-backups-config
      description: REST surface for api-v1-clusters-cluster_id-backups-config.
      operations:
      - method: GET
        name: getbackupconfiguration
        description: Get backup configuration
        call: cloud-backuprestore.getbackupconfiguration
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatebackupconfiguration
        description: Update backup configuration
        call: cloud-backuprestore.updatebackupconfiguration
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/clusters/{cluster-id}/restores
      name: api-v1-clusters-cluster-id-restores
      description: REST surface for api-v1-clusters-cluster_id-restores.
      operations:
      - method: GET
        name: listrestores
        description: List restores
        call: cloud-backuprestore.listrestores
        with:
          start_time: rest.start_time
          end_time: rest.end_time
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createrestore
        description: Create a restore
        call: cloud-backuprestore.createrestore
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/clusters/{cluster-id}/restores/{restore-id}
      name: api-v1-clusters-cluster-id-restores-restore-id
      description: REST surface for api-v1-clusters-cluster_id-restores-restore_id.
      operations:
      - method: GET
        name: getrestore
        description: Get a restore
        call: cloud-backuprestore.getrestore
        with:
          restore_id: rest.restore_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: cloud-backuprestore-mcp
    port: 9090
    transport: http
    description: MCP adapter for CockroachDB Cloud API — BackupRestore. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-backups
      description: List backups
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-backuprestore.listbackups
      with:
        start_time: tools.start_time
        end_time: tools.end_time
      outputParameters:
      - type: object
        mapping: $.
    - name: get-backup-configuration
      description: Get backup configuration
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-backuprestore.getbackupconfiguration
      outputParameters:
      - type: object
        mapping: $.
    - name: update-backup-configuration
      description: Update backup configuration
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: cloud-backuprestore.updatebackupconfiguration
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: list-restores
      description: List restores
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-backuprestore.listrestores
      with:
        start_time: tools.start_time
        end_time: tools.end_time
      outputParameters:
      - type: object
        mapping: $.
    - name: create-restore
      description: Create a restore
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: cloud-backuprestore.createrestore
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-restore
      description: Get a restore
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-backuprestore.getrestore
      with:
        restore_id: tools.restore_id
      outputParameters:
      - type: object
        mapping: $.