openapi: 3.0.1 info: title: Bytebase Auth Users API description: Bytebase exposes a Connect/gRPC API that is also served as a RESTful HTTP API via gRPC transcoding (google.api.http annotations). Every action in the Bytebase web console is backed by this API. This document models the core RESTful HTTP surface - instances, databases, projects, issues (schema change / migration), plans, rollouts, sheets, users, roles, groups, and project webhooks. Authentication uses a short-lived access token obtained by logging in with a service account; the token is supplied as a Bearer token in the Authorization header. The server URL is the base of your own self-hosted or cloud Bytebase deployment (the public demo is shown). termsOfService: https://www.bytebase.com/terms contact: name: Bytebase Support url: https://www.bytebase.com/docs/ version: v1 servers: - url: https://demo.bytebase.com/v1 description: Bytebase public demo (replace with your own deployment host) security: - bearerAuth: [] tags: - name: Users paths: /users: get: operationId: listUsers tags: - Users summary: List users. parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageToken' responses: '200': description: A page of users. content: application/json: schema: $ref: '#/components/schemas/ListUsersResponse' post: operationId: createUser tags: - Users summary: Create a user (or service account). requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/User' responses: '200': description: The created user. content: application/json: schema: $ref: '#/components/schemas/User' components: schemas: User: type: object properties: name: type: string description: Resource name, e.g. users/101. email: type: string title: type: string userType: type: string enum: - USER - SYSTEM_BOT - SERVICE_ACCOUNT state: type: string enum: - ACTIVE - DELETED ListUsersResponse: type: object properties: users: type: array items: $ref: '#/components/schemas/User' nextPageToken: type: string parameters: PageSize: name: page_size in: query schema: type: integer PageToken: name: page_token in: query schema: type: string securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: 'Access token obtained from POST /v1/auth/login using a service-account email and service key. Supplied as `Authorization: Bearer `.'