basePath: /api/v1
definitions:
  repository.CBType:
    enum:
    - 0
    - 1
    type: integer
    x-enum-varnames:
    - CBTypeCluster
    - CBTypeBranch
  repository.ClusterBranch:
    properties:
      cluster_id:
        description: |-
          cluster_id is the cluster id related to the cluster or branch.
          for cluster, it's the primary id of cluster.
          for branch, it's the main branch id of branch.
        type: integer
      encrypt_keyspace:
        description: encrypt_keyspace indicates whether the resource has enabled "Enhanced
          Encryption at Rest"
        type: boolean
      keyspace_id:
        description: keyspace_id is the keyspace id of the resource.
        type: integer
      name:
        description: name is the name of branch, for cluster it's is empty.
        type: string
      primary_id:
        description: |-
          primary_id is the primary id of cluster or branch.
          for example, cluster: 10001, branch: bran-123.
        type: string
      project_id:
        description: project_id is the project id of the resource.
        type: integer
      tenant_id:
        description: tenant_id is the tenant id of the resource.
        type: integer
      type:
        allOf:
        - $ref: '#/definitions/repository.CBType'
        description: 'type indicates the result is a cluster or a branch. 0: cluster,
          1: branch.'
    type: object
host: meta-service.tidb-admin:8080
info:
  contact: {}
  description: meta service is responsible for providing meta information of serverless
    resources.
  title: Serverless Meta Service
  version: "1.0"
paths:
  /cluster-or-branch:
    get:
      description: Get cluster or branch by primary_id or keyspace_id, either primary_id
        or keyspace_id should be provided.
      parameters:
      - description: primary id of the cluster or branch
        in: query
        name: primary_id
        type: string
      - description: keyspace id of the cluster or branch
        in: query
        name: keyspace_id
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/repository.ClusterBranch'
      summary: Get cluster or branch by primary_id or keyspace_id
swagger: "2.0"
