CockroachDB Folders API

Organize clusters and other resources into hierarchical folder structures within the organization.

Operations 6

GET /api/v1/folders List folders #
POST /api/v1/folders Create a folder #
GET /api/v1/folders/{folder_id} Get a folder #
PATCH /api/v1/folders/{folder_id} Update a folder #
DELETE /api/v1/folders/{folder_id} Delete a folder #
GET /api/v1/folders/{folder_id}/contents List folder contents #

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-folders-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-folders-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CockroachDB Cloud Folders 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: Folders
  description: Organize clusters and other resources into hierarchical folder structures within the organization.
paths:
  /api/v1/folders:
    get:
      operationId: ListFolders
      summary: List folders
      description: Returns a list of folders in the organization, optionally filtered by path. Supports pagination.
      tags:
      - Folders
      parameters:
      - name: path
        in: query
        description: Filter folders by path prefix.
        schema:
          type: string
      - $ref: '#/components/parameters/paginationPage'
      - $ref: '#/components/parameters/paginationLimit'
      - $ref: '#/components/parameters/paginationAsOfTime'
      - $ref: '#/components/parameters/paginationSortOrder'
      responses:
        '200':
          description: List of folders returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFoldersResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: CreateFolder
      summary: Create a folder
      description: Creates a new folder for organizing clusters and resources within the organization. Requires FOLDER_ADMIN role.
      tags:
      - Folders
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFolderRequest'
      responses:
        '200':
          description: Folder created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Folder'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/v1/folders/{folder_id}:
    get:
      operationId: GetFolder
      summary: Get a folder
      description: Retrieves details of a specific folder by its ID.
      tags:
      - Folders
      parameters:
      - $ref: '#/components/parameters/folderId'
      responses:
        '200':
          description: Folder retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Folder'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: UpdateFolder
      summary: Update a folder
      description: Updates the name or parent of an existing folder. Requires FOLDER_ADMIN or FOLDER_MOVER role.
      tags:
      - Folders
      parameters:
      - $ref: '#/components/parameters/folderId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFolderSpecification'
      responses:
        '200':
          description: Folder updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Folder'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: DeleteFolder
      summary: Delete a folder
      description: Permanently deletes a folder by ID. Requires FOLDER_ADMIN role. The folder must be empty before deletion.
      tags:
      - Folders
      parameters:
      - $ref: '#/components/parameters/folderId'
      responses:
        '200':
          description: Folder deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Folder'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /api/v1/folders/{folder_id}/contents:
    get:
      operationId: ListFolderContents
      summary: List folder contents
      description: Returns the contents of a specific folder, including clusters and sub-folders. Supports pagination.
      tags:
      - Folders
      parameters:
      - $ref: '#/components/parameters/folderId'
      - $ref: '#/components/parameters/paginationPage'
      - $ref: '#/components/parameters/paginationLimit'
      - $ref: '#/components/parameters/paginationAsOfTime'
      - $ref: '#/components/parameters/paginationSortOrder'
      responses:
        '200':
          description: Folder contents returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFolderContentsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Unauthorized:
      description: Authentication credentials are missing or 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'
    BadRequest:
      description: The request body or parameters are invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    ListFoldersResponse:
      type: object
      description: Paginated list of folders.
      properties:
        folders:
          type: array
          description: Array of folder objects.
          items:
            $ref: '#/components/schemas/Folder'
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
    ListFolderContentsResponse:
      type: object
      description: Contents of a folder including clusters and sub-folders.
      properties:
        resources:
          type: array
          description: Array of resource objects (clusters or folders).
          items:
            type: object
    CreateFolderRequest:
      type: object
      description: Request body for creating a new folder.
      required:
      - name
      properties:
        name:
          type: string
          description: Name for the new folder.
        parent_id:
          type: string
          description: Parent folder ID to nest this folder under.
    Folder:
      type: object
      description: Represents a folder used to organize clusters and resources within a CockroachDB Cloud organization.
      properties:
        resource_id:
          type: string
          description: Unique identifier of the folder.
        name:
          type: string
          description: Human-readable name of the folder.
        parent_id:
          type: string
          description: ID of the parent folder, if any.
        path:
          type: string
          description: Full path to the folder.
    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.
    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
    UpdateFolderSpecification:
      type: object
      description: Specification for updating a folder.
      properties:
        name:
          type: string
          description: New name for the folder.
        parent_id:
          type: string
          description: New parent folder ID to move the folder to.
  parameters:
    folderId:
      name: folder_id
      in: path
      required: true
      description: Unique identifier of the folder.
      schema:
        type: string
    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
    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