PingCAP Changefeed API

List changefeed RCU options, list changefeeds, create a changefeed, get a changefeed, delete a changefeed, update a changefeed downstream config, pause a changefeed, resume a changefeed, and scale a changefeed.

Documentation

Specifications

Other Resources

OpenAPI Specification

pingcap-changefeed-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TiDB Cloud Dedicated Changefeed API
  description: "*TiDB Cloud API is in beta.*\n\nThis API manages [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier/#tidb-cloud-dedicated) clusters. For TiDB Cloud Starter or TiDB Cloud Essential instances, use the [TiDB Cloud Starter and Essential API](https://docs.pingcap.com/tidbcloud/api/v1beta1/serverless). For more information about TiDB Cloud API, see [TiDB Cloud API Overview](https://docs.pingcap.com/tidbcloud/api-overview/).\n\n# Overview\n\nThe TiDB Cloud API is a [REST interface](https://en.wikipedia.org/wiki/Representational_state_transfer) that provides you with programmatic access to manage clusters and related resources within TiDB Cloud.\n\nThe API has the following features:\n\n- **JSON entities.** All entities are expressed in JSON.\n- **HTTPS-only.** You can only access the API via HTTPS, ensuring all the data sent over the network is encrypted with TLS.\n- **Key-based access and digest authentication.** Before you access TiDB Cloud API, you must generate an API key. All requests are authenticated through [HTTP Digest Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication), ensuring the API key is never sent over the network.\n\n# Get Started\n\nThis guide helps you make your first API call to TiDB Cloud API. You'll learn how to authenticate a request, build a request, and interpret the response.\n\n## Prerequisites\n\nTo complete this guide, you need to perform the following tasks:\n\n- Create a [TiDB Cloud account](https://tidbcloud.com/free-trial)\n- Install [curl](https://curl.se/)\n\n## Step 1. Create an API key\n\nTo create an API key, log in to your TiDB Cloud console. Navigate to the [**API Keys**](https://tidbcloud.com/org-settings/api-keys) page of your organization, and create an API key.\n\nAn API key contains a public key and a private key. Copy and save them in a secure location. You will need to use the API key later in this guide.\n\nFor more details about creating API keys, refer to [API Key Management](#section/Authentication/API-Key-Management).\n\n## Step 2. Make your first API call\n\n### Build an API call\n\nTiDB Cloud API call consists of the following components:\n\n- **A host**. The host for TiDB Cloud API is <https://dedicated.tidbapi.com>.\n- **An API Key**. The public key and the private key are required for authentication.\n- **A request**. When submitting data to a resource via `POST`, `PATCH`, or `PUT`, you must submit your payload in JSON.\n\nIn this guide, you call the [List clusters](#tag/Cluster/operation/ClusterService_ListClusters) endpoint. For the detailed description of the endpoint, see the [API reference](#tag/Cluster/operation/ClusterService_ListClusters).\n\n### Call an API endpoint\n\nTo get all clusters in your organization, run the following command in your terminal. Remember to change `YOUR_PUBLIC_KEY` to your public key and `YOUR_PRIVATE_KEY` to your private key.\n\n```shell\ncurl --digest \\\n --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n --request GET \\\n --url 'https://dedicated.tidbapi.com/v1beta1/clusters'\n```\n\n## Step 3. Check the response\n\nAfter making the API call, if the status code in response is `200` and you see details about all clusters in your organization, your request is successful.\n\n# Authentication\n\nThe TiDB Cloud API uses [HTTP Digest Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication). It protects your private key from being sent over the network. For more details about HTTP Digest Authentication, refer to the [IETF RFC](https://datatracker.ietf.org/doc/html/rfc7616).\n\n## API key overview\n\n- The API key contains a public key and a private key, which act as the username and password required in the HTTP Digest Authentication. The private key only displays upon the key creation.\n- The API key belongs to your organization and acts as the `Organization Owner` role. You can check [permissions of owner](https://docs.pingcap.com/tidbcloud/manage-user-access#configure-member-roles).\n- You must provide the correct API key in every request. Otherwise, TiDB Cloud responds with a `401` error.\n\n## API key management\n\n### Create an API key\n\nOnly the **owner** of an organization can create an API key.\n\nTo create an API key in an organization, perform the following steps:\n\n1. In the [TiDB Cloud console](https://tidbcloud.com), switch to your target organization using the combo box in the upper-left corner.\n2. In the left navigation pane, click **Organization Settings** > **API Keys**.\n3. On the **API Keys** page, click **Create API Key**.\n4. Enter a description for your API key.\n5. Configure the role and scope for the API key. For more information about the permissions of a role, see [User roles](https://docs.pingcap.com/tidbcloud/manage-user-access/#user-roles).\n6. Click **Generate API Key**. Copy and save the public key and the private key.\n7. Make sure that you have copied and saved the private key in a secure location. The private key only displays upon the creation. After leaving this page, you will not be able to get the full private key again.\n8. Click **Done**.\n\n### View details of an API key\n\nTo view details of an API key, perform the following steps:\n\n1. In the [TiDB Cloud console](https://tidbcloud.com), switch to your target organization using the combo box in the upper-left corner.\n2. In the left navigation pane, click **Organization Settings** > **API Keys**.\n3. You can view the details of the API keys on the page.\n\n### Edit an API key\n\nOnly the **owner** of an organization can modify an API key.\n\nTo edit an API key in an organization, perform the following steps:\n\n1. In the [TiDB Cloud console](https://tidbcloud.com), switch to your target organization using the combo box in the upper-left corner.\n2. In the left navigation pane, click **Organization Settings** > **API Keys**.\n3. On the **API Keys** page, click **...** in the API key row that you want to change, and then click **Update Role**.\n4. You can update the description and role of the API key.\n5. Click **Update**.\n\n### Delete an API key\n\nOnly the **owner** of an organization can delete an API key.\n\nTo delete an API key in an organization, perform the following steps:\n\n1. In the [TiDB Cloud console](https://tidbcloud.com), switch to your target organization using the combo box in the upper-left corner.\n2. In the left navigation pane, click **Organization Settings** > **API Keys**.\n3. On the **API Keys** page, click **...** in the API key row that you want to delete, and then click **Delete**.\n4. Click **I understand, delete it.**\n\n# Rate Limiting\n\nThe TiDB Cloud API allows up to 100 requests per minute per API key. If you exceed the rate limit, the API returns a `429` error. For more quota, you can [submit a request](https://support.pingcap.com/hc/en-us/requests/new?ticket_form_id=7800003722519) to contact our support team.\n\nEach API request returns the following headers about the limit.\n\n- `X-Ratelimit-Limit-Minute`: The number of requests allowed per minute. It is 100 currently.\n- `X-Ratelimit-Remaining-Minute`: The number of remaining requests in the current minute. When it reaches `0`, the API returns a `429` error and indicates that you exceed the rate limit.\n- `X-Ratelimit-Reset`: The time in seconds at which the current rate limit resets.\n\nIf you exceed the rate limit, an error response returns like this.\n\n```\n> HTTP/2 429\n> date: Fri, 22 Jul 2022 05:28:37 GMT\n> content-type: application/json\n> content-length: 66\n> x-ratelimit-reset: 23\n> x-ratelimit-remaining-minute: 0\n> x-ratelimit-limit-minute: 100\n> x-kong-response-latency: 2\n> server: kong/2.8.1\n\n> {\"details\":[],\"code\":49900007,\"message\":\"The request exceeded the limit of 100 times per apikey per minute. For more quota, please contact us: https://support.pingcap.com/hc/en-us/requests/new?ticket_form_id=7800003722519\"}\n```\n\n# API Changelog\n\nThis changelog lists all changes to the TiDB Cloud API.\n\n<!-- In reverse chronological order -->\n\n## 20260707\n\n- Introduce the following Changefeed endpoints for managing changefeeds:\n\t* [List changefeed RCU options](#tag/Changefeed/operation/ListChangefeedRCUs)\n\t* [List changefeeds](#tag/Changefeed/operation/ListChangefeeds)\n\t* [Create a changefeed](#tag/Changefeed/operation/CreateChangefeed)\n\t* [Get a changefeed](#tag/Changefeed/operation/GetChangefeed)\n\t* [Delete a changefeed](#tag/Changefeed/operation/DeleteChangefeed)\n\t* [Update a changefeed downstream config](#tag/Changefeed/operation/EditChangefeedDownstreamConfig)\n\t* [Pause a changefeed](#tag/Changefeed/operation/PauseChangefeed)\n\t* [Resume a changefeed](#tag/Changefeed/operation/ResumeChangefeed)\n\t* [Scale a changefeed](#tag/Changefeed/operation/ScaleChangefeed)\n\n## 20251028\n\n- Introduce the following TiDB Cloud Dedicated API endpoints for managing third-party monitoring integrations:\n\t* [List integrations](#tag/Integration/operation/IntegrationService_ListIntegrations)\n\t* [Create an integration](#tag/Integration/operation/IntegrationService_CreateIntegration)\n\t* [Delete an integration](#tag/Integration/operation/IntegrationService_DeleteIntegration)\n\n## 20250812\n\n- Initial release of the TiDB Cloud Dedicated API, including the following resources and endpoints:\n\t* Cluster\n\t\t* [List clusters](#tag/Cluster/operation/ClusterService_ListClusters)\n\t\t* [Create a cluster](#tag/Cluster/operation/ClusterService_CreateCluster)\n\t\t* [Get a cluster](#tag/Cluster/operation/ClusterService_GetCluster)\n\t\t* [Delete a cluster](#tag/Cluster/operation/ClusterService_DeleteCluster)\n\t\t* [Update a cluster](#tag/Cluster/operation/ClusterService_UpdateCluster)\n\t\t* [Pause a cluster](#tag/Cluster/operation/ClusterService_PauseCluster)\n\t\t* [Resume a cluster](#tag/Cluster/operation/ClusterService_ResumeCluster)\n\t\t* [Reset the root password of a cluster](#tag/Cluster/operation/ClusterService_ResetRootPassword)\n\t\t* [List node quotas for your organization](#tag/Cluster/operation/ClusterService_ShowNodeQuota)\n\t\t* [Get log redaction policy](#tag/Cluster/operation/ClusterService_GetLogRedactionPolicy)\n\t* Region\n\t\t* [List regions](#tag/Region/operation/RegionService_ListRegions)\n\t\t* [Get a region](#tag/Region/operation/RegionService_GetRegion)\n\t\t* [List cloud providers](#tag/Region/operation/RegionService_ShowCloudProviders)\n\t\t* [List node specs](#tag/Region/operation/RegionService_ListNodeSpecs)\n\t\t* [Get a node spec](#tag/Region/operation/RegionService_GetNodeSpec)\n\t* Private Endpoint Connection\n\t\t* [Get private link service for a TiDB node group](#tag/Private-Endpoint-Connection/operation/PrivateEndpointConnectionService_GetPrivateLinkService)\n\t\t* [Create a private endpoint connection](#tag/Private-Endpoint-Connection/operation/PrivateEndpointConnectionService_CreatePrivateEndpointConnection)\n\t\t* [List private endpoint connections](#tag/Private-Endpoint-Connection/operation/PrivateEndpointConnectionService_ListPrivateEndpointConnections)\n\t\t* [Get a private endpoint connection](#tag/Private-Endpoint-Connection/operation/PrivateEndpointConnectionService_GetPrivateEndpointConnection)\n\t\t* [Delete a private endpoint connection](#tag/Private-Endpoint-Connection/operation/PrivateEndpointConnectionService_DeletePrivateEndpointConnection)\n\t* Import\n\t\t* [List import tasks](#tag/Import/operation/ListImports)\n\t\t* [Create an import task](#tag/Import/operation/CreateImport)\n\t\t* [Get an import task](#tag/Import/operation/GetImport)\n\t\t* [Cancel an import task](#tag/Import/operation/CancelImport)\n\t\n"
  version: v1beta1
