openapi: 3.0.0 info: description: Infra API license: name: Elastic License v2.0 url: https://www.elastic.co/licensing/elastic-license title: Infra Authentication Groups API version: 0.0.0 servers: - url: https://api.infrahq.com tags: - name: Groups paths: /api/groups: get: description: ListGroups operationId: ListGroups parameters: - in: header name: Infra-Version required: true schema: description: Version of the API being requested example: 0.0.0 format: \d+\.\d+\(.\d+)?(-.\w(+\w)?)? type: string - in: header name: Authorization required: true schema: description: Bearer followed by your access key example: Bearer ACCESSKEY format: Bearer [\da-zA-Z]{10}\.[\da-zA-Z]{24} type: string - description: Name of the group to retrieve example: admins in: query name: name schema: description: Name of the group to retrieve example: admins type: string - description: UserID of a user who is a member of the group in: query name: userID schema: description: UserID of a user who is a member of the group example: 4yJ3n3D8E2 format: uid pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}' type: string - description: Page number to retrieve example: '1' in: query name: page schema: description: Page number to retrieve example: '1' format: int minimum: 0 type: integer - description: Number of objects to retrieve per page (up to 1000) example: '100' in: query name: limit schema: description: Number of objects to retrieve per page (up to 1000) example: '100' format: int maximum: 1000 minimum: 0 type: integer responses: '400': content: application/json: schema: $ref: '#/components/schemas/Error' description: Bad Request '401': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Unauthorized: Requestor is not authenticated' '403': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Forbidden: Requestor does not have the right permissions' '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: Not Found '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: Duplicate Record default: content: application/json: schema: $ref: '#/components/schemas/ListResponse_Group' description: Success summary: ListGroups tags: - Groups post: description: CreateGroup operationId: CreateGroup parameters: - in: header name: Infra-Version required: true schema: description: Version of the API being requested example: 0.0.0 format: \d+\.\d+\(.\d+)?(-.\w(+\w)?)? type: string - in: header name: Authorization required: true schema: description: Bearer followed by your access key example: Bearer ACCESSKEY format: Bearer [\da-zA-Z]{10}\.[\da-zA-Z]{24} type: string requestBody: content: application/json: schema: properties: name: description: Name of the group example: development type: string required: - name type: object responses: '400': content: application/json: schema: $ref: '#/components/schemas/Error' description: Bad Request '401': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Unauthorized: Requestor is not authenticated' '403': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Forbidden: Requestor does not have the right permissions' '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: Not Found '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: Duplicate Record default: content: application/json: schema: $ref: '#/components/schemas/Group' description: Success summary: CreateGroup tags: - Groups /api/groups/{id}: delete: description: DeleteGroup operationId: DeleteGroup parameters: - in: header name: Infra-Version required: true schema: description: Version of the API being requested example: 0.0.0 format: \d+\.\d+\(.\d+)?(-.\w(+\w)?)? type: string - in: header name: Authorization required: true schema: description: Bearer followed by your access key example: Bearer ACCESSKEY format: Bearer [\da-zA-Z]{10}\.[\da-zA-Z]{24} type: string - in: path name: id required: true schema: example: 4yJ3n3D8E2 format: uid pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}' type: string responses: '400': content: application/json: schema: $ref: '#/components/schemas/Error' description: Bad Request '401': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Unauthorized: Requestor is not authenticated' '403': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Forbidden: Requestor does not have the right permissions' '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: Not Found '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: Duplicate Record default: content: application/json: schema: $ref: '#/components/schemas/EmptyResponse' description: Success summary: DeleteGroup tags: - Groups get: description: GetGroup operationId: GetGroup parameters: - in: header name: Infra-Version required: true schema: description: Version of the API being requested example: 0.0.0 format: \d+\.\d+\(.\d+)?(-.\w(+\w)?)? type: string - in: header name: Authorization required: true schema: description: Bearer followed by your access key example: Bearer ACCESSKEY format: Bearer [\da-zA-Z]{10}\.[\da-zA-Z]{24} type: string - in: path name: id required: true schema: example: 4yJ3n3D8E2 format: uid pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}' type: string responses: '400': content: application/json: schema: $ref: '#/components/schemas/Error' description: Bad Request '401': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Unauthorized: Requestor is not authenticated' '403': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Forbidden: Requestor does not have the right permissions' '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: Not Found '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: Duplicate Record default: content: application/json: schema: $ref: '#/components/schemas/Group' description: Success summary: GetGroup tags: - Groups /api/groups/{id}/users: patch: description: UpdateUsersInGroup operationId: UpdateUsersInGroup parameters: - in: header name: Infra-Version required: true schema: description: Version of the API being requested example: 0.0.0 format: \d+\.\d+\(.\d+)?(-.\w(+\w)?)? type: string - in: header name: Authorization required: true schema: description: Bearer followed by your access key example: Bearer ACCESSKEY format: Bearer [\da-zA-Z]{10}\.[\da-zA-Z]{24} type: string - in: path name: id required: true schema: example: 4yJ3n3D8E2 format: uid pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}' type: string requestBody: content: application/json: schema: properties: usersToAdd: description: List of user IDs to add to the group example: '[6dYiUyYgKa,6hPY5vqB2R]' items: description: List of user IDs to add to the group example: '[6dYiUyYgKa,6hPY5vqB2R]' format: uid pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}' type: string type: array usersToRemove: description: List of user IDs to remove from the group example: '[3w5qrK7ets,4Ajzyzckdn]' items: description: List of user IDs to remove from the group example: '[3w5qrK7ets,4Ajzyzckdn]' format: uid pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}' type: string type: array type: object responses: '400': content: application/json: schema: $ref: '#/components/schemas/Error' description: Bad Request '401': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Unauthorized: Requestor is not authenticated' '403': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Forbidden: Requestor does not have the right permissions' '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: Not Found '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: Duplicate Record default: content: application/json: schema: $ref: '#/components/schemas/EmptyResponse' description: Success summary: UpdateUsersInGroup tags: - Groups components: schemas: Error: properties: code: format: int32 type: integer fieldErrors: items: properties: errors: items: type: string type: array fieldName: type: string type: object type: array message: type: string EmptyResponse: {} ListResponse_Group: properties: count: description: Total number of items on the current page example: '100' format: int type: integer items: items: properties: created: description: Date the group was created example: '2022-03-14T09:48:00Z' format: date-time type: string id: description: Group ID example: gauEdoYCEU format: uid pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}' type: string name: description: Name of the group example: admins type: string totalUsers: description: Total number of users in the group example: '14' format: int type: integer updated: description: Date the group was updated example: '2022-03-14T09:48:00Z' format: date-time type: string type: object type: array limit: description: Number of objects per page example: '100' format: int type: integer page: description: Page number retrieved example: '1' format: int type: integer totalCount: description: Total number of objects example: '485' format: int type: integer totalPages: description: Total number of pages example: '5' format: int type: integer Group: properties: created: description: Date the group was created example: '2022-03-14T09:48:00Z' format: date-time type: string id: description: Group ID example: gauEdoYCEU format: uid pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}' type: string name: description: Name of the group example: admins type: string totalUsers: description: Total number of users in the group example: '14' format: int type: integer updated: description: Date the group was updated example: '2022-03-14T09:48:00Z' format: date-time type: string