openapi: 3.0.0 info: description: This is a API for identity. license: name: Apache-2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Indentity info version: 0.1.6 externalDocs: description: Find out more about Swagger url: http://swagger.io servers: - url: https://{env}-sg.portal.hocvienconggiao.com variables: env: default: dev enum: - dev - prod security: - user_auth: [] tags: - description: Everything about users name: iam-users paths: /query-api/identity-service/users: get: description: Returns a single user operationId: query-users parameters: - description: The user name explode: true in: query name: username required: false schema: type: string style: form - description: The user phone number explode: true in: query name: phone required: false schema: type: string style: form - description: The user email explode: true in: query name: email required: false schema: type: string style: form - description: The user status explode: true in: query name: enabled required: false schema: type: boolean style: form - description: The number of users to skip before starting to collect the result set. explode: true in: query name: offset required: false schema: minimum: 0 type: integer style: form - description: The number of users to return. explode: true in: query name: count required: false schema: default: 20 maximum: 100 minimum: 1 type: integer style: form responses: "200": content: application/json: schema: $ref: '#/components/schemas/UserCollection' description: successful operation "400": description: Invalid ID supplied "404": description: User not found security: - user_auth: [] summary: Get users infomation tags: - query-user /query-api/identity-service/users/{id}: get: description: Returns a single user operationId: query-user-by-id parameters: - description: The user id explode: false in: path name: id required: true schema: format: uuid type: string style: simple responses: "200": content: application/json: schema: $ref: '#/components/schemas/User' description: successful operation "400": description: Invalid ID supplied "404": description: User not found security: - user_auth: [] summary: Get user infomation by id tags: - query-user /mutation-api/identity-service/users/password-update: put: description: Update user password operationId: password-update requestBody: $ref: '#/components/requestBodies/inline_object' content: application/json: schema: properties: plainPassword: type: string id: format: uuid type: string type: object required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/User' description: successful operation "405": description: Invalid input security: - user_auth: [] summary: password update tags: - mutation-user /mutation-api/identity-service/users/deactivation: post: description: Deactivate user operationId: deactivate_user requestBody: $ref: '#/components/requestBodies/inline_object_1' content: application/json: schema: properties: id: format: uuid type: string type: object required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/User' description: successful operation "405": description: Invalid input security: - user_auth: [] summary: Deactive user tags: - mutation-user /mutation-api/identity-service/users/activation: post: description: Activate user operationId: activate_user requestBody: $ref: '#/components/requestBodies/inline_object_2' content: application/json: schema: properties: id: format: uuid type: string type: object required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/User' description: successful operation "405": description: Invalid input security: - user_auth: [] summary: Activate a user tags: - mutation-user /mutation-api/identity-service/users: post: description: Create user operationId: create-user requestBody: $ref: '#/components/requestBodies/UserRequest' responses: "200": content: application/json: schema: $ref: '#/components/schemas/User' description: successful operation "405": description: Invalid input security: - user_auth: [] summary: Create user tags: - mutation-user /mutation-api/identity-service/users/{id}: delete: operationId: delete_user parameters: - description: ID of user to delete explode: false in: path name: id required: true schema: format: uuid type: string style: simple responses: "200": description: successful operation "400": description: Invalid ID supplied "404": description: User not found security: - user_auth: [] summary: Deletes a user tags: - saint put: operationId: update_user parameters: - description: ID of user to update explode: false in: path name: id required: true schema: format: uuid type: string style: simple requestBody: $ref: '#/components/requestBodies/UserRequest' responses: "200": content: application/json: schema: $ref: '#/components/schemas/User' description: successful operation "400": description: Invalid ID supplied "404": description: User not found "405": description: Validation exception security: - user_auth: [] summary: Update an existing user tags: - mutation-user components: requestBodies: UserRequest: content: application/json: schema: $ref: '#/components/schemas/User' description: User object that needs to be added to the database required: true inline_object: content: application/json: schema: $ref: '#/components/schemas/inline_object' required: true inline_object_1: content: application/json: schema: $ref: '#/components/schemas/inline_object_1' required: true inline_object_2: content: application/json: schema: $ref: '#/components/schemas/inline_object_2' required: true schemas: User: description: User info example: phone: phone groups: - null - null id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 email: email enabled: true username: username properties: id: format: uuid type: string username: type: string email: type: string phone: pattern: ^\+\d{2} .*$ type: string enabled: type: boolean groups: items: $ref: '#/components/schemas/Group' type: array required: - username title: User type: object UserCollection: example: hasMore: true users: - phone: phone groups: - null - null id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 email: email enabled: true username: username - phone: phone groups: - null - null id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 email: email enabled: true username: username properties: users: items: $ref: '#/components/schemas/User' type: array hasMore: type: boolean Group: description: The cognito user groups definition. enum: - ADMIN_GROUP - OPERATOR_GROUP - PROFESSOR_GROUP - STUDENT_GROUP - UNKNOWN title: User Group type: string inline_object: properties: plainPassword: type: string id: format: uuid type: string type: object inline_object_1: properties: id: format: uuid type: string type: object inline_object_2: properties: id: format: uuid type: string type: object securitySchemes: user_auth: bearerFormat: JWT scheme: bearer type: http