A common task to accomplish via the REST API is to search users by email.
Since more than one user can have the same email address (e.g. when you are using external_id as user identifier) we cannot use a simple get request but we have to search for users and make a decision in our application how we handle results. Handling results is out of the scope of this article.
We are going to use the POST search endpoint for user reports since we are looking for a user, so we are calling the following endpoint:
The request needs to contain a valid Elastic Search query which filters users effectively by the email address:
The API will return a paged JSON result such as the following:
You can use the result in your application for further processing or to update the user in Hull via another API call.
You can find this example along with other usage examples in Postman.