Skip to main content

Update a role

PUT /api/admin/roles/:roleId

Update a custom role by role id

Request

Path Parameters

  • roleId string required

Body

required

createRoleWithPermissionsSchema

  • name string required

    The name of the custom role

  • description string

    A more detailed description of the custom role and what use it's intended for

  • type string

    Possible values: [root-custom, custom]

    A custom role can either be a global/root custom role (applies to all projects) or a project custom role

  • permissions object[]

    A list of permissions assigned to this role

  • Array [
  • id number required

    The id of the permission

  • environment string

    The environments of the permission if the permission is environment specific

  • ]
Responses

roleWithVersionSchema

Schema
  • version integer required

    Possible values: >= 1

    The version of this schema

  • roles objectrequired

    A role holds permissions to allow Unleash to decide what actions a role holder is allowed to perform

  • id integer required

    The role id

  • type string required

    A role can either be a global root role (applies to all projects) or a project role

  • name string required

    The name of the role

  • description string

    A more detailed description of the role and what use it's intended for

Loading...