Cockroach Labs MetricExport API

Configure metric export integrations including AWS CloudWatch, Datadog, and Prometheus.

Business capability
Observability Management BC-4220.20

Operations 9

GET /api/v1/clusters/{cluster_id}/metricexport/cloudwatch Get CloudWatch metric export configuration #
POST /api/v1/clusters/{cluster_id}/metricexport/cloudwatch Enable CloudWatch metric export #
DELETE /api/v1/clusters/{cluster_id}/metricexport/cloudwatch Disable CloudWatch metric export #
GET /api/v1/clusters/{cluster_id}/metricexport/datadog Get Datadog metric export configuration #
POST /api/v1/clusters/{cluster_id}/metricexport/datadog Enable Datadog metric export #
DELETE /api/v1/clusters/{cluster_id}/metricexport/datadog Disable Datadog metric export #
GET /api/v1/clusters/{cluster_id}/metricexport/prometheus Get Prometheus metric export configuration #
POST /api/v1/clusters/{cluster_id}/metricexport/prometheus Enable Prometheus metric export #
DELETE /api/v1/clusters/{cluster_id}/metricexport/prometheus Disable Prometheus metric export #

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:cockroach-labs-metricexport-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-metricexport-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CockroachDB Cloud Metric Export 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: MetricExport
  description: Configure metric export integrations including AWS CloudWatch, Datadog, and Prometheus.
paths:
  /api/v1/clusters/{cluster_id}/metricexport/cloudwatch:
    get:
      operationId: GetCloudWatchMetricExportInfo
      summary: Get CloudWatch metric export configuration
      description: Retrieves the CloudWatch metric export configuration for the specified cluster.
      tags:
      - MetricExport
      parameters:
      - $ref: '#/components/parameters/clusterId'
      responses:
        '200':
          description: CloudWatch metric export configuration retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudWatchMetricExportInfo'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: EnableCloudWatchMetricExport
      summary: Enable CloudWatch metric export
      description: Enables metric export to AWS CloudWatch for the specified cluster.
      tags:
      - MetricExport
      parameters:
      - $ref: '#/components/parameters/clusterId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnableCloudWatchMetricExportRequest'
      responses:
        '200':
          description: CloudWatch metric export enabled successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudWatchMetricExportInfo'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      operationId: DeleteCloudWatchMetricExport
      summary: Disable CloudWatch metric export
      description: Disables AWS CloudWatch metric export for the specified cluster.
      tags:
      - MetricExport
      parameters:
      - $ref: '#/components/parameters/clusterId'
      responses:
        '200':
          description: CloudWatch metric export disabled successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudWatchMetricExportInfo'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /api/v1/clusters/{cluster_id}/metricexport/datadog:
    get:
      operationId: GetDatadogMetricExportInfo
      summary: Get Datadog metric export configuration
      description: Retrieves the Datadog metric export configuration for the specified cluster.
      tags:
      - MetricExport
      parameters:
      - $ref: '#/components/parameters/clusterId'
      responses:
        '200':
          description: Datadog metric export configuration retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatadogMetricExportInfo'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: EnableDatadogMetricExport
      summary: Enable Datadog metric export
      description: Enables metric export to Datadog for the specified cluster.
      tags:
      - MetricExport
      parameters:
      - $ref: '#/components/parameters/clusterId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnableDatadogMetricExportRequest'
      responses:
        '200':
          description: Datadog metric export enabled successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatadogMetricExportInfo'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      operationId: DeleteDatadogMetricExport
      summary: Disable Datadog metric export
      description: Disables Datadog metric export for the specified cluster.
      tags:
      - MetricExport
      parameters:
      - $ref: '#/components/parameters/clusterId'
      responses:
        '200':
          description: Datadog metric export disabled successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatadogMetricExportInfo'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /api/v1/clusters/{cluster_id}/metricexport/prometheus:
    get:
      operationId: GetPrometheusMetricExportInfo
      summary: Get Prometheus metric export configuration
      description: Retrieves the Prometheus metric export configuration for the specified cluster.
      tags:
      - MetricExport
      parameters:
      - $ref: '#/components/parameters/clusterId'
      responses:
        '200':
          description: Prometheus metric export configuration retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrometheusMetricExportInfo'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: EnablePrometheusMetricExport
      summary: Enable Prometheus metric export
      description: Enables Prometheus metric scraping endpoint for the specified cluster.
      tags:
      - MetricExport
      parameters:
      - $ref: '#/components/parameters/clusterId'
      responses:
        '200':
          description: Prometheus metric export enabled successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrometheusMetricExportInfo'
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      operationId: DeletePrometheusMetricExport
      summary: Disable Prometheus metric export
      description: Disables Prometheus metric export for the specified cluster.
      tags:
      - MetricExport
      parameters:
      - $ref: '#/components/parameters/clusterId'
      responses:
        '200':
          description: Prometheus metric export disabled successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrometheusMetricExportInfo'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    PrometheusMetricExportInfo:
      type: object
      description: Prometheus metric export configuration for a cluster.
      properties:
        cluster_id:
          type: string
          description: ID of the cluster this configuration applies to.
        status:
          type: string
          description: Current status of Prometheus metric export.
    DatadogMetricExportInfo:
      type: object
      description: Datadog metric export configuration for a cluster.
      properties:
        cluster_id:
          type: string
          description: ID of the cluster this configuration applies to.
        status:
          type: string
          description: Current status of Datadog metric export.
        site:
          type: string
          description: Datadog site to export metrics to.
    EnableCloudWatchMetricExportRequest:
      type: object
      description: Request body for enabling AWS CloudWatch metric export.
      required:
      - role_arn
      properties:
        role_arn:
          type: string
          description: AWS IAM role ARN to assume for CloudWatch metric publishing.
        target_region:
          type: string
          description: AWS region where metrics should be exported.
    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
    EnableDatadogMetricExportRequest:
      type: object
      description: Request body for enabling Datadog metric export.
      required:
      - api_key
      properties:
        api_key:
          type: string
          description: Datadog API key for authentication.
        site:
          type: string
          description: Datadog site endpoint (e.g. US1, EU1).
    CloudWatchMetricExportInfo:
      type: object
      description: AWS CloudWatch metric export configuration for a cluster.
      properties:
        cluster_id:
          type: string
          description: ID of the cluster this configuration applies to.
        status:
          type: string
          description: Current status of CloudWatch metric export.
        role_arn:
          type: string
          description: AWS IAM role ARN used for CloudWatch metric export.
  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'
  parameters:
    clusterId:
      name: cluster_id
      in: path
      required: true
      description: Unique identifier of the CockroachDB Cloud cluster.
      schema:
        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.
externalDocs:
  description: CockroachDB Cloud API Documentation
  url: https://www.cockroachlabs.com/docs/cockroachcloud/cloud-api