openapi: 3.0.0 info: title: Learn Rest Api assignments gamification API version: '3.0' description: Assignment operations servers: - url: https://api-learn.ispring.com description: Main server security: - bearerAuth: [] tags: - name: gamification description: Gamification operations paths: /gamification/points: get: tags: - gamification summary: Retrieves a list of users and their gamification points operationId: GetGamificationPoints parameters: - name: userIds[] in: query required: false schema: type: array items: type: string format: uuid responses: '200': description: Success Response content: application/json: schema: type: array items: $ref: '#/components/schemas/UserPointsInfo' application/xml: schema: type: array items: $ref: '#/components/schemas/UserPointsInfo' xml: name: response wrapped: true '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/PermissionDenied' /gamification/points/award: post: tags: - gamification summary: Award points to user operationId: AwardGamificationPoints requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AwardGamificationPoints' application/xml: schema: $ref: '#/components/schemas/AwardGamificationPoints' responses: '200': description: Success Response '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/PermissionDenied' /gamification/points/withdraw: post: tags: - gamification summary: Withdraw points from user operationId: WithdrawGamificationPoints requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WithdrawGamificationPoints' application/xml: schema: $ref: '#/components/schemas/WithdrawGamificationPoints' responses: '200': description: Success Response '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/PermissionDenied' components: responses: PermissionDenied: description: Permission Denied content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' application/xml: schema: $ref: '#/components/schemas/ErrorResponse' Unauthorized: description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' application/xml: schema: $ref: '#/components/schemas/ErrorResponse' BadRequest: description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' application/xml: schema: $ref: '#/components/schemas/ErrorResponse' schemas: ErrorResponse: required: - code - message properties: code: type: integer message: type: string type: object xml: name: response AwardGamificationPoints: required: - userId - amount - reason properties: userId: type: string format: uuid amount: type: number reason: type: string type: object xml: name: request UserPointsInfo: required: - userId - points properties: userId: type: string format: uuid points: type: number type: object xml: name: userPointsInfo wrapped: true WithdrawGamificationPoints: required: - userId - amount - reason properties: userId: type: string format: uuid amount: type: number reason: type: string type: object xml: name: request securitySchemes: bearerAuth: type: http scheme: bearer