latestOpenAPI 3.1.02026-08-221163801019.2 KB

f0f28319e448

Role

Modify a role

Modify an existing role. The roles are modified in-place unless immutable fields are modified, in which case a new role with the same name is created, and all users/API keys assigned to the previous role are switched to the new role. The old role document will expire after 1 day.

Permissions

This endpoint requires the following permissions:

  • Role:ModifyRole for the role.

This endpoint may require the authenticated user to have great privileges than the new role if a new role document is created as a result of immutable field changes.

post/v1/{organization}/role/{role_name}

Path parameters

role_namestring required

The name of the role.

The name of the role.

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

descriptionstring
frontend_view'client' | 'admin'

Response

Succeeded

role_idstring required

The identifier of the updated role.