Skip to content

Retrieving user information

This call will allow you to retrieve the information of a user in the specified environment.

URL

api/v1/users

Method

GET

URL parameters
Parameter Type Required Description
query String No The URL encoded JSON object that contains a Mongo query.

Supported query properties: - _id - username - globalEmailAddress - name (environment name) - email (environment email address )

Header Parameters
Parameter Type Required Description
Content-Type String Yes Provide the content type of your call. Only application/json is supported.
X-User-Id String Yes The ID of the user who wants to trigger the REST action. This ID is returned by the authentication call.
X-Auth-Token String Yes The authentication token that the authentication call returned.
_environmentid String Yes ID of the environment

When a request is being made to the endpoint without the query parameter details of the current user will be returned. A request with the query parameter specified can only be applied when the authorization user has admin rights.

Response

Authorization user or user specified by filter param (admin only).

Example

curl --location -g --request GET 'localhost:3000/api/v1/users?query={%22_id%22:%22JdZH7SjsSEHmKBjQN%22}' \
--header 'X-Auth-Token: 7ZkzgsGZK5aDsP3FP2AvjCaq6PwmG3GW6bhmS6udMgj' \
--header 'X-User-Id: a6gA9rYaGTFKPrT5P' \
--header '_environmentId: maxedy_pizza' \