mGetRoles

Gets multiple security roles.


Query Syntax

HTTP

Copied to clipboard!
URL: http://kuzzle:7512/roles/_mGet
Method: POST
Body:
Copied to clipboard!
{
  "ids": ["role1", "role2"]
}

Other protocols

Copied to clipboard!
{
  "controller": "security",
  "action": "mGetRoles",
  "body": {
    "ids": ["role1", "role2"]
  }
}

Body properties

  • ids: an array of role identifiers to get

Response

Returns a hits array of objects. Each object is a role description, with the following properties:

  • _id: role unique identifier
  • _source: role description
Copied to clipboard!
{
  "status": 200,
  "action": "mGetRoles",
  "controller": "security",
  "error": null,
  "requestId": "<unique request identifier>",
  "result": {
    "hits": [
      {
        "_id": "role1",
        "_source": {
          "controllers": {
            "*": {
              "actions": true
            }
          }
        }
      },
      {
        "_id": "role2",
        "_source": {
          "controllers": {
            "document": {
              "actions": {
                "get": true,
                "search": true
              }
            }
          }
        }
      }
    ]
  }
}