TiDB Cloud Premium API

The published Swagger 2.0 contract for TiDB Cloud Premium, the v1beta2 API — Premium instance lifecycle and configuration, root passwords, CA certificates, cloud provider information, backups and backup-based restore, regions and changefeeds. 25 operations, harvested verbatim from PingCAP.

Operations 25

GET /tidbs List TiDB Cloud Premium instances #
POST /tidbs Create a TiDB Cloud Premium instance #
GET /tidbs/{tidbId} Get a TiDB Cloud Premium instance #
DELETE /tidbs/{tidbId} Delete a TiDB Cloud Premium instance #
PATCH /tidbs/{tidb.tidbId} Update a TiDB Cloud Premium instance #
POST /tidbs/{tidbId}:resetRootPassword Reset the root password of a TiDB Cloud Premium instance #
GET /tidbs/{tidbId}/cloudProviderInfo Get cloud provider information for a TiDB Cloud Premium instance #
GET /tidbs/{tidbId}/backups List backups for a TiDB Cloud Premium instance #
POST /tidbs/{tidbId}/backups Create a backup for a TiDB Cloud Premium instance #
DELETE /tidbs/{tidbId}/backups/{backupId} Delete a backup for a TiDB Cloud Premium instance #
POST /tidbs:restore Restore a TiDB Cloud Premium instance from a backup #
GET /tidbs/{tidbId}:getRestoreStatus Get the restore status for a TiDB Cloud Premium instance #
GET /tidbs/{tidbId}/caCertificateUrl Get the CA certificate download URL for a TiDB Cloud Premium instance #
GET /backups List backups #
DELETE /backups/{backupId} Delete a backup #
GET /regions List regions #
GET /changefeeds List changefeeds #
POST /changefeeds Create a changefeed #
GET /changefeeds/{changefeedId} Get a changefeed #
DELETE /changefeeds/{changefeedId} Delete a changefeed #
POST /changefeeds/{changefeedId}:editDownstreamConfig Edit changefeed downstream configuration #
POST /changefeeds/{changefeedId}:pause Pause a changefeed #
POST /changefeeds/{changefeedId}:resume Resume a changefeed #
POST /changefeeds/{changefeedId}:scale Scale a changefeed #
GET /changefeeds:listCCUs List changefeed CCU options #

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/tidb-cloud-premium-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

