{
  "swagger": "2.0",
  "info": {
    "title": "gRPC for our DBaaS central service",
    "description": "notably uses gRPC-Gateway with OpenAPI",
    "version": "0.1"
  },
  "tags": [
    {
      "name": "UserService"
    },
    {
      "name": "TenantService"
    },
    {
      "name": "TestTokenService"
    },
    {
      "name": "OrgDomainService"
    }
  ],
  "schemes": ["https"],
  "consumes": ["application/json"],
  "produces": ["application/json"],
  "paths": {
    "/api/v1/orgs/{org_id}/users/{user_id}": {
      "delete": {
        "operationId": "DeleteUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": ["TenantService"]
      },
      "put": {
        "operationId": "UpdateUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string"
                },
                "rbac_role": {
                  "type": "string"
                }
              },
              "required": ["rbac_role"]
            }
          }
        ],
        "tags": ["TenantService"]
      }
    },
    "/api/v1/orgs/{org_id}/projects/{project_id}/users": {
      "get": {
        "operationId": "ListProjectUsers",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralUsers"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": ["TenantService"]
      },
      "post": {
        "operationId": "InviteUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                },
                "rbac_role": {
                  "type": "string"
                }
              },
              "required": ["email", "rbac_role"]
            }
          }
        ],
        "tags": ["TenantService"]
      }
    },
    "/api/v1/orgs/{org_id}/projects/{project_id}/users/{user_id}": {
      "delete": {
        "operationId": "DeleteProjectUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": ["TenantService"]
      },
      "patch": {
        "operationId": "UpdateProjectUserRole",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "rbac_role": {
                  "type": "string"
                }
              },
              "required": ["rbac_role"]
            }
          }
        ],
        "tags": ["TenantService"]
      }
    },
    "/api/v1/orgs/{org_id}/users": {
      "get": {
        "operationId": "ListUsers",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralUsers"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "roles",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "statuses",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          }
        ],
        "tags": ["TenantService"]
      },
      "post": {
        "operationId": "InviteUserToOrg",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string"
                },
                "rbac_role": {
                  "type": "string"
                }
              },
              "required": ["email", "rbac_role"]
            }
          }
        ],
        "tags": ["TenantService"]
      }
    },
    "/api/v1/auth/disable-mfa": {
      "post": {
        "operationId": "DisableMFA",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/centralDisableMfaReq"
            }
          }
        ],
        "tags": ["AuthService"]
      }
    },
    "/api/v1/auth/meta": {
      "get": {
        "operationId": "Meta",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralMetaData"
            }
          }
        },
        "tags": ["AuthService"]
      },
      "put": {
        "operationId": "UpdateMeta",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/centralUpdateMetaReq"
            }
          }
        ],
        "tags": ["AuthService"]
      }
    },
    "/api/v1/orgs/{org_id}": {
      "put": {
        "operationId": "UpdateOrganization",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/centralUpdateOrgReq"
            }
          }
        ],
        "tags": ["TenantService"]
      }
    },
    "/api/v1/orgs": {
      "get": {
        "operationId": "ListOrganizations",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralOrganizationList"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/runtimeError"
            }
          }
        },
        "tags": ["TenantService"]
      },
      "post": {
        "operationId": "Registration",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralDefaultResp"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/centralRegistrationReq"
            }
          }
        ],
        "tags": ["TenantService"]
      }
    },
    "/api/v1/orgs/verification-email": {
      "post": {
        "operationId": "Send Verification Email",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/centralSendVerificationEmailReq"
            }
          }
        ],
        "tags": ["TenantService"]
      }
    },
    "/api/v1/auth/confirm-mfa-authenticators": {
      "post": {
        "operationId": "ConfirmMfaAuthenticators",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralVerifyRsp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/centralConfirmMfaAuthenticatorsReq"
            }
          }
        ],
        "tags": ["AuthService"]
      }
    },
    "/api/v1/auth/start-enable-mfa": {
      "post": {
        "operationId": "StartEnableMFA",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralStartEnableMFARsp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/centralStartEnableMFAReq"
            }
          }
        ],
        "tags": ["AuthService"]
      }
    },
    "/api/v1/auth/verify-email-password": {
      "post": {
        "operationId": "VerifyEmailPassword",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralVerifyEmailPasswordRsp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/centralVerifyEmailPasswordReq"
            }
          }
        ],
        "tags": ["AuthService"]
      }
    },
    "/api/v1/auth/verify-otp-code": {
      "post": {
        "operationId": "VerifyOtpCode",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralVerifyRsp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/centralVerifyOtpCodeReq"
            }
          }
        ],
        "tags": ["AuthService"]
      }
    },
    "/api/v1/auth/verify-recovery-code": {
      "post": {
        "operationId": "VerifyRecoveryCode",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralVerifyRsp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/centralVerifyRecoveryCodeReq"
            }
          }
        ],
        "tags": ["AuthService"]
      }
    },
    "/api/v1/user/revoke-login-state": {
      "post": {
        "operationId": "RevokeUserLoginState",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {}
            }
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/user/scope": {
      "get": {
        "operationId": "GetUserOrgsProjects",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralGetUserOrgsProjectsResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": ["UserService"]
      }
    },
    "/api/v1/api-keys/msp": {
      "get": {
        "operationId": "CreateApiKeyForMsp",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralCreateApiKeyForMspResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": ["ApiKeyService"]
      }
    },
    "/api/v1/msp/msp-config": {
      "get": {
        "operationId": "GetMspConfig",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralGetMspConfigResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "msp_name",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": ["TenantService"]
      }
    },
    "/api/v1/orgs/{org_id}/console-apikey/create": {
      "post": {
        "operationId": "CreateConsoleApiKey",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralConsoleApiKey"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "api_key_id": {
                  "type": "string",
                  "format": "uint64"
                },
                "description": {
                  "type": "string"
                },
                "org_role": {
                  "type": "string"
                },
                "project_roles": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/centralConsoleUserRole"
                  }
                },
                "cluster_roles": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/centralConsoleUserRole"
                  }
                }
              }
            }
          }
        ],
        "tags": ["OpenAPIKeyService"]
      }
    },
    "/api/v1/orgs/{org_id}/console-apikey/update": {
      "put": {
        "operationId": "UpdateConsoleApiKey",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "api_key_id": {
                  "type": "string",
                  "format": "uint64"
                },
                "description": {
                  "type": "string"
                },
                "org_role": {
                  "type": "string"
                },
                "project_roles": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/centralConsoleUserRole"
                  }
                },
                "cluster_roles": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/centralConsoleUserRole"
                  }
                }
              }
            }
          }
        ],
        "tags": ["OpenAPIKeyService"]
      }
    },
    "/api/v1/orgs/{org_id}/console-apikeys": {
      "get": {
        "summary": "for one console interface",
        "operationId": "ListConsoleApiKeys",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralListConsoleApiKeysResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "org_roles",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "project_roles",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "cluster_id",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "cluster_roles",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": ["OpenAPIKeyService"]
      }
    },
    "/api/v1/orgs/{org_id}/console-user/assign-role": {
      "post": {
        "operationId": "AssignConsoleUserRole",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralAssignConsoleUserRoleResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "emails": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "org_role": {
                  "$ref": "#/definitions/centralConsoleUserRole"
                },
                "project_roles": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/centralConsoleUserRole"
                  }
                },
                "cluster_roles": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/centralConsoleUserRole"
                  }
                }
              }
            }
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/orgs/{org_id}/console-user/delete-all-role": {
      "post": {
        "operationId": "DeleteConsoleUserAllRole",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "user_id": {
                  "type": "string",
                  "format": "uint64"
                }
              }
            }
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/orgs/{org_id}/console-user/check-email-assigned-role": {
      "post": {
        "operationId": "CheckEmailAlreadyHasOrgRole",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralCheckEmailAlreadyHasOrgRoleResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "emails": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/orgs/{org_id}/console-user/edit-role": {
      "post": {
        "operationId": "EditConsoleUserRole",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "user_id": {
                  "type": "string",
                  "format": "uint64"
                },
                "org_role": {
                  "$ref": "#/definitions/centralConsoleUserRole"
                },
                "project_roles": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/centralConsoleUserRole"
                  }
                },
                "cluster_roles": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/centralConsoleUserRole"
                  }
                }
              }
            }
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/orgs/{org_id}/console-users": {
      "get": {
        "operationId": "ListConsoleUsers",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralListConsoleUsersResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "scope_type",
            "description": "scope_type\n\nThe scope type where users belong.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": ["ORG", "PROJECT", "TIDB"],
            "default": "ORG"
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "cluster_id",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "roles",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "statuses",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/orgs/{org_id}/msp/msp-customer": {
      "get": {
        "operationId": "GetMspCustomer",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralGetMspCustomerResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": ["TenantService"]
      }
    },
    "/api/v1/msp/services-agreement": {
      "get": {
        "operationId": "GetUserServicesAgreement",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralQueryUserServicesAgreementResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": ["UserService"]
      },
      "post": {
        "operationId": "SaveUserServicesAgreement",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/centralUserServicesAgreement"
            }
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/auth-method/valid-check": {
      "get": {
        "operationId": "CheckAuthMethod",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralCheckAuthMethodRsp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": ["OrgAuthMethodService"]
      }
    },
    "/api/v1/orgs/{org_id}/api_keys": {
      "get": {
        "operationId": "ListOpenAPIKeys",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralOpenAPIKeys"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/runtimeError"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "roles",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "public_key",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": ["OpenAPIKeyService"]
      },
      "post": {
        "operationId": "CreateOpenAPIKey",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralOpenAPIKey"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/runtimeError"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/centralCreateOpenAPIKeyReq"
            }
          }
        ],
        "tags": ["OpenAPIKeyService"]
      }
    },
    "/api/v1/orgs/{org_id}/api_keys/{api_key_id}": {
      "delete": {
        "operationId": "DeleteOpenAPIKey",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/runtimeError"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "api_key_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": ["OpenAPIKeyService"]
      },
      "patch": {
        "operationId": "UpdateOpenAPIKey",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/runtimeError"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "api_key_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/centralUpdateOpenAPIKeyReq"
            }
          }
        ],
        "tags": ["OpenAPIKeyService"]
      }
    },
    "/api/v1/orgs/{org_id}/projects/{project_id}/api_keys": {
      "get": {
        "operationId": "ListProjectOpenAPIKeys",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralOpenAPIKeys"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          }
        ],
        "tags": ["OpenAPIKeyService"]
      },
      "post": {
        "operationId": "CreateProjectOpenAPIKey",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralOpenAPIKey"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              },
              "required": ["role", "description"]
            }
          }
        ],
        "tags": ["OpenAPIKeyService"]
      }
    },
    "/api/v1/orgs/{org_id}/projects/{project_id}/api_keys/{api_key_id}": {
      "delete": {
        "operationId": "DeleteProjectOpenAPIKey",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "api_key_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": ["OpenAPIKeyService"]
      },
      "patch": {
        "operationId": "UpdateProjectOpenAPIKey",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "api_key_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              },
              "required": ["role", "description"]
            }
          }
        ],
        "tags": ["OpenAPIKeyService"]
      }
    },
    "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/sql-user/create": {
      "post": {
        "operationId": "CreateSqlUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "cluster_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "user_name": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                },
                "builtin_role": {
                  "type": "string"
                },
                "auth_method": {
                  "type": "string",
                  "title": "0:DBUser_AUTH_METHOD_UNSPECIFIED DBUser_AuthMethod = 0\n\t1:DBUser_AUTH_METHOD_PASSWORD    DBUser_AuthMethod = 1\n\t2:DBUser_AUTH_METHOD_TOKEN       DBUser_AuthMethod = 2 /"
                }
              },
              "required": ["user_name", "password", "builtin_role"]
            }
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/sql-user/delete": {
      "post": {
        "operationId": "DeleteSqlUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "cluster_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "user_name": {
                  "type": "string"
                }
              },
              "required": ["user_name"]
            }
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/sql-user/list": {
      "get": {
        "operationId": "ListSqlUsers",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralListSqlUsersResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "cluster_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/sql-user/query": {
      "get": {
        "operationId": "QuerySqlUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralQuerySqlUserResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "cluster_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "filter.user_names",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.auth_types",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.custom_roles",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.builtin_role",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.query_type",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/sql-user/update": {
      "put": {
        "operationId": "UpdateSqlUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "cluster_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "user_name": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                },
                "builtin_role": {
                  "type": "string"
                },
                "custom_role": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "auth_method": {
                  "type": "string"
                }
              },
              "required": ["user_name", "password", "builtin_role", "custom_role"]
            }
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/user/history/user-visit": {
      "get": {
        "operationId": "GetUserLastVisitHistory",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralGetUserLastVisitHistoryResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": ["UserService"]
      },
      "post": {
        "operationId": "CreateUserVisitHistory",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/centralCreateUserVisitHistoryReq"
            }
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/user/plg-on-boarding-survey/create": {
      "post": {
        "operationId": "CreatePlgOnBoardingSurvey",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/centralCreatePlgOnBoardingSurveyReq"
            }
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/user/me": {
      "get": {
        "operationId": "GetUserProfileV2",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralGetUserProfileResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": ["UserService"]
      }
    },
    "/api/v1/user/user-ext": {
      "get": {
        "operationId": "GetUserLoginExtInfo",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralGetUserLoginExtInfoResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": ["UserService"]
      }
    },
    "/api/v1/orgs/{org_id}/partner": {
      "get": {
        "operationId": "GetPartnerByCustomerId",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralGetPartnerByCustomerIdResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": ["TenantService"]
      }
    },
    "/api/v1/orgs/{org_id}/opensso": {
      "post": {
        "operationId": "OpenOrgSso",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "company_name": {
                  "type": "string"
                }
              },
              "required": ["company_name"]
            }
          }
        ],
        "tags": ["TenantService"]
      }
    },
    "/api/v1/orgs/{org_id}/domains": {
      "get": {
        "operationId": "ListDomains",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralListDomainsRsp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": ["OrgDomainService"]
      },
      "post": {
        "operationId": "AddDomain",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralOrgDomain"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "domain_name": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "tags": ["OrgDomainService"]
      }
    },
    "/api/v1/orgs/{org_id}/domains/confirm": {
      "post": {
        "operationId": "ConfirmDomains",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "domain_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uint64"
                  }
                }
              }
            }
          }
        ],
        "tags": ["OrgDomainService"]
      }
    },
    "/api/v1/orgs/{org_id}/domains/{domain_id}": {
      "delete": {
        "operationId": "DeleteDomain",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": ["OrgDomainService"]
      }
    },
    "/api/v1/orgs/{org_id}/domains/{domain_id}/verify": {
      "post": {
        "operationId": "VerifyDomain",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralOrgDomain"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": ["OrgDomainService"]
      }
    },
    "/api/v1/auth-method": {
      "get": {
        "operationId": "ListOrgActiveAuthMethods",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralListOrgActiveAuthMethodsRsp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "company_name",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": ["TenantService"]
      }
    },
    "/api/v1/orgs/{org_id}/auth-method": {
      "get": {
        "operationId": "ShowAuthMethods",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralListAuthMethodsRsp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": ["OrgAuthMethodService"]
      }
    },
    "/api/v1/orgs/{org_id}/auth-method/list": {
      "get": {
        "operationId": "ListAuthMethods",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralListOrgActiveAuthMethodsRsp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": ["OrgAuthMethodService"]
      }
    },
    "/api/v1/orgs/{org_id}/auth-method/status": {
      "post": {
        "operationId": "SetAuthMethodStatus",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              },
              "required": ["name", "type", "status"]
            }
          }
        ],
        "tags": ["OrgAuthMethodService"]
      }
    },
    "/api/v1/orgs/{org_id}/auth-method/update": {
      "post": {
        "operationId": "UpdateAuthMethod",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "allow_email_domain": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "auto_provision": {
                  "type": "boolean"
                },
                "oidc_config": {
                  "$ref": "#/definitions/centralOidcConfig"
                },
                "saml_config": {
                  "$ref": "#/definitions/centralSamlConfig"
                },
                "scim_provision": {
                  "type": "boolean"
                }
              },
              "required": ["name", "type"]
            }
          }
        ],
        "tags": ["OrgAuthMethodService"]
      }
    },
    "/api/v1/orgs/{org_id}/scim-groups": {
      "get": {
        "operationId": "ListScimGroups",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralListScimGroupsRsp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          }
        ],
        "tags": ["ScimGroupService"]
      }
    },
    "/api/v1/orgs/{org_id}/scim-groups/{id}/update-role": {
      "patch": {
        "operationId": "UpdateScimGroupRole",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "group_id": {
                  "type": "string"
                },
                "org_role": {
                  "type": "string"
                },
                "project_role": {
                  "type": "string"
                },
                "project_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uint64"
                  }
                }
              }
            }
          }
        ],
        "tags": ["ScimGroupService"]
      }
    },
    "/api/v1/orgs/{org_id}/support/create": {
      "post": {
        "operationId": "CreateJsmTicket",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralCreateJsmTicketResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/centralCreateJsmTicketReq"
            }
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/orgs/{org_id}/support/preload": {
      "get": {
        "operationId": "GetJsmTicketParamInfo",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralGetJsmTicketParamInfoResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "param_type",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/upload/orgs/{org_id}/support-attach": {
      "post": {
        "operationId": "CreateSupportAttach",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {
                "temporaryAttachmentId": {
                  "type": "string"
                },
                "fileName": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "consumes": ["multipart/form-data"],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "file": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/orgs/{org_id}/bearer-token": {
      "get": {
        "operationId": "ListBearerTokens",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralBearerTokens"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          }
        ],
        "tags": ["OrgAuthMethodService"]
      },
      "post": {
        "operationId": "CreateBearerToken",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/centralBearerToken"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "tags": ["OrgAuthMethodService"]
      }
    },
    "/login_confirm": {
      "post": {
        "operationId": "LoginConfirm",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "id_token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "tags": ["TenantService"]
      }
    },
    "/logout": {
      "get": {
        "operationId": "Logout",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "redirect_uri",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": ["UserService"]
      }
    },
    "/api/v1/orgs/{org_id}/config_feature_flag_for_provider_source": {
      "post": {
        "summary": "Temporary interface for alicoud provider source to config feature flag",
        "operationId": "ConfigFeatureFlagForProviderSource",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "provider_source": {
                  "type": "string"
                }
              },
              "required": ["provider_source"]
            }
          }
        ],
        "tags": ["TenantService"]
      }
    }
  },
  "definitions": {
    "baseBaseResp": {
      "type": "object",
      "properties": {
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "err_code": {
          "type": "string",
          "format": "int64"
        },
        "err_msg": {
          "type": "string"
        }
      }
    },
    "centralMetaData": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "runtime": {
          "type": "string"
        },
        "tenantId": {
          "type": "string",
          "format": "uint64"
        },
        "use_mfa": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "required": ["email", "runtime", "tenantId", "use_mfa"]
    },
    "centralUpdateMetaReq": {
      "type": "object",
      "properties": {
        "use_mfa": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "required": ["use_mfa"]
    },
    "centralDisableMfaReq": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        },
        "otp_code": {
          "type": "string"
        },
        "recovery_code": {
          "type": "string"
        }
      },
      "required": ["password"]
    },
    "centralConfirmMfaAuthenticatorsReq": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        },
        "otp_code": {
          "type": "string"
        }
      },
      "required": ["password", "otp_code"]
    },
    "centralStartEnableMFAReq": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        }
      },
      "required": ["password"]
    },
    "centralStartEnableMFARsp": {
      "type": "object",
      "properties": {
        "authenticator_type": {
          "type": "string"
        },
        "secret": {
          "type": "string"
        },
        "barcode_uri": {
          "type": "string"
        },
        "recovery_code": {
          "type": "string"
        },
        "base64_qrcode": {
          "type": "string"
        }
      }
    },
    "centralVerifyEmailPasswordReq": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        }
      },
      "required": ["password"]
    },
    "centralVerifyEmailPasswordRsp": {
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "msg": {
          "type": "string"
        },
        "mfa_token": {
          "type": "string"
        }
      }
    },
    "centralVerifyOtpCodeReq": {
      "type": "object",
      "properties": {
        "mfa_token": {
          "type": "string"
        },
        "otp_code": {
          "type": "string"
        }
      },
      "required": ["mfa_token", "otp_code"]
    },
    "centralVerifyRecoveryCodeReq": {
      "type": "object",
      "properties": {
        "mfa_token": {
          "type": "string"
        },
        "recovery_code": {
          "type": "string"
        }
      },
      "required": ["mfa_token", "recovery_code"]
    },
    "centralVerifyRsp": {
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "msg": {
          "type": "string"
        },
        "recovery_code": {
          "type": "string"
        }
      }
    },
    "protobufAny": {
      "type": "object",
      "properties": {
        "type_url": {
          "type": "string",
          "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `http`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `http` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `http` (or the empty scheme) might be\nused with implementation specific semantics."
        },
        "value": {
          "type": "string",
          "format": "byte",
          "description": "Must be a valid serialized protocol buffer of the above specified type."
        }
      },
      "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(\u0026foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := \u0026pb.Foo{...}\n     any, err := ptypes.MarshalAny(foo)\n     ...\n     foo := \u0026pb.Foo{}\n     if err := ptypes.UnmarshalAny(any, foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": \u003cstring\u003e,\n      \"lastName\": \u003cstring\u003e\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"
    },
    "rpcStatus": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/protobufAny"
          }
        }
      }
    },
    "centralConsoleUser": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64"
        },
        "email": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "org_role": {
          "$ref": "#/definitions/centralConsoleUserRole"
        },
        "project_roles": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralConsoleUserRole"
          }
        },
        "cluster_roles": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralConsoleUserRole"
          }
        },
        "invite_time": {
          "type": "string",
          "format": "date-time"
        },
        "login_time": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "centralConsoleApiKey": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64"
        },
        "public_key": {
          "type": "string"
        },
        "private_key": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "org_role": {
          "$ref": "#/definitions/centralConsoleUserRole"
        },
        "project_roles": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralConsoleUserRole"
          }
        },
        "cluster_roles": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralConsoleUserRole"
          }
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "updated_by": {
          "type": "string"
        }
      }
    },
    "centralConsoleUserRole": {
      "type": "object",
      "properties": {
        "scope_type": {
          "type": "string"
        },
        "scope_id": {
          "type": "string",
          "format": "uint64"
        },
        "rbac_role": {
          "type": "string"
        }
      }
    },
    "centralAssignConsoleUserRoleResp": {
      "type": "object",
      "properties": {
        "rets": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralAssignConsoleUserRoleRet"
          }
        }
      }
    },
    "centralAssignConsoleUserRoleRet": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "success": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        }
      }
    },
    "centralListConsoleApiKeysResp": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "format": "int32"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralConsoleApiKey"
          }
        }
      },
      "required": ["total", "items"]
    },
    "centralListConsoleUsersResp": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "format": "int32"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralConsoleUser"
          }
        }
      },
      "required": ["total", "items"]
    },
    "centralCheckEmailAlreadyHasOrgRoleResp": {
      "type": "object",
      "properties": {
        "hasRoleEmails": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "centralListConsoleUsersSupportScopeType": {
      "type": "string",
      "enum": ["ORG", "PROJECT", "TIDB"],
      "default": "ORG"
    },
    "centralBearerToken": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64"
        },
        "public_key": {
          "type": "string"
        },
        "secret_key": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "creator": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "centralBearerTokens": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralBearerToken"
          }
        }
      },
      "required": ["total", "items"]
    },
    "centralUser": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64"
        },
        "email": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "invite_time": {
          "type": "string",
          "format": "date-time"
        },
        "login_time": {
          "type": "string",
          "format": "date-time"
        },
        "role": {
          "type": "string"
        },
        "rbac_role": {
          "type": "string"
        }
      },
      "required": ["id", "email", "name", "status", "invite_time", "rbac_role"]
    },
    "centralUsers": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "format": "int32"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralUser"
          }
        }
      },
      "required": ["total", "items"]
    },
    "centralUpdateOrgReq": {
      "type": "object",
      "properties": {
        "org_id": {
          "type": "string",
          "format": "uint64"
        },
        "name": {
          "type": "string"
        },
        "timezone": {
          "type": "integer",
          "format": "int32"
        },
        "user_set_timezone": {
          "type": "string",
          "format": "int32"
        }
      },
      "required": ["org_id", "name", "timezone"]
    },
    "centralBaseResp": {
      "type": "object",
      "properties": {
        "err_code": {
          "type": "string",
          "format": "int64"
        },
        "err_msg": {
          "type": "string"
        }
      }
    },
    "centralDefaultResp": {
      "type": "object",
      "properties": {
        "base_resp": {
          "$ref": "#/definitions/centralBaseResp"
        }
      },
      "required": ["base_resp"]
    },
    "runtimeError": {
      "type": "object",
      "properties": {
        "error": {
          "type": "string"
        },
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/protobufAny"
          }
        }
      }
    },
    "centralRegistrationReq": {
      "type": "object",
      "properties": {
        "country": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "job": {
          "type": "string"
        },
        "company": {
          "type": "string"
        },
        "phone_number": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "accept_service": {
          "type": "boolean",
          "format": "boolean"
        },
        "recaptcha_response": {
          "type": "string"
        },
        "third_party_account_provider": {
          "type": "string"
        },
        "third_party_account_token": {
          "type": "string"
        },
        "connection_type": {
          "$ref": "#/definitions/RegistrationReqConnectionType"
        },
        "auth0_token": {
          "type": "string"
        },
        "source": {
          "$ref": "#/definitions/centralRegistrationSource"
        },
        "third_party_free_trial": {
          "type": "boolean"
        },
        "channel": {
          "type": "boolean"
        },
        "return_url": {
          "type": "string"
        }
      },
      "required": [
        "country",
        "first_name",
        "last_name",
        "email",
        "job",
        "company",
        "phone_number",
        "password",
        "accept_service",
        "recaptcha_response"
      ]
    },
    "centralRegistrationSource": {
      "type": "object",
      "properties": {
        "most_recent_referral_url": {
          "type": "string"
        },
        "website_referrer_url": {
          "type": "string"
        },
        "utm_campaign": {
          "type": "string"
        },
        "utm_content": {
          "type": "string"
        },
        "utm_medium": {
          "type": "string"
        },
        "utm_source": {
          "type": "string"
        },
        "utm_term": {
          "type": "string"
        },
        "signup_source": {
          "type": "string"
        },
        "provider_source": {
          "type": "string"
        }
      }
    },
    "RegistrationReqConnectionType": {
      "type": "string",
      "enum": ["EMAIL", "GOOGLE", "GITHUB", "MICROSOFT"],
      "default": "EMAIL"
    },
    "centralOrganization": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64"
        },
        "name": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "email": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "timezone": {
          "type": "integer",
          "format": "int32"
        },
        "status": {
          "type": "string"
        },
        "plan": {
          "type": "string"
        },
        "total_credit": {
          "type": "string",
          "format": "int64"
        },
        "remaining_credit": {
          "type": "string",
          "format": "int64"
        },
        "active_clusters_count": {
          "type": "integer",
          "format": "int64"
        },
        "has_discount": {
          "type": "boolean",
          "format": "boolean"
        },
        "discount_description": {
          "type": "string"
        },
        "discount": {
          "type": "string",
          "format": "int64"
        },
        "can_replication": {
          "type": "boolean",
          "format": "boolean"
        },
        "acknowledge_cn_policy": {
          "type": "boolean",
          "format": "boolean"
        },
        "free_clusters_count": {
          "type": "integer",
          "format": "int64"
        },
        "has_tried_dev_tier": {
          "type": "boolean",
          "format": "boolean"
        },
        "third_party_account_provider": {
          "type": "string"
        },
        "third_party_account_code": {
          "type": "string"
        },
        "whitelist_flag": {
          "type": "integer",
          "format": "int64"
        },
        "org_type": {
          "type": "string"
        },
        "company_name": {
          "type": "string"
        },
        "user_set_timezone": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "created_at",
        "email",
        "country",
        "timezone",
        "status",
        "plan",
        "total_credit",
        "remaining_credit",
        "active_clusters_count",
        "has_discount",
        "discount_description",
        "discount",
        "can_replication",
        "free_clusters_count",
        "acknowledge_cn_policy",
        "has_tried_dev_tier",
        "whitelist_flag",
        "org_type",
        "third_party_account_provider",
        "third_party_account_code",
        "user_set_timezone"
      ]
    },
    "centralOrganizationList": {
      "type": "object",
      "properties": {
        "defaultCluster": {
          "type": "string"
        },
        "isNewUser": {
          "type": "boolean"
        },
        "orgs": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralOrganization"
          }
        }
      }
    },
    "centralSendVerificationEmailReq": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "return_url": {
          "type": "string"
        }
      },
      "required": ["email"]
    },
    "centralClusterInfo": {
      "type": "object",
      "properties": {
        "cluster_id": {
          "type": "string",
          "format": "uint64"
        },
        "project_id": {
          "type": "string",
          "format": "uint64"
        },
        "org_id": {
          "type": "string",
          "format": "uint64"
        }
      }
    },
    "centralCreateApiKeyForMspResp": {
      "type": "object",
      "properties": {
        "access_key": {
          "type": "string"
        },
        "secret_key": {
          "type": "string"
        }
      }
    },
    "centralGetMspCustomerResp": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "logo_url": {
          "type": "string"
        },
        "effected_at": {
          "type": "string",
          "format": "date-time"
        },
        "website": {
          "type": "string"
        }
      }
    },
    "centralCheckAuthMethodRsp": {
      "type": "object",
      "properties": {
        "valid": {
          "type": "boolean"
        }
      }
    },
    "centralCreateUserVisitHistoryReq": {
      "type": "object",
      "properties": {
        "org_id": {
          "type": "string",
          "format": "uint64"
        },
        "project_id": {
          "type": "string",
          "format": "uint64"
        },
        "cluster_mode": {
          "type": "string"
        }
      }
    },
    "centralGetPartnerByCustomerIdResp": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "logo_url": {
          "type": "string"
        },
        "website": {
          "type": "string"
        },
        "effected_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "centralGetUserLastVisitHistoryResp": {
      "type": "object",
      "properties": {
        "org_id": {
          "type": "string",
          "format": "uint64"
        },
        "project_id": {
          "type": "string",
          "format": "uint64"
        },
        "cluster_mode": {
          "type": "string"
        }
      },
      "required": ["org_id", "project_id"]
    },
    "centralGetUserLoginExtInfoResp": {
      "type": "object",
      "properties": {
        "is_signup_user": {
          "type": "boolean"
        },
        "is_first_login": {
          "type": "boolean"
        },
        "is_show_plg_on_boarding_survey_page": {
          "type": "boolean"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "signup_source": {
          "type": "string"
        }
      }
    },
    "centralAdvertising": {
      "type": "object",
      "properties": {
        "index": {
          "type": "string"
        },
        "heading": {
          "type": "string"
        },
        "body": {
          "type": "string"
        }
      }
    },
    "centralOrgDomain": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64"
        },
        "org_id": {
          "type": "string",
          "format": "uint64"
        },
        "domain_name": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "verification_token": {
          "type": "string"
        },
        "verified_at": {
          "type": "string"
        },
        "confirmed_at": {
          "type": "string"
        },
        "confirmed_by": {
          "type": "string"
        },
        "expires_at": {
          "type": "string"
        },
        "host": {
          "type": "string"
        }
      }
    },
    "centralGetMspConfigResp": {
      "type": "object",
      "properties": {
        "logo_url": {
          "type": "string"
        },
        "advertisings": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralAdvertising"
          }
        },
        "disclaimers": {
          "type": "string"
        }
      }
    },
    "centralQueryUserServicesAgreementResp": {
      "type": "object",
      "properties": {
        "is_agree": {
          "type": "boolean"
        }
      }
    },
    "centralUserServicesAgreement": {
      "type": "object",
      "properties": {
        "org_id": {
          "type": "string",
          "format": "uint64"
        },
        "is_agree": {
          "type": "boolean"
        }
      }
    },
    "centralGetUserOrgsProjectsResp": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string"
        },
        "orgs": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralOrgInfo"
          }
        },
        "projects": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralProjectInfo"
          }
        }
      }
    },
    "centralOrgInfo": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64"
        },
        "name": {
          "type": "string"
        },
        "org_role": {
          "type": "string"
        }
      }
    },
    "centralProjectInfo": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64"
        },
        "name": {
          "type": "string"
        },
        "org_id": {
          "type": "string",
          "format": "uint64"
        },
        "project_role": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "centralGetUserProfileResp": {
      "type": "object",
      "properties": {
        "user_id": {
          "type": "string",
          "format": "uint64"
        },
        "email": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "phone_number": {
          "type": "string"
        },
        "is_impersonated_user": {
          "type": "boolean"
        },
        "orgs": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralUserProfileOrg"
          }
        },
        "projects": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralUserProfileProject"
          }
        },
        "is_new_user": {
          "type": "boolean"
        },
        "default_cluster_id": {
          "type": "string"
        },
        "default_cluster_info": {
          "$ref": "#/definitions/centralClusterInfo"
        },
        "user_created_at": {
          "type": "string"
        }
      },
      "required": ["user_id", "email", "orgs", "projects", "is_impersonated_user", "first_name", "last_name"]
    },
    "centralUserProfileOrg": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64"
        },
        "name": {
          "type": "string"
        },
        "org_type": {
          "type": "string"
        },
        "third_party_account_provider": {
          "type": "string"
        },
        "third_party_account_code": {
          "type": "string"
        },
        "company_name": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "org_tag": {
          "type": "string",
          "enum": ["personal", "msp", "msp_customer", "aws_cppo_customer", "gcp_mcpo_customer", "resale_customer"]
        },
        "country": {
          "type": "string"
        },
        "timezone": {
          "type": "integer",
          "format": "int32"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "user_set_timezone": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "org_type",
        "third_party_account_provider",
        "third_party_account_code",
        "country",
        "timezone",
        "created_at",
        "user_set_timezone"
      ]
    },
    "centralUserProfileProject": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64"
        },
        "name": {
          "type": "string"
        },
        "org_id": {
          "type": "string",
          "format": "uint64"
        },
        "is_cross_account": {
          "type": "boolean"
        },
        "aws_cmek_enabled": {
          "type": "boolean"
        },
        "type": {
          "type": "string"
        }
      },
      "required": ["id", "org_id", "name", "is_cross_account"]
    },
    "centralQuerySqlUserFilter": {
      "type": "object",
      "properties": {
        "user_names": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "auth_types": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "custom_roles": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "builtin_role": {
          "type": "string"
        },
        "query_type": {
          "type": "string"
        }
      }
    },
    "centralQuerySqlUserResp": {
      "type": "object",
      "properties": {
        "sqlUser": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralSqlUser"
          }
        },
        "users": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "roles": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "centralListSqlUsersResp": {
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralSqlUser"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "centralSqlUser": {
      "type": "object",
      "properties": {
        "user_name": {
          "type": "string"
        },
        "builtin_role": {
          "type": "string"
        },
        "custom_role": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "auth_method": {
          "type": "string"
        }
      }
    },
    "centralListScimGroupsRsp": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "group": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralScimGroup"
          }
        },
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      }
    },
    "centralOidcConfig": {
      "type": "object",
      "properties": {
        "client_id": {
          "type": "string"
        },
        "client_secret": {
          "type": "string"
        },
        "issuer_url": {
          "type": "string"
        },
        "callback_url": {
          "type": "string"
        }
      }
    },
    "centralSamlConfig": {
      "type": "object",
      "properties": {
        "metadata_url": {
          "type": "string"
        },
        "sign_on_url": {
          "type": "string"
        },
        "signing_cert": {
          "type": "string"
        }
      }
    },
    "centralScimGroup": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64"
        },
        "org_id": {
          "type": "string",
          "format": "uint64"
        },
        "group_id": {
          "type": "string"
        },
        "group_name": {
          "type": "string"
        },
        "org_role": {
          "type": "string"
        },
        "project_roles": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralScimGroupProjectRole"
          }
        },
        "members": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralScimGroupMember"
          }
        }
      }
    },
    "centralScimGroupProjectRole": {
      "type": "object",
      "properties": {
        "project_role": {
          "type": "string"
        },
        "project_id": {
          "type": "string",
          "format": "uint64"
        }
      }
    },
    "centralScimGroupMember": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string"
        },
        "display": {
          "type": "string"
        }
      }
    },
    "centralCreateOpenAPIKeyReq": {
      "type": "object",
      "properties": {
        "org_id": {
          "type": "string",
          "format": "uint64"
        },
        "role": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      },
      "required": ["org_id", "role", "description"]
    },
    "centralUpdateOpenAPIKeyReq": {
      "type": "object",
      "properties": {
        "org_id": {
          "type": "string",
          "format": "uint64"
        },
        "api_key_id": {
          "type": "string",
          "format": "uint64"
        },
        "role": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      },
      "required": ["org_id", "api_key_id", "role", "description"]
    },
    "centralOpenAPIKey": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64"
        },
        "org_id": {
          "type": "string",
          "format": "uint64"
        },
        "project_id": {
          "type": "string",
          "format": "uint64"
        },
        "public_key": {
          "type": "string"
        },
        "private_key": {
          "type": "string"
        },
        "digest": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "creator_email": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "org_id",
        "project_id",
        "public_key",
        "private_key",
        "digest",
        "role",
        "description",
        "creator_email",
        "created_at",
        "updated_at"
      ]
    },
    "centralOpenAPIKeys": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "format": "int32"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralOpenAPIKey"
          }
        }
      },
      "required": ["total", "items"]
    },
    "centralOrgAuthMethod": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "allow_email_domain": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "auto_provision": {
          "type": "boolean"
        },
        "status": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "oidc_config": {
          "$ref": "#/definitions/centralOidcConfig"
        },
        "saml_config": {
          "$ref": "#/definitions/centralSamlConfig"
        },
        "scim_provision": {
          "type": "boolean"
        }
      }
    },
    "centralListAuthMethodsRsp": {
      "type": "object",
      "properties": {
        "auth_methods": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralOrgAuthMethod"
          }
        },
        "callback_url": {
          "type": "string"
        },
        "saml_post_back_url": {
          "type": "string"
        },
        "saml_entity_id": {
          "type": "string"
        },
        "scim_connector_base_url": {
          "type": "string"
        },
        "scim_unique_identifier_field": {
          "type": "string"
        },
        "scim_supported_provisioning_actions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "centralListDomainsRsp": {
      "type": "object",
      "properties": {
        "domains": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralOrgDomain"
          }
        }
      }
    },
    "centralListOrgActiveAuthMethodsRsp": {
      "type": "object",
      "properties": {
        "auth_methods": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralOrgAuthMethod"
          }
        },
        "org_id": {
          "type": "string",
          "format": "uint64"
        },
        "org_name": {
          "type": "string"
        }
      }
    },
    "centralGetJsmTicketParamInfoResp": {
      "type": "object",
      "properties": {
        "params": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralJsmParamMapping"
          }
        },
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      }
    },
    "centralJsmParamMapping": {
      "type": "object",
      "properties": {
        "param_name": {
          "type": "string"
        },
        "kv_map": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/centralKVMap"
          }
        }
      }
    },
    "centralKVMap": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "centralCreateJsmTicketReq": {
      "type": "object",
      "properties": {
        "summary": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "severity": {
          "type": "string"
        },
        "deployment_type": {
          "type": "string"
        },
        "support_level": {
          "type": "string"
        },
        "cluster_id": {
          "type": "string",
          "format": "uint64"
        },
        "cluster_version": {
          "type": "string"
        },
        "cluster_type": {
          "type": "string"
        },
        "jsm_attachment_id": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "jsm_account_id": {
          "type": "string"
        },
        "jsm_version_id": {
          "type": "string"
        },
        "jsm_component_id": {
          "type": "string"
        },
        "jsm_env_id": {
          "type": "string"
        },
        "jsm_impact_id": {
          "type": "string"
        },
        "jsm_serverity_id": {
          "type": "string"
        },
        "jsm_org_id": {
          "type": "string"
        },
        "jsm_cluster_id": {
          "type": "string"
        },
        "jsm_cluster_type": {
          "type": "string"
        }
      }
    },
    "centralCreateJsmTicketResp": {
      "type": "object",
      "properties": {
        "jsm_id": {
          "type": "string"
        },
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      }
    },
    "centralCreatePlgOnBoardingSurveyReq": {
      "type": "object",
      "properties": {
        "whyYouWantToUseTiDB": {
          "type": "string"
        },
        "companyName": {
          "type": "string"
        },
        "companyURL": {
          "type": "string"
        },
        "role": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "usingDatabase": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "language": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "status": {
          "type": "string"
        },
        "trigger": {
          "type": "string"
        }
      }
    }
  }
}
