Cockroach Labs 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/cockroach-labs-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

cockroach-labs-folders-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cockroach Labs Folders API
  version: '1.0'
  description: 'Operations tagged Folders across 2 of this provider''s published API definitions: cockroach-labs-cloud-api-openapi.yml, cockroach-labs-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://cockroachlabs.cloud
  description: CockroachDB Cloud Production Server
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'
      security:
      - bearerAuth: []
    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'
      security:
      - bearerAuth: []
    servers:
    - url: https://cockroachlabs.cloud
      description: CockroachDB Cloud Production Server
  /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'
      security:
      - bearerAuth: []
    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'
      security:
      - bearerAuth: []
    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'
      security:
      - bearerAuth: []
    servers:
    - url: https://cockroachlabs.cloud
      description: CockroachDB Cloud Production Server
  /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'
      security:
      - bearerAuth: []
    servers:
    - url: https://cockroachlabs.cloud
      description: CockroachDB Cloud Production Server
components:
  parameters:
    folderId:
      name: folder_id
      in: path
      required: true
      description: Unique identifier of the folder.
      schema:
        type: string
    paginationPage:
      name: pagination.page
      in: query
      description: Page number for paginated results, starting from 1.
      schema:
        type: string
    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
    paginationLimit:
      name: pagination.limit
      in: query
      description: Maximum number of results to return per page.
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 500
    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
  responses:
    Unauthorized:
      description: Authentication credentials are missing or invalid.
      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'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    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.
    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.
    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
    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'
    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.
    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
    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.
    Any:
      description: "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nIn its binary encoding, an `Any` is an ordinary message; but in other wire\nforms like JSON, it has a special encoding. The format of the type URL is\ndescribed on the `type_url` field.\n\nProtobuf APIs provide utilities to interact with `Any` values:\n\n- A 'pack' operation accepts a message and constructs a generic `Any` wrapper\n  around it.\n- An 'unpack' operation reads the content of an `Any` message, either into an\n  existing message or a new one. Unpack operations must check the type of the\n  value they unpack against the declared `type_url`.\n- An 'is' operation decides whether an `Any` contains a message of the given\n  type, i.e. whether it can 'unpack' that type.\n\nThe JSON format representation of an `Any` follows one of these cases:\n\n- For types without special-cased JSON encodings, the JSON format\n  representation of the `Any` is the same as that of the message, with an\n  additional `@type` field which contains the type URL.\n- For types with special-cased JSON encodings (typically called 'well-known'\n  types, listed in https://protobuf.dev/programming-guides/json/#any), the\n  JSON format representation has a key `@type` which contains the type URL\n  and a key `value` which contains the JSON-serialized value.\n\nThe text format representation of an `Any` is like a message with one field\nwhose name is the type URL in brackets. For example, an `Any` containing a\n`foo.Bar` message may be written `[type.googleapis.com/foo.Bar] { a: 2 }`."
      type: object
      properties:
        '@type':
          description: 'Identifies the type of the serialized Protobuf message with a URI reference

            consisting of a prefix ending in a slash and the fully-qualified type name.


            Example: type.googleapis.com/google.protobuf.StringValue


            This string must contain at least one `/` character, and the content after

            the last `/` must be the fully-qualified name of the type in canonical

            form, without a leading dot. Do not write a scheme on these URI references

            so that clients do not attempt to contact them.


            The prefix is arbitrary and Protobuf implementations are expected to

            simply strip off everything up to and including the last `/` to identify

            the type. `type.googleapis.com/` is a common default prefix that some

            legacy implementations require. This prefix does not indicate the origin of

            the type, and URIs containing it are not expected to respond to any

            requests.


            All type URL strings must be legal URI references with the additional

            restriction (for the text format) that the content of the reference

            must consist only of alphanumeric characters, percent-encoded escapes, and

            characters in the following set (not including the outer backticks):

            `/-.~_!$&()*+,;=`. Despite our allowing percent encodings, implementations

            should not unescape them to prevent confusion with existing parsers. For

            example, `type.googleapis.com%2FFoo` should be rejected.


            In the original design of `Any`, the possibility of launching a type

            resolution service at these type URLs was considered but Protobuf never

            implemented one and considers contacting these URLs to be problematic and

            a potential security issue. Do not attempt to contact type URLs.'
          type: string
      additionalProperties: {}
    FolderResourceType.Type:
      type: string
      enum:
      - FOLDER
      - CLUSTER
    Status:
      type: object
      properties:
        code:
          type: integer
          format: int32
        details:
          type: array
          items:
            $ref: '#/components/schemas/Any'
        message:
          type: string
    UpdateFolderSpecification_2:
      description: Set `parent_id` to empty string '' or 'root' to move a folder to the root level.
      type: object
      properties:
        labels:
          description: 'labels are key-value pairs used to organize and categorize resources.

            If the labels field is included in the request: Any existing labels on the folder

            that are not included will be removed, and any new labels specified will be added.

            If the labels field is omitted from the request entirely, all existing labels will

            remain unchanged.'
          type: object
          additionalProperties:
            type: string
        name:
          type: string
        parent_id:
          type: string
      example:
        name: folder_name
        parent_id: 12345678-1234-1234-1234-123456789012
    FolderResource:
      description: FolderResource describes a resource, and includes info about its lineage (parent/ancestors).
      type: object
      properties:
        labels:
          description: labels are key-value pairs used to organize and categorize resources.
          type: object
          additionalProperties:
            type: string
        name:
          description: name is the resource's name.
          type: string
        organization_id:
          description: organization_id is the id of the organization this resource belongs to.
          type: string
        parent_id:
          description: 'parent_id is the id of the resource''s parent folder.

            "root" represents a root level resource.'
          type: string
        path:
          description: path contains the ids and names of ancestors that make up the resource's lineage.
          type: array
          items:
            $ref: '#/components/schemas/PathSegment'
        resource_id:
          description: resource_id is the resource's id.
          type: string
        resource_type:
          $ref: '#/components/schemas/FolderResourceType.Type'
      required:
      - resource_id
      - resource_type
      - parent_id
      - organization_id
      - name
      - path
      - labels
      title: FolderResource
    CreateFolderRequest_2:
      type: object
      properties:
        labels:
          description: labels are key-value pairs used to organize and categorize resources.
          type: object
          additionalProperties:
            type: string
        name:
          type: string
        parent_id:
          description: 'The parent ID is a folder ID. An empty string or "root"

            will create a folder at the root level.'
          type: string
      example:
        name: folder_name
        parent_id: 12345678-1234-1234-1234-123456789012
      required:
      - name
      title: CreateFolderRequest
    ListFoldersResponse_2:
      type: object
      properties:
        folders:
          type: array
          items:
            $ref: '#/components/schemas/FolderResource'
        pagination:
          $ref: '#/components/schemas/KeysetPaginationResponse'
      required:
      - folders
    FolderResourceList:
      description: FolderResourceList contains a list of resources.
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/KeysetPaginationResponse'
        resources:
          type: array
          items:
            $ref: '#/components/schemas/FolderResource'
    KeysetPaginationResponse:
      type: object
      properties:
        next_page:
          type: string
        previous_page:
          type: string
    PathSegment:
      type: object
      properties:
        id:
          description: id is a folder id.
          type: string
        name:
          description: name is a folder name.
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication. Generate a token in the CockroachDB Cloud Console under Organization Settings > API Access.
    Bearer:
      type: http
      scheme: bearer
x-refined-from:
- cockroach-labs-cloud-api-openapi.yml
- cockroach-labs-openapi.json