Core 2.x

mGetUsers

Gets multiple users.


Query Syntax

HTTP

Copied to clipboard!
URL: http://kuzzle:7512/users/_mGet
Method: POST
Body:
Copied to clipboard!
{
  "ids": ["user1", "user2"]
}

You can also access this route with the GET verb:

Copied to clipboard!
URL: http://kuzzle:7512/users/_mGet?ids=user1,user2
Method: GET

Other protocols

Copied to clipboard!
{
  "controller": "security",
  "action": "mGetUsers",
  "body": {
    "ids": ["user1", "user2"]
  }
}

Body properties

  • ids: an array of user kuids to get

Response

Returns a hits array of objects. Each object is a user object with the following properties:

  • _id: user kuid
  • _source: user content
Copied to clipboard!
{
  "status": 200,
  "action": "mGetUsers",
  "controller": "security",
  "error": null,
  "requestId": "<unique request identifier>",
  "result": {
    "hits": [
      {
        "_id": "user1",
        "_source": {
          "profileIds": [
            "profile1"
          ]          
      },
      {
        "_id": "user2",
        "_source": {
          "profileIds": [
            "profile1",
            "profile2"
          ]
        }
      }
    ]
  }
}