Download OpenAPI specification:Download
This is an early access, experimental version of the Cloud API. The interface and output is subject to change, and there may be bugs.
Sort order: Cluster name
show_inactive | boolean Default: "false" If |
pagination.start_key | string |
pagination.direction | string Default: "PAGE_DIRECTION_NEXT" Enum: "PAGE_DIRECTION_NEXT" "PAGE_DIRECTION_LAST" |
pagination.limit | integer <int32> |
pagination.time | string <date-time> |
pagination.order | string Default: "ASC" Enum: "ASC" "DESC"
|
curl --request GET \ --url 'https://cockroachlabs.cloud/api/v1/clusters?show_inactive=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'
{- "clusters": [
- {
- "id": "35c4abb2-bb66-46d7-afed-25ebef5ed2aa",
- "name": "example-cluster",
- "cockroach_version": "v21.2.4",
- "plan": "SERVERLESS",
- "cloud_provider": "GCP",
- "account_id": "",
- "state": "CREATED",
- "creator_id": "7cde0cd9-0d8a-4008-8f90-45092ce8afc1",
- "operation_status": "CLUSTER_STATUS_UNSPECIFIED",
- "config": {
- "serverless": {
- "spend_limit": 0,
- "routing_id": "example-cluster-1533"
}
}, - "regions": [
- {
- "name": "us-central1",
- "sql_dns": "free-tier7.gcp-us-central1.crdb.io",
- "ui_dns": "",
- "node_count": 0
}
], - "created_at": "2022-03-22T20:23:11.285067Z",
- "updated_at": "2022-03-22T20:23:11.879593Z",
- "deleted_at": null
}
], - "pagination": {
- "next": "string",
- "last": "string",
- "limit": 0,
- "time": "2019-08-24T14:15:22Z",
- "order": "ASC"
}
}
name required | string |
provider required | string (api.CloudProvider) Default: "CLOUD_PROVIDER_UNSPECIFIED" Enum: "CLOUD_PROVIDER_UNSPECIFIED" "GCP" "AWS"
|
required | object (CreateClusterSpecification) |
{- "name": "test-cluster",
- "provider": "GCP",
- "spec": {
- "serverless": {
- "regions": [
- "us-central1"
], - "spend_limit": 0
}
}
}
{- "id": "35c4abb2-bb66-46d7-afed-25ebef5ed2aa",
- "name": "example-cluster",
- "cockroach_version": "v21.2.4",
- "plan": "SERVERLESS",
- "cloud_provider": "GCP",
- "account_id": "",
- "state": "CREATED",
- "creator_id": "7cde0cd9-0d8a-4008-8f90-45092ce8afc1",
- "operation_status": "CLUSTER_STATUS_UNSPECIFIED",
- "config": {
- "serverless": {
- "spend_limit": 0,
- "routing_id": "example-cluster-1533"
}
}, - "regions": [
- {
- "name": "us-central1",
- "sql_dns": "free-tier7.gcp-us-central1.crdb.io",
- "ui_dns": "",
- "node_count": 0
}
], - "created_at": "2022-03-22T20:23:11.285067Z",
- "updated_at": "2022-03-22T20:23:11.879593Z",
- "deleted_at": null
}
Sort order: Distance (based on client IP address)
provider | string Default: "CLOUD_PROVIDER_UNSPECIFIED" Enum: "CLOUD_PROVIDER_UNSPECIFIED" "GCP" "AWS" Optional CloudProvider for filtering.
|
serverless | boolean Default: "false" Optional filter to only show regions available for serverless clusters. |
pagination.start_key | string |
pagination.direction | string Default: "PAGE_DIRECTION_NEXT" Enum: "PAGE_DIRECTION_NEXT" "PAGE_DIRECTION_LAST" |
pagination.limit | integer <int32> |
pagination.time | string <date-time> |
pagination.order | string Default: "ASC" Enum: "ASC" "DESC"
|
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'
{- "regions": [
- {
- "name": "string",
- "location": "string",
- "provider": "CLOUD_PROVIDER_UNSPECIFIED",
- "serverless": true,
- "distance": 0
}
], - "pagination": {
- "next": "string",
- "last": "string",
- "limit": 0,
- "time": "2019-08-24T14:15:22Z",
- "order": "ASC"
}
}
cluster_id required | string |
curl --request GET \ --url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id} \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
{- "id": "35c4abb2-bb66-46d7-afed-25ebef5ed2aa",
- "name": "example-cluster",
- "cockroach_version": "v21.2.4",
- "plan": "SERVERLESS",
- "cloud_provider": "GCP",
- "account_id": "",
- "state": "CREATED",
- "creator_id": "7cde0cd9-0d8a-4008-8f90-45092ce8afc1",
- "operation_status": "CLUSTER_STATUS_UNSPECIFIED",
- "config": {
- "serverless": {
- "spend_limit": 0,
- "routing_id": "example-cluster-1533"
}
}, - "regions": [
- {
- "name": "us-central1",
- "sql_dns": "free-tier7.gcp-us-central1.crdb.io",
- "ui_dns": "",
- "node_count": 0
}
], - "created_at": "2022-03-22T20:23:11.285067Z",
- "updated_at": "2022-03-22T20:23:11.879593Z",
- "deleted_at": null
}
cluster_id required | string |
curl --request DELETE \ --url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id} \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
{- "id": "35c4abb2-bb66-46d7-afed-25ebef5ed2aa",
- "name": "example-cluster",
- "cockroach_version": "v21.2.4",
- "plan": "SERVERLESS",
- "cloud_provider": "GCP",
- "account_id": "",
- "state": "CREATED",
- "creator_id": "7cde0cd9-0d8a-4008-8f90-45092ce8afc1",
- "operation_status": "CLUSTER_STATUS_UNSPECIFIED",
- "config": {
- "serverless": {
- "spend_limit": 0,
- "routing_id": "example-cluster-1533"
}
}, - "regions": [
- {
- "name": "us-central1",
- "sql_dns": "free-tier7.gcp-us-central1.crdb.io",
- "ui_dns": "",
- "node_count": 0
}
], - "created_at": "2022-03-22T20:23:11.285067Z",
- "updated_at": "2022-03-22T20:23:11.879593Z",
- "deleted_at": null
}
cluster_id required | string |
field_mask | string |
object (DedicatedClusterUpdateSpecification) | |
object (ServerlessClusterUpdateSpecification) |
{- "dedicated": {
- "region_nodes": {
- "us-west1": 3,
- "us-central1": 5
}, - "hardware": {
- "machine_type": "n2-standard-8"
}
}
}
{- "id": "35c4abb2-bb66-46d7-afed-25ebef5ed2aa",
- "name": "example-cluster",
- "cockroach_version": "v21.2.4",
- "plan": "SERVERLESS",
- "cloud_provider": "GCP",
- "account_id": "",
- "state": "CREATED",
- "creator_id": "7cde0cd9-0d8a-4008-8f90-45092ce8afc1",
- "operation_status": "CLUSTER_STATUS_UNSPECIFIED",
- "config": {
- "serverless": {
- "spend_limit": 0,
- "routing_id": "example-cluster-1533"
}
}, - "regions": [
- {
- "name": "us-central1",
- "sql_dns": "free-tier7.gcp-us-central1.crdb.io",
- "ui_dns": "",
- "node_count": 0
}
], - "created_at": "2022-03-22T20:23:11.285067Z",
- "updated_at": "2022-03-22T20:23:11.879593Z",
- "deleted_at": null
}
cluster_id required | string |
curl --request GET \ --url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/cmek \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
{- "status": "UNKNOWN_STATUS",
- "region_infos": [
- {
- "region": "string",
- "key_infos": [
- {
- "status": "UNKNOWN_STATUS",
- "user_message": "string",
- "spec": {
- "type": "UNKNOWN_KEY_TYPE",
- "uri": "string",
- "auth_principal": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
]
}
cluster_id required | string |
required | Array of objects (CMEKRegionSpecification) |
{- "region_specs": [
- {
- "region": "us-central1",
- "key_spec": {
- "type": "AWS_KMS",
- "uri": "arn:aws:kms:us-west-2:111122223333:key/id-of-kms-key",
- "auth_principal": "arn:aws:iam::account:role/role-name-with-path"
}
}
]
}
{- "status": "UNKNOWN_STATUS",
- "region_infos": [
- {
- "region": "string",
- "key_infos": [
- {
- "status": "UNKNOWN_STATUS",
- "user_message": "string",
- "spec": {
- "type": "UNKNOWN_KEY_TYPE",
- "uri": "string",
- "auth_principal": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
]
}
cluster_id required | string |
action required | string (CMEKCustomerAction) Default: "UNKNOWN_ACTION" Enum: "UNKNOWN_ACTION" "REVOKE" CMEKCustomerAction enumerates the actions a customer can take on a cluster that has been enabled for CMEK. |
{- "action": "REVOKE"
}
{- "status": "UNKNOWN_STATUS",
- "region_infos": [
- {
- "region": "string",
- "key_infos": [
- {
- "status": "UNKNOWN_STATUS",
- "user_message": "string",
- "spec": {
- "type": "UNKNOWN_KEY_TYPE",
- "uri": "string",
- "auth_principal": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
]
}
Sort order: CIDR address
cluster_id required | string |
pagination.start_key | string |
pagination.direction | string Default: "PAGE_DIRECTION_NEXT" Enum: "PAGE_DIRECTION_NEXT" "PAGE_DIRECTION_LAST" |
pagination.limit | integer <int32> |
pagination.time | string <date-time> |
pagination.order | string Default: "ASC" Enum: "ASC" "DESC"
|
curl --request GET \ --url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/networking/allowlist?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'
{- "allowlist": [
- {
- "cidr_ip": "192.168.1.1",
- "cidr_mask": 32,
- "ui": true,
- "sql": true,
- "name": "Example"
}
], - "propagating": true,
- "pagination": {
- "next": "string",
- "last": "string",
- "limit": 0,
- "time": "2019-08-24T14:15:22Z",
- "order": "ASC"
}
}
cluster_id required | string |
cidr_ip required | string |
cidr_mask required | integer <int32> |
ui required | boolean |
sql required | boolean |
name | string |
{- "cidr_ip": "192.168.1.1",
- "cidr_mask": 32,
- "ui": true,
- "sql": true,
- "name": "Example"
}
{- "cidr_ip": "192.168.1.1",
- "cidr_mask": 32,
- "ui": true,
- "sql": true,
- "name": "Example"
}
cluster_id required | string |
cidr_ip required | string |
cidr_mask required | integer <int32> |
curl --request DELETE \ --url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/networking/allowlist/{cidr_ip}/{cidr_mask} \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
{- "cidr_ip": "192.168.1.1",
- "cidr_mask": 32,
- "ui": true,
- "sql": true,
- "name": "Example"
}
cluster_id required | string |
entry.cidr_ip required | string |
entry.cidr_mask required | integer <int32> |
cidr_ip required | string |
cidr_mask required | integer <int32> |
ui required | boolean |
sql required | boolean |
name | string |
{- "cidr_ip": "192.168.1.1",
- "cidr_mask": 32,
- "ui": true,
- "sql": true,
- "name": "Example"
}
{- "cidr_ip": "192.168.1.1",
- "cidr_mask": 32,
- "ui": true,
- "sql": true,
- "name": "Example"
}
cluster_id required | string |
entry.cidr_ip required | string |
entry.cidr_mask required | integer <int32> |
field_mask | string |
cidr_ip required | string |
cidr_mask required | integer <int32> |
ui required | boolean |
sql required | boolean |
name | string |
{- "cidr_ip": "192.168.1.1",
- "cidr_mask": 32,
- "ui": true,
- "sql": true,
- "name": "Example"
}
{- "cidr_ip": "192.168.1.1",
- "cidr_mask": 32,
- "ui": true,
- "sql": true,
- "name": "Example"
}
Sort order: Region name, node name
cluster_id required | string |
region_name | string Optional filter to limit response to a single region. |
pagination.start_key | string |
pagination.direction | string Default: "PAGE_DIRECTION_NEXT" Enum: "PAGE_DIRECTION_NEXT" "PAGE_DIRECTION_LAST" |
pagination.limit | integer <int32> |
pagination.time | string <date-time> |
pagination.order | string Default: "ASC" Enum: "ASC" "DESC"
|
curl --request GET \ --url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/nodes?region_name=SOME_STRING_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'
{- "nodes": [
- {
- "name": "string",
- "region_name": "string",
- "status": "NODE_STATUS_UNSPECIFIED"
}
], - "pagination": {
- "next": "string",
- "last": "string",
- "limit": 0,
- "time": "2019-08-24T14:15:22Z",
- "order": "ASC"
}
}
Sort order: Username
cluster_id required | string |
pagination.start_key | string |
pagination.direction | string Default: "PAGE_DIRECTION_NEXT" Enum: "PAGE_DIRECTION_NEXT" "PAGE_DIRECTION_LAST" |
pagination.limit | integer <int32> |
pagination.time | string <date-time> |
pagination.order | string Default: "ASC" Enum: "ASC" "DESC"
|
curl --request GET \ --url 'https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/sql-users?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'
{- "users": [
- {
- "name": "string"
}
], - "pagination": {
- "next": "string",
- "last": "string",
- "limit": 0,
- "time": "2019-08-24T14:15:22Z",
- "order": "ASC"
}
}
cluster_id required | string |
name required | string |
password required | string |
{- "name": "example_username",
- "password": "example_password"
}
{- "name": "string"
}
cluster_id required | string |
name required | string |
curl --request DELETE \ --url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/sql-users/{name} \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
{- "name": "string"
}
cluster_id required | string |
name required | string |
password required | string |
{- "password": "example_new_password"
}
{- "name": "string"
}