Cockroach Labs EgressRules API

Configure egress traffic rules and egress private endpoints for outbound cluster network traffic.

Operations 5

GET /api/v1/clusters/{cluster_id}/networking/egress-rules List egress rules #
POST /api/v1/clusters/{cluster_id}/networking/egress-rules Add an egress rule #
GET /api/v1/clusters/{cluster_id}/networking/egress-rules/{rule_id} Get an egress rule #
PATCH /api/v1/clusters/{cluster_id}/networking/egress-rules/{rule_id} Update an egress rule #
DELETE /api/v1/clusters/{cluster_id}/networking/egress-rules/{rule_id} Delete an egress rule #

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-egressrules-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-egressrules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CockroachDB Cloud Egress Rules 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. It enables developers and operators to create, configure, scale, and delete CockroachDB Serverless and Dedicated clusters without using the web console. The API supports cluster provisioning, node management, network authorization, customer-managed encryption keys, backup and restore, log and metric export, role management, and folder organization. Authentication is handled via bearer tokens, and the API is rate-limited to 10 requests per second per user.
  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: EgressRules
  description: Configure egress traffic rules and egress private endpoints for outbound cluster network traffic.
paths:
  /api/v1/clusters/{cluster_id}/networking/egress-rules:
    get:
      operationId: ListEgressRules
      summary: List egress rules
      description: Returns a list of egress traffic rules configured for the specified cluster. Supports pagination.
      tags:
      - EgressRules
      parameters:
      - $ref: '#/components/parameters/clusterId'
      - $ref: '#/components/parameters/paginationPage'
      - $ref: '#/components/parameters/paginationLimit'
      - $ref: '#/components/parameters/paginationAsOfTime'
      - $ref: '#/components/parameters/paginationSortOrder'
      responses:
        '200':
          description: List of egress rules returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEgressRulesResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: AddEgressRule
      summary: Add an egress rule
      description: Adds a new egress traffic rule to the cluster to permit outbound connections to specified destinations.
      tags:
      - EgressRules
      parameters:
      - $ref: '#/components/parameters/clusterId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddEgressRuleRequest'
      responses:
        '200':
          description: Egress rule added successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EgressRule'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/v1/clusters/{cluster_id}/networking/egress-rules/{rule_id}:
    get:
      operationId: GetEgressRule
      summary: Get an egress rule
      description: Retrieves details of a specific egress rule by ID for the given cluster.
      tags:
      - EgressRules
      parameters:
      - $ref: '#/components/parameters/clusterId'
      - $ref: '#/components/parameters/ruleId'
      responses:
        '200':
          description: Egress rule retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EgressRule'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: EditEgressRule
      summary: Update an egress rule
      description: Updates an existing egress rule configuration for the specified cluster.
      tags:
      - EgressRules
      parameters:
      - $ref: '#/components/parameters/clusterId'
      - $ref: '#/components/parameters/ruleId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditEgressRuleRequest'
      responses:
        '200':
          description: Egress rule updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EgressRule'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: DeleteEgressRule
      summary: Delete an egress rule
      description: Removes an egress rule from the cluster. An optional idempotency key may be supplied.
      tags:
      - EgressRules
      parameters:
      - $ref: '#/components/parameters/clusterId'
      - $ref: '#/components/parameters/ruleId'
      - name: idempotency_key
        in: query
        description: Optional key for idempotent deletion.
        schema:
          type: string
      responses:
        '200':
          description: Egress rule deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EgressRule'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    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
    EgressRule:
      type: object
      description: Represents an egress traffic rule controlling outbound connections from a CockroachDB cluster.
      properties:
        id:
          type: string
          description: Unique identifier of the egress rule.
        name:
          type: string
          description: Human-readable name of the egress rule.
        destination:
          type: string
          description: Destination hostname or CIDR for allowed outbound traffic.
        ports:
          type: array
          description: List of destination port numbers allowed by this rule.
          items:
            type: integer
        type:
          type: string
          description: Type of egress rule (FQDN or CIDR).
    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.
    EditEgressRuleRequest:
      type: object
      description: Request body for updating an egress rule.
      properties:
        name:
          type: string
          description: New name for the egress rule.
        destination:
          type: string
          description: New destination FQDN or CIDR for the rule.
        ports:
          type: array
          description: Updated list of destination ports.
          items:
            type: integer
    AddEgressRuleRequest:
      type: object
      description: Request body for adding an egress rule.
      required:
      - name
      - destination
      properties:
        name:
          type: string
          description: Name for the new egress rule.
        destination:
          type: string
          description: Destination FQDN or CIDR to allow outbound traffic to.
        ports:
          type: array
          description: List of destination ports to allow.
          items:
            type: integer
        type:
          type: string
          description: Rule type. Accepted values are FQDN and CIDR.
    ListEgressRulesResponse:
      type: object
      description: Paginated list of egress rules for a cluster.
      properties:
        rules:
          type: array
          description: Array of egress rule objects.
          items:
            $ref: '#/components/schemas/EgressRule'
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
  parameters:
    paginationPage:
      name: pagination.page
      in: query
      description: Page number for paginated results, starting from 1.
      schema:
        type: string
    clusterId:
      name: cluster_id
      in: path
      required: true
      description: Unique identifier of the CockroachDB Cloud cluster.
      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
    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
    ruleId:
      name: rule_id
      in: path
      required: true
      description: Unique identifier of the egress rule.
      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
  responses:
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    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'
  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