tidb-cloud-premium-v1beta2-openapi-original.json Raw ↑
{
  "swagger": "2.0",
  "info": {
    "title": "TiDB Cloud Premium API",
    "description": "*TiDB Cloud API is in beta.*\n\nThis API manages [TiDB Cloud Premium](https://docs.pingcap.com/tidbcloud/select-cluster-tier/#tidb-cloud-premium) instances. For more information about TiDB Cloud API, see [TiDB Cloud API Overview](https://docs.pingcap.com/api/tidb-cloud-api-overview/).\n\n# Overview\n\nThe TiDB Cloud Premium API (v1beta2) provides [REST](https://en.wikipedia.org/wiki/REST) endpoints to manage TiDB Cloud Premium instances and related resources.\n\nYou can use this API to manage the following resources:\n\n- **TiDB Cloud Premium instance**: manage the lifecycle and configuration of TiDB Cloud Premium instances, including passwords, CA certificates, and cloud provider information.\n- **Backup**: manage backups for TiDB Cloud Premium instances, including backup-based restore.\n- **Changefeed**: manage the lifecycle and configuration of TiDB Cloud Premium changefeeds.\n- **Region**: retrieve available regions for deploying TiDB Cloud Premium instances.\n\n# Get Started\n\nThis guide helps you make your first API call to the TiDB Cloud Premium API. You will learn how to authenticate a request, build a request, and interpret the response.\n\n1. Create a [TiDB Cloud account](https://tidbcloud.com/signup) if you do not already have one.\n2. In the [TiDB Cloud console](https://tidbcloud.com/), go to **Organization** > **API Keys** and create an API key. For more information, see [API key management](#section/Authentication/API-key-management).\n3. Make your first API call.\n\n\tTo get all TiDB Cloud Premium instances in your organization, run the following command in your terminal. Replace `YOUR_PUBLIC_KEY` and `YOUR_PRIVATE_KEY` with your own key values.\n\n\t```bash\n\tcurl --digest \\\n\t  --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n\t  --request GET \\\n\t  --url 'https://cloud.tidbapi.com/v1beta2/tidbs' \\\n\t  --header 'Accept: application/json'\n\t```\n\n4. The API returns a JSON list of your TiDB Cloud Premium instances. If none exist, the response contains an empty list.\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# API Changelog\n\nThis changelog lists all changes to the TiDB Cloud Premium API (v1beta2).\n\n<!-- In reverse chronological order -->\n\n## 20260908\n\n- Add the following changefeed endpoints for data replication from TiDB Cloud Premium to downstream systems, including Apache Kafka, MySQL, Amazon S3, and Alibaba Cloud OSS:\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* [Edit a changefeed](#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\t* [List changefeed CCU options](#tag/Changefeed/operation/ListChangefeedCapacityUnits)\n\n- Add the following endpoints for managing backups:\n\t* [Create a backup for a TiDB Cloud Premium instance](#tag/Backup/operation/TidbService_CreateTidbBackup)\n\n## 20260609\n\n- Add the following endpoint for managing backups:\n\t* [List backups](#tag/Backup/operation/BackupService_ListBackups)\n\t* [Delete a backup](#tag/Backup/operation/BackupService_DeleteBackup)\n\n## 20260428\n\n- Initial release of the TiDB Cloud Premium API (v1beta2), including the following resources and endpoints:\n\t* TiDB Cloud Premium instance\n\t\t* [List TiDB Cloud Premium instances](#tag/TiDB-Instance/operation/TidbService_ListTidbs)\n\t\t* [Create a TiDB Cloud Premium instance](#tag/TiDB-Instance/operation/TidbService_CreateTidb)\n\t\t* [Get a TiDB Cloud Premium instance](#tag/TiDB-Instance/operation/TidbService_GetTidb)\n\t\t* [Delete a TiDB Cloud Premium instance](#tag/TiDB-Instance/operation/TidbService_DeleteTidb)\n\t\t* [Update a TiDB Cloud Premium instance](#tag/TiDB-Instance/operation/TidbService_UpdateTidb)\n\t\t* [Reset the root password of a TiDB Cloud Premium instance](#tag/TiDB-Instance/operation/TidbService_ResetRootPassword)\n\t\t* [Get cloud provider information for a TiDB Cloud Premium instance](#tag/TiDB-Instance/operation/TidbService_GetCloudProviderInfo)\n\t\t* [Get the CA certificate download URL for a TiDB Cloud Premium instance](#tag/TiDB-Instance/operation/TidbService_GetCaCertificateDownloadUrl)\n\t* Backup\n\t\t* [List backups for a TiDB Cloud Premium instance](#tag/Backup/operation/TidbService_ListTidbBackups)\n\t\t* [Delete a backup for a TiDB Cloud Premium instance](#tag/Backup/operation/TidbService_DeleteTidbBackup)\n\t\t* [Restore a TiDB Cloud Premium instance from a backup](#tag/Backup/operation/TidbService_RestoreTidb)\n\t\t* [Get restore status for a TiDB Cloud Premium instance](#tag/Backup/operation/TidbService_GetRestoreStatus)\n\t* Region\n\t\t* [List regions](#tag/Region/operation/RegionService_ListRegions)\n",
    "version": "v1beta2"
  },
  "tags": [
    {
      "name": "TiDB Cloud Premium Instance",
      "description": "Manage the lifecycle and configuration of TiDB Cloud Premium instances, including passwords, CA certificates, and cloud provider information."
    },
    {
      "name": "Backup",
      "description": "Manage backups for TiDB Cloud Premium instances, including backup-based restore."
    },
    {
      "name": "Region",
      "description": "Retrieve available regions for deploying TiDB Cloud Premium instances."
    },
    {
      "name": "Changefeed",
      "description": "Manage the lifecycle and configuration of TiDB Cloud Premium changefeeds."
    }
  ],
  "host": "cloud.tidbapi.com",
  "basePath": "/v1beta2",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/tidbs": {
      "get": {
        "summary": "List TiDB Cloud Premium instances",
        "description": "Lists all TiDB Cloud Premium instances in your organization. You can filter results by service plan, region, name, or ID.",
        "operationId": "TidbService_ListTidbs",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2ListTidbsResponse"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "servicePlan",
            "description": "The plan of the service. If specified, only TiDB Cloud Premium instances of the specified plan are returned.\n\n- `Premium`: [TiDB Cloud Premium](https://docs.pingcap.com/tidbcloud/select-cluster-tier/#tidb-cloud-premium)",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "Premium"
            ]
          },
          {
            "name": "regionIds",
            "description": "A list of region IDs. If specified, only TiDB Cloud Premium instances in these regions are returned.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "name",
            "description": "The display name to filter by. If specified, only TiDB Cloud Premium instances whose display name contains this value are returned.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "tags",
            "description": "A list of tags. If specified, only TiDB Cloud Premium instances tagged with any of these values are returned.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "tidbIds",
            "description": "A list of TiDB Cloud Premium instance IDs. If specified, only the ones matching these IDs are returned.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "pageSize",
            "description": "The maximum number of TiDB Cloud Premium instances to return. If not specified, at most 10 will be returned. The maximum value is `100`. Values greater than `100` are set to `100`.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32",
            "default": "10"
          },
          {
            "name": "pageToken",
            "description": "The pagination token received from a previous [List TiDB Cloud Premium instances](#tag/TiDB-Instance/operation/TidbService_ListTidbs) request. Use this token to retrieve the next page of results.\n\n**Note**: When paginating, all other parameters must match the original request.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "skip",
            "description": "The number of TiDB Cloud Premium instances to skip before returning results. If the value exceeds the total number of TiDB Cloud Premium instances, the response is `200` with an empty list and no `nextPageToken`.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          }
        ],
        "tags": [
          "TiDB Cloud Premium Instance"
        ],
        "x-code-samples": [
          {
            "label": "curl",
            "lang": "curl",
            "source": "curl --location 'https://cloud.tidbapi.com/v1beta2/tidbs' \\\n--digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n--header 'Accept: application/json'"
          }
        ]
      },
      "post": {
        "summary": "Create a TiDB Cloud Premium instance",
        "description": "Creates a new TiDB Cloud Premium instance. If the `tidb.cloud/project` label is provided, the instance will be created in the specified project.",
        "operationId": "TidbService_CreateTidb",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/nextgenv1beta2Tidb"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidb",
            "description": "The TiDB Cloud Premium instance to create.",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/nextgenv1beta2Tidb"
            }
          },
          {
            "name": "validateOnly",
            "description": "If set to `true`, the request is validated but not executed. Defaults to `false`.",
            "in": "query",
            "required": false,
            "type": "boolean"
          }
        ],
        "tags": [
          "TiDB Cloud Premium Instance"
        ],
        "x-code-samples": [
          {
            "label": "curl",
            "lang": "curl",
            "source": "curl --location 'https://cloud.tidbapi.com/v1beta2/tidbs' \\\n--digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n--header 'Content-Type: application/json' \\\n--header 'Accept: application/json' \\\n--data '{\n  \"displayName\": \"my-tidb\",\n  \"regionId\": \"aws-us-west-2\",\n  \"maxRcu\": 20000,\n  \"servicePlan\": \"Premium\"\n}'"
          }
        ]
      }
    },
    "/tidbs/{tidbId}": {
      "get": {
        "summary": "Get a TiDB Cloud Premium instance",
        "description": "Retrieves details of a specific TiDB Cloud Premium instance.",
        "operationId": "TidbService_GetTidb",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/nextgenv1beta2Tidb"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "description": "The ID of the TiDB Cloud Premium instance to retrieve.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "TiDB Cloud Premium Instance"
        ],
        "x-code-samples": [
          {
            "label": "curl",
            "lang": "curl",
            "source": "curl --location 'https://cloud.tidbapi.com/v1beta2/tidbs/{tidb_id}' \\\n--digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n--header 'Accept: application/json'"
          }
        ]
      },
      "delete": {
        "summary": "Delete a TiDB Cloud Premium instance",
        "description": "Deletes a TiDB Cloud Premium instance by `tidbId`.",
        "operationId": "TidbService_DeleteTidb",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/nextgenv1beta2Tidb"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "description": "The ID of the TiDB Cloud Premium instance to delete.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "validateOnly",
            "description": "If set to `true`, the request is validated but not executed. Defaults to `false`.",
            "in": "query",
            "required": false,
            "type": "boolean"
          }
        ],
        "tags": [
          "TiDB Cloud Premium Instance"
        ],
        "x-code-samples": [
          {
            "label": "curl",
            "lang": "curl",
            "source": "curl --location --request DELETE 'https://cloud.tidbapi.com/v1beta2/tidbs/{tidb_id}' \\\n--digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n--header 'Accept: application/json'"
          }
        ]
      }
    },
    "/tidbs/{tidb.tidbId}": {
      "patch": {
        "summary": "Update a TiDB Cloud Premium instance",
        "description": "Updates the configuration of a specific TiDB Cloud Premium instance. You can modify the following fields: `displayName` and `maxRcu`.",
        "operationId": "TidbService_UpdateTidb",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/nextgenv1beta2Tidb"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidb.tidbId",
            "description": "The ID of the TiDB Cloud Premium instance to update.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "tidb",
            "description": "The TiDB Cloud Premium instance to update.",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "displayName": {
                  "type": "string",
                  "example": "foo-bar",
                  "description": "The user-defined name of the TiDB Cloud Premium instance.",
                  "maxLength": 64,
                  "minLength": 4,
                  "pattern": "^[A-Za-z0-9][-A-Za-z0-9]{2,62}[A-Za-z0-9]$"
                },
                "minRcu": {
                  "type": "string",
                  "format": "int64",
                  "description": "Deprecated: min_rcu is now automatically managed.\nAny value provided here will be ignored in favor of max(5000, max_rcu / 4).",
                  "readOnly": true
                },
                "maxRcu": {
                  "type": "string",
                  "format": "int64",
                  "description": "The maximum number of Request Capacity Units (RCUs) for the TiDB Cloud Premium instance."
                }
              },
              "title": "The TiDB Cloud Premium instance to update.",
              "required": [
                "tidb"
              ]
            }
          },
          {
            "name": "validateOnly",
            "description": "If set to `true`, the request is validated but not executed. Defaults to `false`.",
            "in": "query",
            "required": false,
            "type": "boolean"
          }
        ],
        "tags": [
          "TiDB Cloud Premium Instance"
        ],
        "x-code-samples": [
          {
            "label": "curl",
            "lang": "curl",
            "source": "curl --location --request PATCH 'https://cloud.tidbapi.com/v1beta2/tidbs/{tidb_id}' \\\n--digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n--header 'Content-Type: application/json' \\\n--header 'Accept: application/json' \\\n--data '{\n  \"displayName\": \"my-updated-tidb\",\n  \"maxRcu\": 40000\n}'"
          }
        ]
      }
    },
    "/tidbs/{tidbId}:resetRootPassword": {
      "post": {
        "summary": "Reset the root password of a TiDB Cloud Premium instance",
        "description": "Sets a new password for the TiDB Cloud Premium instance's root user. The new password is not returned in the response for security reasons, so save your password in a secure location.",
        "operationId": "TidbService_ResetRootPassword",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2ResetRootPasswordResponse"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "description": "The ID of the TiDB Cloud Premium instance for which to reset the root password.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TidbServiceResetRootPasswordBody"
            }
          }
        ],
        "tags": [
          "TiDB Cloud Premium Instance"
        ],
        "x-code-samples": [
          {
            "label": "curl",
            "lang": "curl",
            "source": "curl --location 'https://cloud.tidbapi.com/v1beta2/tidbs/{tidb_id}:resetRootPassword' \\\n--digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n--header 'Content-Type: application/json' \\\n--header 'Accept: application/json' \\\n--data '{\n  \"rootPassword\": \"your-new-password\"\n}'"
          }
        ]
      }
    },
    "/tidbs/{tidbId}/cloudProviderInfo": {
      "get": {
        "summary": "Get cloud provider information for a TiDB Cloud Premium instance",
        "description": "Retrieves the TiDB Cloud account ID and external ID for the underlying cloud infrastructure of a specific TiDB Cloud Premium instance.",
        "operationId": "TidbService_GetCloudProviderInfo",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2CloudProviderInfo"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "description": "The ID of the TiDB Cloud Premium instance for which to retrieve cloud provider information.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "TiDB Cloud Premium Instance"
        ],
        "x-code-samples": [
          {
            "label": "curl",
            "lang": "curl",
            "source": "curl --location 'https://cloud.tidbapi.com/v1beta2/tidbs/{tidb_id}/cloudProviderInfo' \\\n--digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n--header 'Accept: application/json'"
          }
        ]
      }
    },
    "/tidbs/{tidbId}/backups": {
      "get": {
        "summary": "List backups for a TiDB Cloud Premium instance",
        "description": "Lists all backups for a specific TiDB Cloud Premium instance. You can filter results by state, region, trigger type, or time range.",
        "operationId": "TidbService_ListTidbBackups",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2ListTidbBackupsResponse"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "

# --- truncated at 32 KB (180 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/tidb/refs/heads/main/openapi/_original/tidb-cloud-premium-v1beta2-openapi-original.json