Core
API v2.x
2

getUserRights #

Gets the detailed rights granted to a user.


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/users/<_id>/_rights
Method: GET

Other protocols #

Copied to clipboard!
{
  "controller": "security",
  "action": "getUserRights",
  "_id": "<kuid>"
}

Arguments #


Response #

Returns a hits array of objects. Each object is a security right granted or denied to the user:

  • controller: impacted Kuzzle controller
  • action: impacted controller action
  • index: index name
  • collection: collection name
  • value: tell if access is allowed or denied.
Copied to clipboard!
{
  "status": 200,
  "error": null,
  "result": {
    "hits": [
      {
        "controller": "auth",
        "action": "login",
        "value": "allowed"
      },
      {
        "controller": "document",
        "action": "get",
        "index": "foo",
        "collection": "bar",
        "value": "allowed"
      },
      {
        "controller": "document",
        "action": "create",
        "index": "foo",
        "collection": "bar",
        "value": "denied"
      }
    ]
  }
}