servers:
- url: https://dedicated.tidbapi.com/v1beta1
tags:
- name: Changefeed
  description: List changefeed RCU options, list changefeeds, create a changefeed, get a changefeed, delete a changefeed, update a changefeed downstream config, pause a changefeed, resume a changefeed, and scale a changefeed.
paths:
  /changefeedRCUs:
    get:
      summary: List changefeed RCU options
      description: Lists the available changefeed RCU options that can be selected for a changefeed.
      operationId: ListChangefeedRCUs
      responses:
        '200':
          description: The list of available changefeed RCU options.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1beta1ListChangefeedRCUsResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
        '400':
          description: The request is invalid. Check the request parameters.
        '401':
          description: Authentication failed. Provide a valid API key.
        '403':
          description: You do not have permission to perform this operation.
        '404':
          description: The specified resource was not found.
        '429':
          description: You have exceeded the rate limit. Retry after the specified period.
        '500':
          description: An internal server error occurred. Contact support if the issue persists.
      tags:
      - Changefeed
      x-code-samples:
      - lang: curl
        source: "curl \\\n    -X GET \\\n    'https://dedicated.tidbapi.com/v1beta1/changefeedRCUs'"
        label: curl
      x-codeSamples:
      - lang: curl
        source: curl -X GET 'https://dedicated.tidbapi.com/v1beta1/changefeedRCUs'
  /changefeeds:
    get:
      summary: List changefeeds
      description: Lists the changefeeds for a cluster. Results can be filtered by downstream type and paginated using the page token.
      operationId: ListChangefeeds
      responses:
        '200':
          description: The list of changefeeds matching the query.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1beta1ListChangefeedsResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
        '400':
          description: The request is invalid. Check the request parameters.
        '401':
          description: Authentication failed. Provide a valid API key.
        '403':
          description: You do not have permission to perform this operation.
        '404':
          description: The specified resource was not found.
        '429':
          description: You have exceeded the rate limit. Retry after the specified period.
        '500':
          description: An internal server error occurred. Contact support if the issue persists.
      parameters:
      - name: clusterId
        description: The ID of the cluster to list changefeeds for.
        in: query
        required: true
        x-example: '1234567890123'
        schema:
          type: string
      - name: downstreamType
        description: The downstream type to filter by. When not specified, returns all types.
        in: query
        required: false
        schema:
          type: string
          enum:
          - DOWNSTREAM_TYPE_UNSPECIFIED
          - KAFKA
          - MYSQL
          - S3
          - GCS
          - AZURE_BLOB
          default: DOWNSTREAM_TYPE_UNSPECIFIED
      - name: pageSize
        description: The maximum number of changefeeds to return. The default value is 20.
        in: query
        required: false
        x-example: 20
        schema:
          type: integer
          format: int32
      - name: pageToken
        description: The page token from a previous ListChangefeeds response, used to retrieve the next page.
        in: query
        required: false
        schema:
          type: string
      tags:
      - Changefeed
      x-code-samples:
      - lang: curl
        source: "curl \\\n    -X GET \\\n    'https://dedicated.tidbapi.com/v1beta1/changefeeds?clusterId=12345678901234567890'"
        label: curl
      x-codeSamples:
      - lang: curl
        source: curl -X GET 'https://dedicated.tidbapi.com/v1beta1/changefeeds?clusterId=10534137955852385357'
    post:
      summary: Create a changefeed
      description: Creates a changefeed to replicate data from a TiDB cluster to a downstream system. Supports Kafka, MySQL, S3, GCS, and Azure Blob downstream types.
      operationId: CreateChangefeed
      responses:
        '200':
          description: The newly created changefeed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1beta1Changefeed'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
        '400':
          description: The request is invalid. Check the request parameters.
        '401':
          description: Authentication failed. Provide a valid API key.
        '403':
          description: You do not have permission to perform this operation.
        '404':
          description: The specified resource was not found.
        '429':
          description: You have exceeded the rate limit. Retry after the specified period.
        '500':
          description: An internal server error occurred. Contact support if the issue persists.
      tags:
      - Changefeed
      x-code-samples:
      - lang: curl
        source: "curl \\\n    -X POST \\\n    'https://dedicated.tidbapi.com/v1beta1/changefeeds' \\\n    -H 'Content-Type: application/json' \\\n    -d '{\n  \"changefeed\": {\n    \"clusterId\": \"12345678901234567890\",\n    \"name\": \"my-changefeed-s3\",\n    \"replicationCapacity\": \"4rcu\",\n    \"downstreamType\": \"S3\",\n    \"tableConfig\": {\n      \"filterRules\": [\n        \"*.*\"\n      ],\n      \"mode\": \"IGNORE_NOT_SUPPORT_TABLE\",\n      \"caseSensitive\": true\n    },\n    \"startPosition\": {\n      \"mode\": \"FROM_NOW\"\n    },\n    \"s3\": {\n      \"endpoint\": {\n        \"s3Uri\": \"s3://bucket_name/prefix/\",\n        \"authType\": \"S3_AUTH_TYPE_AK_SK\",\n        \"accessKey\": \"YOUR_ACCESS_KEY\",\n        \"secretKey\": \"YOUR_SECRET_KEY\"\n      },\n      \"dataFormat\": {\n        \"protocol\": \"PROTOCOL_CANAL_JSON\"\n      }\n    }\n  },\n  \"dryRun\": false\n}'"
        label: curl for s3
      - lang: curl
        source: "curl \\\n    -X POST \\\n    'https://dedicated.tidbapi.com/v1beta1/changefeeds' \\\n    -H 'Content-Type: application/json' \\\n    -d '{\n  \"changefeed\": {\n    \"clusterId\": \"12345678901234567890\",\n    \"name\": \"my-changefeed-mysql\",\n    \"replicationCapacity\": \"4rcu\",\n    \"downstreamType\": \"MYSQL\",\n    \"tableConfig\": {\n      \"filterRules\": [\n        \"*.*\"\n      ],\n      \"mode\": \"IGNORE_NOT_SUPPORT_TABLE\",\n      \"caseSensitive\": true\n    },\n    \"startPosition\": {\n      \"mode\": \"FROM_NOW\"\n    },\n    \"mysql\": {\n      \"connection\": {\n        \"endpoint\": \"your-mysql-host.example.com:3306\",\n        \"username\": \"your_db_user\",\n        \"password\": \"YOUR_DB_PASSWORD\"\n      }\n    }\n  },\n  \"dryRun\": false\n}'"
        label: curl for mysql
      - lang: curl
        source: "curl \\\n    -X POST \\\n    'https://dedicated.tidbapi.com/v1beta1/changefeeds' \\\n    -H 'Content-Type: application/json' \\\n    -d '{\n  \"changefeed\": {\n    \"clusterId\": \"12345678901234567890\",\n    \"name\": \"my-changefeed-kafka\",\n    \"replicationCapacity\": \"4rcu\",\n    \"downstreamType\": \"KAFKA\",\n    \"tableConfig\": {\n      \"filterRules\": [\n        \"*.*\"\n      ],\n      \"mode\": \"IGNORE_NOT_SUPPORT_TABLE\",\n      \"caseSensitive\": true\n    },\n    \"startPosition\": {\n      \"mode\": \"FROM_NOW\"\n    },\n    \"kafka\": {\n      \"broker\": {\n        \"version\": \"KAFKA_VERSION_2XX\",\n        \"brokerEndpoints\": \"your-kafka-broker.example.com:9094\"\n      },\n      \"authentication\": {\n        \"authType\": \"DISABLE\"\n      },\n      \"dataFormat\": {\n        \"protocol\": \"PROTOCOL_CANAL_JSON\"\n      },\n      \"topicPartitionConfig\": {\n        \"dispatchType\": \"DISPATCH_TYPE_ONE_TOPIC\",\n        \"defaultTopic\": \"cdc-events\",\n        \"replicationFactor\": 1,\n        \"partitionNum\": 6\n      }\n    }\n  },\n  \"dryRun\": false\n}'"
        label: curl for kafka
      x-codeSamples:
      - lang: curl
        label: curl (S3)
        source: "curl -X POST 'https://dedicated.tidbapi.com/v1beta1/changefeeds' -d '{\n  \"changefeed\": {\n    \"clusterId\": \"10449877348102958363\",\n    \"name\": \"my-changefeed-s3-aksk-02\",\n    \"replicationCapacity\": \"4rcu\",\n    \"downstreamType\": \"S3\",\n    \"tableConfig\": {\n      \"filterRules\": [\n        \"*.*\"\n      ],\n      \"mode\": \"IGNORE_NOT_SUPPORT_TABLE\",\n      \"caseSensitive\": true\n    },\n    \"startPosition\": {\n      \"mode\": \"FROM_NOW\"\n    },\n    \"s3\": {\n      \"endpoint\": {\n        \"s3Uri\": \"s3://ticdc-test/cdc-api/s3-aksk-02/\",\n        \"authType\": \"S3_AUTH_TYPE_AK_SK\",\n        \"accessKey\": \"AKIA*******************\",\n        \"secretKey\": \"********************************\"\n      },\n      \"dataFormat\": {\n        \"protocol\": \"PROTOCOL_CANAL_JSON\"\n      }\n    }\n  },\n  \"dryRun\": false\n}'"
      - lang: curl
        label: curl (MySQL)
        source: "curl -X POST 'https://dedicated.tidbapi.com/v1beta1/changefeeds' -d '{\n  \"changefeed\": {\n    \"clusterId\": \"10534137955852385357\",\n    \"name\": \"my-changefeed-mysql-public\",\n    \"replicationCapacity\": \"2rcu\",\n    \"downstreamType\": \"MYSQL\",\n    \"tableConfig\": {\n      \"filterRules\": [\n        \"*.*\"\n      ],\n      \"mode\": \"IGNORE_NOT_SUPPORT_TABLE\",\n      \"caseSensitive\": true\n    },\n    \"startPosition\": {\n      \"mode\": \"FROM_NOW\"\n    },\n    \"mysql\": {\n      \"connection\": {\n        \"endpoint\": \"127.0.0.1:3306\",\n        \"username\": \"********\",\n        \"password\": \"********\"\n      }\n    }\n  },\n  \"dryRun\": false\n}'"
      - lang: curl
        label: curl (Kafka)
        source: "curl -X POST 'https://dedicated.tidbapi.com/v1beta1/changefeeds' -d '{\n  \"changefeed\": {\n    \"clusterId\": \"10449877348102958363\",\n    \"name\": \"my-changefeed-kafka-public\",\n    \"replicationCapacity\": \"2rcu\",\n    \"downstreamType\": \"KAFKA\",\n    \"tableConfig\": {\n      \"filterRules\": [\n        \"*.*\"\n      ],\n      \"mode\": \"IGNORE_NOT_SUPPORT_TABLE\",\n      \"caseSensitive\": true\n    },\n    \"startPosition\": {\n      \"mode\": \"FROM_NOW\"\n    },\n    \"kafka\": {\n      \"broker\": {\n        \"version\": \"KAFKA_VERSION_2XX\",\n        \"brokerEndpoints\": \"0.0.0.0:9094\"\n      },\n      \"authentication\": {\n        \"authType\": \"DISABLE\"\n      },\n      \"dataFormat\": {\n        \"protocol\": \"PROTOCOL_CANAL_JSON\"\n      },\n      \"topicPartitionConfig\": {\n        \"dispatchType\": \"DISPATCH_TYPE_ONE_TOPIC\",\n        \"defaultTopic\": \"cdc-events\",\n        \"replicationFactor\": 1,\n        \"partitionNum\": 6\n      }\n    }\n  },\n  \"dryRun\": false\n}'"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v1beta1CreateChangefeedRequest'
        description: The request for creating a changefeed.
        required: true
  /changefeeds/{changefeedId}:
    get:
      summary: Get a changefeed
      description: Gets the details of a changefeed by its ID, including its state, configuration, and checkpoint information.
      operationId: GetChangefeed
      responses:
        '200':
          description: The changefeed details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1beta1Changefeed'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
        '400':
          description: The request is invalid. Check the request parameters.
        '401':
          description: Authentication failed. Provide a valid API key.
        '403':
          description: You do not have permission to perform this operation.
        '404':
          description: The specified resource was not found.
        '429':
          description: You have exceeded the rate limit. Retry after the specified period.
        '500':
          description: An internal server error occurred. Contact support if the issue persists.
      parameters:
      - name: changefeedId
        description: The ID of the changefeed to retrieve.
        in: path
        required: true
        x-example: cf-12345
        schema:
          type: string
      - name: invalidateCache
        description: Indicates whether to bypass the cache and return the real-time checkpoint information.
        in: query
        required: false
        schema:
          type: boolean
      tags:
      - Changefeed
      x-code-samples:
      - lang: curl
        source: "curl \\\n    -X GET \\\n    'https://dedicated.tidbapi.com/v1beta1/changefeeds/1234567890123456789'"
        label: curl
      x-codeSamples:
      - lang: curl
        source: curl -X GET 'https://dedicated.tidbapi.com/v1beta1/changefeeds/2068955910051614720'
    delete:
      summary: Delete a changefeed
      description: Deletes a changefeed by its ID. This operation cannot be undone. The changefeed must be in a deletable state.
      operationId: DeleteChangefeed
      responses:
        '200':
          description: The empty response indicating successful deletion.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
        '400':
          description: The request is invalid. Check the request parameters.
        '401':
          description: Authentication failed. Provide a valid API key.
        '403':
          description: You do not have permission to perform this operation.
        '404':
          description: The specified resource was not found.
        '429':
          description: You have exceeded the rate limit. Retry after the specified period.
        '500':
          description: An internal server error occurred. Contact support if the issue persists.
      parameters:
      - name: changefeedId
        description: The ID of the changefeed to delete.
        in: path
        required: true
        x-example: cf-12345
        schema:
          type: string
      tags:
      - Changefeed
      x-code-samples:
      - lang: curl
        source: "curl \\\n    -X DELETE \\\n    'https://dedicated.tidbapi.com/v1beta1/changefeeds/1234567890123456789'"
        label: curl
      x-codeSamples:
      - lang: curl
        source: curl -X DELETE 'https://dedicated.tidbapi.com/v1beta1/changefeeds/2068955910051614720'
  /changefeeds/{changefeedId}:editDownstreamConfig:
    post:
      summary: Update a changefeed downstream config
      description: Updates the mutable configuration of an existing changefeed. The changefeed must be in the PAUSED state.
      operationId: EditChangefeedDownstreamConfig
      responses:
        '200':
          description: The updated changefeed configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1beta1Changefeed'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
        '400':
          description: The request is invalid. Check the request parameters.
        '401':
          description: Authentication failed. Provide a valid API key.
        '403':
          description: You do not have permission to perform this operation.
        '404':
          description: The specified resource was not found.
        '429':
          description: You have exceeded the rate limit. Retry after the specified period.
        '500':
          description: An internal server error occurred. Contact support if the issue persists.
      parameters:
      - name: changefeedId
        description: The ID of the changefeed to update.
        in: path
        required: true
        x-example: cf-12345
        schema:
          type: string
      tags:
      - Changefeed
      x-code-samples:
      - lang: curl
        source: "curl \\\n    -X POST \\\n    'https://dedicated.tidbapi.com/v1beta1/changefeeds/1234567890123456789:editDownstreamConfig' \\\n    -H 'Content-Type: application/json' \\\n    -d '{\n  \"downstreamType\": \"S3\",\n  \"tableConfig\": {\n    \"filterRules\": [\n      \"test.*\"\n    ],\n    \"mode\": \"IGNORE_NOT_SUPPORT_TABLE\",\n    \"caseSensitive\": true\n  },\n  \"dryRun\": false\n}'"
        label: curl
      x-codeSamples:
      - lang: curl
        source: "curl -X POST 'https://dedicated.tidbapi.com/v1beta1/changefeeds/2068955910051614720:editDownstreamConfig' -d '{\n  \"downstreamType\": \"S3\",\n  \"tableConfig\": {\n    \"filterRules\": [\n      \"test.*\"\n    ],\n    \"mode\": \"IGNORE_NOT_SUPPORT_TABLE\",\n    \"caseSensitive\": true\n  },\n  \"dryRun\": false\n}'"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                dryRun:
                  type: boolean
                  example: true
                  description: Indicates whether to run dry-run validation only without applying the update.
                tableConfig:
                  description: The updated table filtering and event filter configuration.
                  allOf:
                  - $ref: '#/components/schemas/v1beta1TableConfig'
                downstreamType:
                  $ref: '#/components/schemas/v1beta1DownstreamType'
                kafka:
                  description: The updated Kafka downstream configuration.
                  allOf:
                  - $ref: '#/components/schemas/v1beta1KafkaDownstreamConfig'
                mysql:
                  description: The updated MySQL downstream configuration.
                  allOf:
                  - $ref: '#/components/schemas/v1beta1MySQLDownstreamConfig'
                s3:
                  description: The updated S3 downstream configuration.
                  allOf:
                  - $ref: '#/components/schemas/v1beta1S3DownstreamConfig'
                gcs:
                  description: The updated GCS downstream configuration.
                  allOf:
                  - $ref: '#/components/schemas/v1beta1GcsDownstreamConfig'
                azureBlob:
                  description: The updated Azure Blob downstream configuration.
                  allOf:
                  - $ref: '#/components/schemas/v1beta1AzureBlobDownstreamConfig'
              description: The request for updating a changefeed downstream configuration.
              required:
              - downstreamType
        description: The request for updating a changefeed downstream configuration.
        required: true
  /changefeeds/{changefeedId}:pause:
    post:
      summary: Pause a changefeed
      description: Pauses a running changefeed. While paused, the changefeed stops replicating data but retains its configuration and checkpoint.
      operationId: PauseChangefeed
      responses:
        '200':
          description: The empty response indicating the changefeed is pausing.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
        '400':
          description: The request is invalid. Check the request parameters.
        '401':
          description: Authentication failed. Provide a valid API key.
        '403':
          description: You do not have permission to perform this operation.
        '404':
          description: The specified resource was not found.
        '429':
          description: You have exceeded the rate limit. Retry after the speci

# --- truncated at 32 KB (73 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/pingcap/refs/heads/main/openapi/pingcap-changefeed-api-openapi.yml