Retrieve Current User

/db/users/me

Get information about the currently signed in user.

Parameter Summary

ParameterRequiredDescription
includeNoIndicates which referenced objects and its data should be included in response.
projectionNoJSON projection object that was built in accordance with the documentation of MongoDB query.

Examples

curl -X GET \
   -H "X-Appery-Database-Id: 57928860e4b00ef864f3dc24" \
   -H "X-Appery-Session-Token: f1bb537e-e6ef-4d78-af67-3c4aa7e222db" \
   https://api.appery.io/rest/1/db/users/me
{
	"_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."
}
You can also specify the include parameter to get referenced objects and their data from Pointer data type:

curl -X GET \
   -H "X-Appery-Database-Id: 57928860e4b00ef864f3dc24" \
   -H "X-Appery-Session-Token: f1bb537e-e6ef-4d78-af67-3c4aa7e222db" \
   https://api.appery.io/rest/1/db/users/me?include=toPointer
{
	"_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": {
		"_id": "5797dfd5e4b0264ccd2efde8",
		"email": "[email protected]",
		"country": "USA",
		"acl": {
			"5797dfd5e4b0264ccd2efde6": {
				"read": true,
				"write": true
			}
		},
		"_createdAt": "2016-07-26 22:10:29.271",
		"_updatedAt": "2016-07-26 22:10:29.271"
	},
	"Notes": "Nice user."
}