Roles

Update a custom role

Changed on

Changes a custom role's name, description, permissions, or its model, endpoint and network conditions, and returns it. Built-in roles cannot be changed. Requires a signed-in session. The same no-escalation rule as creation applies.

Requires the role.manage permission. See Permissions for the roles and API key permissions that include it.

patch/v1/roles/{roleId}

Request

  • Base URL
    https://api.openrelay.inc
  • URL
    https://api.openrelay.inc/v1/roles/{roleId}
  • Auth
    HTTP bearer

Path parameters

roleIdstring required

Request body

descriptionstring
endpointsstring[]
ipRangesstring[]
modelsstring[]
namestring
permissionsstring[]

Response

Updated

builtinboolean required
cedarstring

The Cedar policies generated for the role (custom roles only).

createdAtstring
createdBystring
descriptionstring
endpointsstring[]

Dedicated endpoints every holder of the role is limited to.

idstring required

A built-in role id (owner, admin, member, billing, inference, viewer) or a custom role id (role_...).

ipRangesstring[]

Networks every holder of the role is limited to.

memberCountinteger
modelsstring[]

Models every holder of the role is limited to.

namestring required
permissionsstring[] required
stalestring

Set when the role names a permission this version of OpenRelay does not know, or no longer compiles: what it does now and what to change. The rest of the role still applies.

updatedAtstring
updatedBystring

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • warning

      removed the optional property from the response with the status