{
  "opencollection": "1.0.0",
  "info": {
    "name": "CockroachDB Cloud APIKeys Databases API",
    "version": "2024-09-16"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Databases",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List databases",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://cockroachlabs.cloud/api/v1/clusters/:cluster_id/databases",
            "params": [
              {
                "name": "cluster_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the CockroachDB Cloud cluster."
              },
              {
                "name": "pagination.page",
                "value": "",
                "type": "query",
                "description": "Page number for paginated results, starting from 1."
              },
              {
                "name": "pagination.limit",
                "value": "",
                "type": "query",
                "description": "Maximum number of results to return per page."
              },
              {
                "name": "pagination.as_of_time",
                "value": "",
                "type": "query",
                "description": "RFC3339 timestamp to return results as they were at a specific point in time (time-travel query)."
              },
              {
                "name": "pagination.sort_order",
                "value": "",
                "type": "query",
                "description": "Sort direction for paginated results. Accepted values are ASC and DESC."
              }
            ]
          },
          "docs": "Returns a list of databases for the specified cluster. Supports pagination via page, limit, asOfTime, and sortOrder parameters."
        },
        {
          "info": {
            "name": "Create a database",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://cockroachlabs.cloud/api/v1/clusters/:cluster_id/databases",
            "params": [
              {
                "name": "cluster_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the CockroachDB Cloud cluster."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new database within the specified cluster. Requires CLUSTER_ADMIN role at organization, folder, or cluster scope."
        },
        {
          "info": {
            "name": "Update a database",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://cockroachlabs.cloud/api/v1/clusters/:cluster_id/databases/:name",
            "params": [
              {
                "name": "cluster_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the CockroachDB Cloud cluster."
              },
              {
                "name": "name",
                "value": "",
                "type": "path",
                "description": "Name of the database."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates the configuration of an existing database within the specified cluster. Requires CLUSTER_ADMIN role."
        },
        {
          "info": {
            "name": "Delete a database",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://cockroachlabs.cloud/api/v1/clusters/:cluster_id/databases/:name",
            "params": [
              {
                "name": "cluster_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the CockroachDB Cloud cluster."
              },
              {
                "name": "name",
                "value": "",
                "type": "path",
                "description": "Name of the database."
              }
            ]
          },
          "docs": "Deletes a database from the specified cluster by name. Requires CLUSTER_ADMIN role at organization, folder, or cluster scope."
        }
      ]
    }
  ],
  "bundled": true
}