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 Organizations API version: 0.0.0 servers: - url: https://api.infrahq.com tags: - name: Organizations paths: /api/forgot-domain-request: post: description: RequestForgotDomains operationId: RequestForgotDomains 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 requestBody: content: application/json: schema: properties: email: format: email type: string required: - email 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: RequestForgotDomains tags: - Organizations /api/organizations: get: description: ListOrganizations operationId: ListOrganizations 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: query name: name schema: 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_Organization' description: Success summary: ListOrganizations tags: - Organizations post: description: CreateOrganization operationId: CreateOrganization 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: domain: type: string name: format: '[a-zA-Z0-9\-_.]' maxLength: 256 minLength: 2 type: string required: - name - domain 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/Organization' description: Success summary: CreateOrganization tags: - Organizations /api/organizations/{id}: delete: description: DeleteOrganization operationId: DeleteOrganization 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: DeleteOrganization tags: - Organizations get: description: GetOrganization operationId: GetOrganization 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: description: a uid or the literal self example: 4yJ3n3D8E2 format: uid|self pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}|self' 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/Organization' description: Success summary: GetOrganization tags: - Organizations put: description: UpdateOrganization operationId: UpdateOrganization 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: allowedDomains: items: type: string type: array required: - allowedDomains 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/Organization' description: Success summary: UpdateOrganization tags: - Organizations components: schemas: Organization: properties: allowedDomains: description: domains which can be used to login to this organization example: '[''example.com'', ''infrahq.com'']' items: description: domains which can be used to login to this organization example: '[''example.com'', ''infrahq.com'']' type: string type: array created: description: formatted as an RFC3339 date-time example: '2022-03-14T09:48:00Z' format: date-time type: string domain: type: string id: example: 4yJ3n3D8E2 format: uid pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}' type: string name: type: string updated: description: formatted as an RFC3339 date-time example: '2022-03-14T09:48:00Z' format: date-time type: string 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_Organization: properties: count: description: Total number of items on the current page example: '100' format: int type: integer items: items: properties: allowedDomains: description: domains which can be used to login to this organization example: '[''example.com'', ''infrahq.com'']' items: description: domains which can be used to login to this organization example: '[''example.com'', ''infrahq.com'']' type: string type: array created: description: formatted as an RFC3339 date-time example: '2022-03-14T09:48:00Z' format: date-time type: string domain: type: string id: example: 4yJ3n3D8E2 format: uid pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}' type: string name: type: string updated: description: formatted as an RFC3339 date-time 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