Skip to main content

Get a single role

GET 

/api/admin/roles/:roleId

Get a single role by role id

Request

Path Parameters

    roleId stringrequired

Responses

roleWithPermissionsSchema

Schema

    id numberrequired

    The role id

    Example: 9
    type stringrequired

    A role can either be a global root role, or a project role or a custom project role or a custom global root-custom role

    Example: root
    name stringrequired

    The name of the role

    Example: Editor
    description string

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

    Example: Users with the editor role have access to most features in Unleash but can not manage users and roles in the global scope. Editors will be added as project owners when creating projects and get superuser rights within the context of these projects. Users with the editor role will also get access to most permissions on the default project by default.

    permissions

    object[]

    required

    A list of permissions assigned to this role

  • Array [

  • id integerrequired

    The identifier for this permission

    Example: 3
    name stringrequired

    The name of this permission

    Example: UPDATE_FEATURE
    displayName stringrequired

    The name to display in listings of permissions

    Example: Update feature flags
    type stringrequired

    What level this permission applies to. Either root, project or the name of the environment it applies to

    Example: project
    environment string

    Which environment this permission applies to

    Example: development
  • ]

Loading...