Skip to main content

Update a Role

Update a role given their roleId.

caution

This endpoint has been deprecated and will be phased out at the end of 2023. Please update any existing usages of it to use the Update Object endpoint instead.

Endpoint

PUT /v1/roles/:roleId

Parameters

ParameterDescriptionTypeRequired
roleIdThe id of the role to update. Note that id cannot be changed.URL paramyes
nameAn optional, display-friendly name for the role.JSON bodyno
descriptionAn optional description of the role. A useful description might include a summary of the permissions the role grants.JSON bodyno

Note: Optional fields that are omitted will clear existing values.

Request

curl "https://api.warrant.dev/v1/roles/admin" \
-X PUT \
-H "Authorization: ApiKey YOUR_KEY" \
--data-raw \
'{ "name": "Administrator", description: "Grants a user admin access to the application" }'

Response

{
"roleId": "admin",
"name": "Administrator",
"description": "Grants a user admin access to the application"
}