retrieve

DatabaseUser.retrieve(dbId, objectId, include[,token])

Retrieves info about the user in the database.

Parameters

The method has the following parameters:

ArgumentDescription
dbIdString with database id.
tokenString with user token.
objectIdUnique identifier of the user that should be updated.
includeString parameter that indicates whether the referenced object should be included.

Response

This method has the following response:

{
   "username":<username>,
   "_createdAt":<datetime>,
   "_updatedAt":<datetime>,
   "_id":<user_id>
}
Example

Retrieving info about the user.

var dbId = "52776916a044652b54f1f976";
var username = "testUser10";
var password = "testUser10";

var token = DatabaseUser.login(dbId, username, password).sessionToken;

var user = DatabaseUser.retrieve(dbId, id, null, token);