basePath: /v1 definitions: database.Group: properties: createdAt: type: string deletedAt: type: string id: type: integer issuer: $ref: '#/definitions/database.User' issuerID: type: integer name: type: string permissions: items: $ref: '#/definitions/database.GroupPermission' type: array updatedAt: type: string users: items: $ref: '#/definitions/database.User' type: array type: object database.GroupPermission: properties: value: type: integer type: object database.User: properties: createdAt: type: string deletedAt: type: string email: type: string group: $ref: '#/definitions/database.Group' groupID: type: integer id: type: integer isActive: type: boolean isRequiredToSetPassword: type: boolean lastLogin: type: string passwordHash: type: string passwordLength: type: integer realName: type: string updatedAt: type: string type: object types.AuthBody: properties: email: example: john@proton.mail type: string password: example: Aasdfg1! type: string required: - email - password type: object types.Cursor: properties: count: type: integer currentPage: type: integer totalPages: type: number type: object types.JSONPagination: properties: cursor: $ref: '#/definitions/types.Cursor' data: {} type: object info: contact: name: https://peresvet.it title: System Trace API version: "1.0" paths: /auth/login: post: description: Returns pair of access and refresh tokens parameters: - description: Request body in: body name: request required: true schema: $ref: '#/definitions/types.AuthBody' produces: - application/json responses: "200": description: OK summary: Request pair of tokens tags: - auth /groups: get: description: Returns array of groups and count parameters: - description: Count of rows in: query maximum: 100 minimum: 10 name: count required: true type: integer - description: Rows to skip in: query name: offset required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/types.JSONPagination' summary: Get groups (with pagination) tags: - groups patch: description: Update group with specified data parameters: - description: Request body in: body name: request required: true schema: $ref: '#/definitions/database.Group' produces: - application/json responses: "200": description: OK summary: Update group tags: - groups post: description: Create group with specified data parameters: - description: Request body in: body name: request required: true schema: $ref: '#/definitions/database.Group' produces: - application/json responses: "200": description: OK summary: Create group tags: - groups /groups/:id: delete: description: Delete group by ID parameters: - description: Group ID in: path minimum: 1 name: id required: true type: integer produces: - application/json responses: "200": description: OK summary: Delete group tags: - groups get: description: Returns group instance parameters: - description: Group ID in: path minimum: 1 name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/database.Group' summary: Get group by ID tags: - groups /permissions: get: description: Returns key-value map with permissions produces: - application/json responses: "200": description: OK schema: additionalProperties: type: integer type: object summary: Get list of permissions /users: get: description: Returns array of users and count parameters: - description: Count of rows in: query maximum: 100 minimum: 10 name: count required: true type: integer - description: Rows to skip in: query name: offset required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/types.JSONPagination' summary: Get users (with pagination) tags: - users patch: description: Update user with specified data parameters: - description: Request body in: body name: request required: true schema: $ref: '#/definitions/database.User' produces: - application/json responses: "200": description: OK summary: Update user tags: - users post: description: Create user with specified data parameters: - description: Request body in: body name: request required: true schema: $ref: '#/definitions/database.User' produces: - application/json responses: "200": description: OK summary: Create user tags: - users /users/:id: delete: description: Delete user by ID parameters: - description: User ID in: path minimum: 1 name: id required: true type: integer produces: - application/json responses: "200": description: OK summary: Delete user tags: - users get: description: Returns user instance parameters: - description: User ID in: path minimum: 1 name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/database.User' summary: Get user by ID tags: - users securityDefinitions: accessToken=...;refreshToken=...: in: header name: Cookie type: apiKey swagger: "2.0"