Retrieve User Details

/db/users/{userID}

Retrieves information about a user specified by its user ID. Works the same way as Retrieve Current User endpoint by requires the user ID. With this endpoint you can get information about the currently signed in user unless you specify the Master key. With the Master key you can get information about any user in the Users collection.

Examples

This example shows getting information about the currently signed in user:
curl -X GET \
   -H "X-Appery-Database-Id: 57928860e4b00ef864f3dc24" \
   -H "X-Appery-Session-Token: 6996c750-1c44-418e-8d6a-76ebdec2f7cb" \
   https://api.appery.io/rest/1/db/users/5797dfd5e4b0264ccd2efde6
{
    "_id": "5797dfd5e4b0264ccd2efde6",
    "username": "amy",
    "_createdAt": "2016-07-26 22:10:29.264",
    "_updatedAt": "2016-08-03 23:53:51.272",
    "acl": {
        "*": {
            "read": true
        },
        "5797dfd5e4b0264ccd2efde6": {
            "read": true,
            "write": true
        }
    },
    "toProfile": {
        "collName": "UserProfile",
        "_id": "5797dfd5e4b0264ccd2efde8"
    },
    "Notes": "Nice user."
}
This example uses the Master key and allows to get details about any user in the User collection:

curl -X GET \
   -H "X-Appery-Database-Id: 57928860e4b00ef864f3dc24" \
   -H "X-Appery-Master-Key: 7ec7f59e-475d-49ba-a2d1-fc22df51eb55" \
   https://api.appery.io/rest/1/db/users/5797dfd5e4b0264ccd2efde6
{
    "_id": "5797dfd5e4b0264ccd2efde6",
    "username": "amy",
    "_createdAt": "2016-07-26 22:10:29.264",
    "_updatedAt": "2016-08-03 23:53:51.272",
    "acl": {
        "*": {
            "read": true
        },
        "5797dfd5e4b0264ccd2efde6": {
            "read": true,
            "write": true
        }
    },
    "toProfile": {
        "collName": "UserProfile",
        "_id": "5797dfd5e4b0264ccd2efde8"
    },
    "Notes": "Nice user."
}