latestOpenAPI 3.1.02026-08-221163801019.2 KB

f0f28319e448

Role

Create a temporary permission grant

Create a new temporary permission grant.

The user that is given the grant will be able to perform actions permitted by the grant for a limited amount of time. Note that any actions that require comparing the permissions of the user and the permissions of another entity would still use the user and the other entity's role, without factoring into the temporary permission grants.

Permissions

This endpoint requires the following permissions:

  • Role:CreateTemporaryPermissionGrant for the grant to create.
post/v1/{organization}/role/temporary_permission_grant/

Path parameters

organizationstring required

Headers

x-mongo-cluster-namestring nullable

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

Sec-WebSocket-Protocolstring[]

Request body

user_idstring required

The ID of the user to grant the temporary permission to.

durationstring duration required

In ISO8601 format, the duration that this permission grant will last.

tagsobject required

The tags of the permission grant. Both the key and the value can only contain alphanumeric characters, underscores, or spaces.

justificationstring required

Response

Succeeded

temporary_permission_grant_idstring required

The ID of the created temporary permission grant.

expires_atstring date-time required

The time in UTC at which the permission grant expires.