Skip to main content

Get roles for currently logged in user

GET 

/api/admin/user/roles

Gets roles assigned to currently logged in user. Both explicitly and transitively through group memberships

Request

Query Parameters

    projectId string

    The id of the project you want to check permissions for

Responses

rolesSchema

Schema

    version integerrequired

    The version of the role schema used

    Possible values: >= 1

    Example: 1

    roles

    object[]

    required

    A list of roles

  • Array [

  • id integerrequired

    The role id

    Example: 9
    type stringrequired

    A role can either be a global root role (applies to all projects) or a project 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.
    project stringnullable

    What project the role belongs to

    Example: default
  • ]

Loading...