Skip to main content

Validate a role

POST 

/api/admin/roles/validate

Check if the role matches schema and has a unique name

Request

Body

required

createRoleWithPermissionsSchema

    anyOf

    name stringrequired

    The name of the custom role

    Example: external-contributors
    description string

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

    Example: Users with external-contributors role have limited access to most features in Unleash
    type string

    Custom root roles (type=root-custom) are root roles with a custom set of permissions. Custom project roles (type=custom) contain a specific set of permissions for project resources.

    Possible values: [root-custom, custom]

    Example: root-custom

    permissions

    object[]

    A list of permissions assigned to this role

  • Array [

  • name stringrequired

    The name of the permission

    Example: CREATE_PROJECT
    environment string

    The environments of the permission if the permission is environment specific

    Example: development
  • ]

Responses

This response has no body.

Loading...