PingCAP API Key API

The API Key API from PingCAP — 2 operation(s) for api key.

Operations 5

GET /apikeys List API keys #
POST /apikeys Create a new API key #
GET /apikeys/{accessKey} Get an API key #
DELETE /apikeys/{accessKey} Delete an API key #
PATCH /apikeys/{accessKey} Update an API key #

Documentation

Specifications

Other Resources

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/pingcap-api-key-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

pingcap-api-key-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: '*TiDB Cloud API is in beta.*


    # Overview


    The TiDB Cloud API is a REST interface that provides you with programmatic access to manage administrative objects within TiDB Cloud.'
  title: IAM System OPEN API Key API
  contact: {}
  version: v1beta1
servers:
- url: https://iam.tidbapi.com/v1beta1
tags:
- name: API Key
paths:
  /apikeys:
    get:
      description: Lists all API keys.
      tags:
      - API Key
      summary: List API keys
      parameters:
      - description: The ID of the project. If not specified, the project ID of the default project is used.
        name: projectId
        in: query
        schema:
          type: integer
      - description: The pagination token received from a previous [List API keys](#tag/API-Key/paths/~1apikeys/get) request. Use this token to retrieve the next page of results.
        name: pageToken
        in: query
        schema:
          type: string
      - description: The maximum number of API keys to return. If not specified, at most 100 API keys will be returned.
        name: pageSize
        in: query
        schema:
          type: integer
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.OpenApiListApiKeyRsp'
        '400':
          description: A request field is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.OpenApiError'
      x-code-samples:
      - lang: curl
        label: curl
        source: "curl --digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n  --location 'https://iam.tidbapi.com/v1beta1/apikeys'"
      operationId: getApikeys
      x-operation-id-source: derived
    post:
      description: Creates a new API key with the specified permissions and configuration.
      tags:
      - API Key
      summary: Create a new API key
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.OpenApiApiKey'
        '400':
          description: A request field is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.OpenApiError'
      x-code-samples:
      - lang: curl
        label: curl
        source: "curl --digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n  --location 'https://iam.tidbapi.com/v1beta1/apikeys' --header 'Content-Type: application/json' --data '{\n    \"displayName\": \"YOUR_API_NAME\",\n    \"role\": \"org:owner\"\n}'"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api.OpenApiCreateApiKeyReq'
        required: true
      operationId: postApikeys
      x-operation-id-source: derived
  /apikeys/{accessKey}:
    get:
      description: Retrieves the details of a specific API key using its `accessKey`.
      tags:
      - API Key
      summary: Get an API key
      parameters:
      - description: The access key of the API key.
        name: accessKey
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.OpenApiApiKey'
        '400':
          description: A request field is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.OpenApiError'
      x-code-samples:
      - lang: curl
        label: curl
        source: "curl --digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n  --location 'https://iam.tidbapi.com/v1beta1/apikeys/{YOUR_ACCESS_KEY}'"
      operationId: getApikeysByAccessKey
      x-operation-id-source: derived
    delete:
      description: Deletes an API key.
      tags:
      - API Key
      summary: Delete an API key
      parameters:
      - description: The access key of the API key to delete.
        name: accessKey
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A successful response.
        '400':
          description: A request field is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.OpenApiError'
      x-code-samples:
      - lang: curl
        label: curl
        source: "curl --digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n  --location --request DELETE 'https://iam.tidbapi.com/v1beta1/apikeys/{YOUR_ACCESS_KEY}'"
      operationId: deleteApikeysByAccessKey
      x-operation-id-source: derived
    patch:
      description: Updates an API key by modifying the specified fields.
      tags:
      - API Key
      summary: Update an API key
      parameters:
      - description: The access key of the API key to update.
        name: accessKey
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A successful response.
        '400':
          description: A request field is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.OpenApiError'
      x-code-samples:
      - lang: curl
        label: curl
        source: "curl --digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n  --location --request PATCH 'https://iam.tidbapi.com/v1beta1/apikeys/{YOUR_ACCESS_KEY}' --header 'Content-Type: application/json' --data '{\n    \"displayName\": \"YOUR_UPDATED_API_NAME\"\n}'"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api.OpenApiUpdateApiKeyReq'
        required: true
      operationId: patchApikeysByAccessKey
      x-operation-id-source: derived
components:
  schemas:
    api.OpenApiUpdateApiKeyReq:
      type: object
      properties:
        displayName:
          description: The display name of the API key.
          type: string
          example: New Key
        projectId:
          description: The project to which the API key belongs. If not set, the API key belongs to org.
          type: integer
          example: 123456
        role:
          description: "The role of API key.\n\n- If `projectId` is set to `0`, use an [organization role](https://docs.pingcap.com/tidbcloud/manage-user-access/#organization-roles):\n\n  - `org:owner`: indicates the `Organization Owner` role.\n\n  - `org:member`: indicates the `Organization Viewer` role.\n\n  - `org:billing_admin`: indicates the `Organization Billing Manager` role.\n\n  - `org:billing_viewer`: indicates the `Organization Billing Viewer` role.\n\n  - `org:audit_admin`: indicates the `Organization Console Audit Manager` role.\n\n- if `projectId` is not set to `0`, use a [project role](https://docs.pingcap.com/tidbcloud/manage-user-access/#project-roles):\n\n  - `project:owner`: indicates the `Project Owner` role.\n\n  - `project:dev`: indicates the `Project Data Access Read-Write` role.\n\n  - `project:readonly`: indicates the `Project Data Access Read-Only` role.\n\n  - `project:ctl_plane_viewer`: indicates the `Project Viewer` role."
          type: string
          example: org:owner
    api.OpenApiListApiKeyRsp:
      type: object
      properties:
        apiKeys:
          description: A list of API keys that match the query.
          type: array
          items:
            $ref: '#/components/schemas/api.OpenApiApiKey'
        nextPageToken:
          description: The token to retrieve the next page of results. Use this value as the `pageToken` parameter in the next request. This field is empty when there are no more pages.
          type: string
          example: 498c7f44-656f-4944-b455-0695faa5d4f9
    api.OpenApiError:
      type: object
      properties:
        code:
          type: string
        error: {}
        msgPrefix:
          type: string
        status:
          type: integer
    api.OpenApiApiKey:
      type: object
      properties:
        accessKey:
          description: The access key of the API key.
          type: string
          example: ABCDEFGH
        displayName:
          description: The display name of the API key.
          type: string
          example: New Key
        name:
          description: The name of the API key.
          type: string
          example: orgs/1/apiKeys/2
        role:
          description: The role of the API key.
          type: string
          example: org:owner
        secretKey:
          description: The secret key of the API key.
          type: string
          example: 498c7f44-656f-4944-b455-0695faa5d4f9
    api.OpenApiCreateApiKeyReq:
      type: object
      properties:
        displayName:
          description: The display name of API key.
          type: string
          example: New Key
        projectId:
          description: The ID of the project. If not specified, the project ID of the default project is used.
          type: integer
          example: 123456
        role:
          description: "The role of API key.\n\n- If `projectId` is set to `0`, use an [organization role](https://docs.pingcap.com/tidbcloud/manage-user-access/#organization-roles):\n\n  - `org:owner`: indicates the `Organization Owner` role.\n\n  - `org:member`: indicates the `Organization Viewer` role.\n\n  - `org:billing_admin`: indicates the `Organization Billing Manager` role.\n\n  - `org:billing_viewer`: indicates the `Organization Billing Viewer` role.\n\n  - `org:audit_admin`: indicates the `Organization Console Audit Manager` role.\n\n- if `projectId` is not set to `0`, use a [project role](https://docs.pingcap.com/tidbcloud/manage-user-access/#project-roles):\n\n  - `project:owner`: indicates the `Project Owner` role.\n\n  - `project:dev`: indicates the `Project Data Access Read-Write` role.\n\n  - `project:readonly`: indicates the `Project Data Access Read-Only` role.\n\n  - `project:ctl_plane_viewer`: indicates the `Project Viewer` role."
          type: string
          example: org:owner