openapi: 3.0.0 info: version: 1.0.0 title: NERM API v2025 description: The NERM API v2025 accesss and modifies resources in your environment. license: name: MIT servers: - url: https://{tenantName}.nonemployee.com/api/v2025 variables: tenantName: default: acmeco description: Tenant name assigned to customer paths: /delegations: get: summary: List delegations description: Returns a list of delegation records, optionally filtered by delegate, delegator, or expiration status. tags: - delegations parameters: - $ref: '#/components/parameters/delegate_id' - $ref: '#/components/parameters/delegator_id' - $ref: '#/components/parameters/expired' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/offset' - $ref: '#/components/parameters/include' responses: '200': $ref: '#/components/responses/Delegations' '500': $ref: '#/components/responses/500' post: summary: Create a delegation description: Create a new delegation record. tags: - delegations requestBody: $ref: '#/components/requestBodies/Delegation' responses: '201': $ref: '#/components/responses/Delegation' '404': $ref: '#/components/responses/404' '500': $ref: '#/components/responses/500' /delegations/{id}: get: summary: Get a single delegation description: Returns a single delegation record by its ID. tags: - delegations parameters: - $ref: '#/components/parameters/id' responses: '200': $ref: '#/components/responses/Delegation-2' '404': $ref: '#/components/responses/404' '500': $ref: '#/components/responses/500' patch: summary: Update a delegation description: Update an existing delegation record. tags: - delegations parameters: - $ref: '#/components/parameters/id' requestBody: $ref: '#/components/requestBodies/Delegation-2' responses: '200': $ref: '#/components/responses/Delegation' '404': $ref: '#/components/responses/404' '500': $ref: '#/components/responses/500' delete: summary: Delete a delegation description: Delete an existing delegation record. tags: - delegations parameters: - $ref: '#/components/parameters/id' responses: '200': description: The delegation record '' has been destroyed. '404': $ref: '#/components/responses/404' '500': $ref: '#/components/responses/500' components: parameters: delegate_id: name: delegate_id in: query description: Filter by delegate ID required: false schema: type: string default: false example: ac4aae0b-4140-49a4-a84c-126762fd0c8f delegator_id: name: delegator_id in: query description: Filter by delegator ID required: false schema: type: string default: false example: ac4aae0b-4140-49a4-a84c-126762fd0c8f expired: name: expired in: query description: Filter by expiration status (true for expired, false for not expired) required: false schema: type: boolean default: false example: true limit: name: limit in: query description: The maximum number of items to return. required: false schema: type: integer format: int32 minimum: 1 example: 5 offset: name: offset in: query description: The number of items to skip before starting to collect the result set. required: false schema: type: integer format: int32 minimum: 1 example: 5 include: name: include in: query description: Include related resources body. For example, 'include=delegator,delegate'. required: false schema: type: string default: '' example: delegator,delegate id: name: id in: path description: ID of the object to retrieve, update, or delete required: true schema: type: string format: uuid example: 1246d8b3-ac29-4015-8154-dea4434a73fa schemas: DelegatorUser: type: object properties: id: type: string description: The id of the delegator user example: ac4aae0b-4140-49a4-a84c-126762fd0c8f uid: type: string description: The uid of the delegator user example: ac4aae0b-4140-49a4-a84c-126762fd0c8f type: type: string description: The type of the delegator user example: NeprofileUser name: type: string description: The name of the delegator user example: Jane Doe email: type: string description: The email of the delegator user format: email example: jane@example.com status: type: string description: The status of the delegator user example: active login: type: string description: The login of the delegator user example: jane.doe last_login: type: string format: date-time description: The last login timestamp of the delegator user example: '2024-06-01T12:34:56Z' created_at: type: string format: date-time readOnly: true description: The date-time the record created. example: '2022-12-27 08:26:49.219717' updated_at: type: string format: date-time readOnly: true description: The date-time the record was last updated. example: '2022-12-27 08:26:49.219717' DelegateUser: type: object properties: id: type: string description: The id of the delegate user example: ac4aae0b-4140-49a4-a84c-126762fd0c8f uid: type: string description: The uid of the delegate user example: ac4aae0b-4140-49a4-a84c-126762fd0c8f type: type: string description: The type of the delegate user example: NeprofileUser name: type: string description: The name of the delegate user example: Jane Doe email: type: string description: The email of the delegate user format: email example: jane@example.com status: type: string description: The status of the delegate user example: active login: type: string description: The login of the delegate user example: jane.doe last_login: type: string format: date-time description: The last login timestamp of the delegate user example: '2024-06-01T12:34:56Z' created_at: type: string format: date-time readOnly: true description: The date-time the record created. example: '2022-12-27 08:26:49.219717' updated_at: type: string format: date-time readOnly: true description: The date-time the record was last updated. example: '2022-12-27 08:26:49.219717' Delegation: type: object properties: id: type: string description: The id of the delegation example: ac4aae0b-4140-49a4-a84c-126762fd0c8f delegator_id: description: The id of the delegator user example: 12345678-1234-5678-1234-123456789012 delegate_id: description: The id of the delegate user example: 87654321-4321-6789-4321-210987654321 delegator: description: The delegator user object $ref: '#/components/schemas/DelegatorUser' delegate: description: The delegate user object $ref: '#/components/schemas/DelegateUser' expiration: type: string format: date-time description: The expiration date of the delegation example: '2023-10-01T12:00:00Z' expired: type: boolean description: Indicates if the delegation is expired example: false created_at: type: string format: date-time readOnly: true description: The date-time the record created. example: '2022-12-27 08:26:49.219717' updated_at: type: string format: date-time readOnly: true description: The date-time the record was last updated. example: '2022-12-27 08:26:49.219717' Delegation-2: type: object properties: delegator_id: type: string description: The id of the delegator example: ac4aae0b-4140-49a4-a84c-126762fd0c8f delegate_id: type: string description: The id of the delegate example: ac4aae0b-4140-49a4-a84c-126762fd0c8f expiration: type: string format: date-time description: The expiration date of the delegation example: '2023-10-01T12:00:00Z' Delegation-3: type: object properties: id: type: string description: The id of the delegation example: ac4aae0b-4140-49a4-a84c-126762fd0c8f delegator_id: description: The id of the delegator user example: 12345678-1234-5678-1234-123456789012 delegate_id: description: The id of the delegate user example: 87654321-4321-6789-4321-210987654321 expiration: type: string format: date-time description: The expiration date of the delegation example: '2023-10-01T12:00:00Z' expired: type: boolean description: Indicates if the delegation is expired example: false created_at: type: string format: date-time readOnly: true description: The date-time the record created. example: '2022-12-27 08:26:49.219717' updated_at: type: string format: date-time readOnly: true description: The date-time the record was last updated. example: '2022-12-27 08:26:49.219717' Delegation-4: type: object properties: delegation: type: object properties: delegator_id: type: string description: The ID of the delegator example: ac4aae0b-4140-49a4-a84c-126762fd0c8f delegatee_id: type: string description: The ID of the delegatee example: 12345678-1234-5678-1234-567812345678 expiration_date: type: string format: date-time description: The date and time when the delegation expires example: '2023-12-31T23:59:59Z' responses: '404': description: Record Not Found content: application/json: schema: type: object properties: error: description: The requested record, either ID or UID, was not found example: The requested Profile was not found '500': description: Internal Server Error - returned on unhandled exceptions. content: application/json: schema: type: object properties: error: description: A message describing the error example: Sorry something went wrong Delegations: description: Expected response to a valid request content: application/json: schema: type: object properties: delegations: type: array items: $ref: '#/components/schemas/Delegation' Delegation: description: Expected response to a valid request content: application/json: schema: type: object properties: delegation: type: object $ref: '#/components/schemas/Delegation-3' Delegation-2: description: Expected response to a valid request content: application/json: schema: type: object properties: delegation: type: object $ref: '#/components/schemas/Delegation' requestBodies: Delegation: required: true content: application/json: schema: type: object properties: delegation: type: object $ref: '#/components/schemas/Delegation-2' Delegation-2: required: true content: application/json: schema: $ref: '#/components/schemas/Delegation-4'