openapi: 3.1.0 info: title: Whitelist version: '1' components: schemas: WhitelistUserElement: type: object properties: name: type: string examples: - TheFunPimp description: Name of the banned player for display purposes. Can be empty. userId: $ref: './openapi.yaml#/components/schemas/TypeUserIdObject' required: - name - userId WhitelistUserList: type: array items: $ref: '#/components/schemas/WhitelistUserElement' WhiteListGroupElement: type: object properties: name: type: string examples: - Steam Universe description: Name of the group for display purposes. Can be empty. groupId: type: string examples: - '103582791434672565' required: - name - groupId WhiteListGroupList: type: array items: $ref: '#/components/schemas/WhiteListGroupElement' UserPermissionsObject: type: object properties: users: $ref: '#/components/schemas/WhitelistUserList' groups: $ref: '#/components/schemas/WhiteListGroupList' required: - users - groups TypeGroupIdString: type: string examples: - '103582791434672565' UserPermissionPostBodyObject: type: object properties: name: type: string parameters: UserIdParameter: name: id in: path required: true schema: $ref: './openapi.yaml#/components/schemas/TypeUserIdString' GroupIdParameter: name: id in: path required: true schema: $ref: '#/components/schemas/TypeGroupIdString' requestBodies: WhitelistBodyIn: content: application/json: schema: $ref: '#/components/schemas/UserPermissionPostBodyObject' required: true paths: /api/whitelist: get: tags: - Permissions summary: Whitelist list description: Fetch a list of all whitelisted users / groups operationId: Whitelist.get responses: 200: description: List of whitelist entries content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/UserPermissionsObject' meta: $ref: './openapi.yaml#/components/schemas/ResultEnvelopeMeta' required: - data - meta 403: $ref: './openapi.yaml#/components/responses/Unauthorized' security: - apiTokenName: [ ] apiTokenSecret: [ ] - sessionCookie: [ ] /api/whitelist/user/{id}: post: tags: - Permissions summary: Whitelist user create description: Create or update a whitelist user operationId: Whitelist.post.user.id parameters: - $ref: '#/components/parameters/UserIdParameter' requestBody: $ref: '#/components/requestBodies/WhitelistBodyIn' responses: 201: description: Whitelist user created or updated $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse' 400: description: Invalid request, errorCode will be one of 'NO_USER_OR_GROUP' or 'INVALID_USER' $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse' 403: $ref: './openapi.yaml#/components/responses/Unauthorized' security: - apiTokenName: [] apiTokenSecret: [] - sessionCookie: [] delete: tags: - Permissions summary: Whitelist user delete description: Delete a single whitelist user operationId: Whitelist.delete.user.id parameters: - $ref: '#/components/parameters/UserIdParameter' responses: 204: description: Deleted whitelist user $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse' 400: description: Invalid request, errorCode will be one of 'NO_USER_OR_GROUP' or 'INVALID_USER' $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse' 404: description: User ID not found $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse' 403: $ref: './openapi.yaml#/components/responses/Unauthorized' security: - apiTokenName: [] apiTokenSecret: [] - sessionCookie: [] /api/whitelist/group/{id}: post: tags: - Permissions summary: Whitelist group create description: Create or update a whitelist group operationId: Whitelist.post.group.id parameters: - $ref: '#/components/parameters/GroupIdParameter' requestBody: $ref: '#/components/requestBodies/WhitelistBodyIn' responses: 201: description: Whitelist group created or updated $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse' 400: description: Invalid request, errorCode will be one of 'NO_USER_OR_GROUP' or 'INVALID_GROUP' $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse' 403: $ref: './openapi.yaml#/components/responses/Unauthorized' security: - apiTokenName: [] apiTokenSecret: [] - sessionCookie: [] delete: tags: - Permissions summary: Whitelist group delete description: Delete a single whitelist group operationId: Whitelist.delete.group.id parameters: - $ref: '#/components/parameters/GroupIdParameter' responses: 204: description: Deleted whitelist group $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse' 400: description: Invalid request, errorCode will be one of 'NO_USER_OR_GROUP', 'INVALID_GROUP' $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse' 404: description: Group ID not found $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse' 403: $ref: './openapi.yaml#/components/responses/Unauthorized' security: - apiTokenName: [] apiTokenSecret: [] - sessionCookie: []