Core
API v2.x
2

mGetUsers #

Gets multiple users.


Query Syntax #

HTTP #

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

You can also access this route with the GET verb:

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

Other protocols #

{
  "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
{
  "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"
          ]
        }
      }
    ]
  }
}