Roles

Create a custom role

Changed on

Creates a custom role from a set of permissions plus optional model, endpoint and network conditions, and returns it. A role cannot grant more than you hold. Requires a signed-in session. A role that grants more than its creator holds is refused with 403 ESCALATION_REFUSED, which names the first missing permission.

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

post/v1/roles

Request

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

Request body

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

Response

Created

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