How to get user data by providing user name or user profile field I am using postman. I want to provide the username or a user profile field say roll no and fetch the user's information. What should be the URL.

I am able to fetch the user information when I provide the uid using the following URL :

http://[yourdomain]/[endpoint]/user/[uid]
If you want to get the user data by providing username, you can use pass name (username) as a parameter to the service URL like follows

http://example.com/&lt;endpoint path&gt;/user?parameters[name]=krishna


If you want to pass either username or other user profile fields you can achieve that using Services Views module. After installing this module make sure to enable it under service resources list.

Create a view with contextual filter(s)

Executing view via views resource

After enabling "views" resource in your services endpoint you can do GET request to:

http://example.com/&lt;endpoint path&gt;/views/&lt;view name&gt;


This will execute a view and pass results.

Possible arguments:
- display_id: views display


args: array of view arguments
filters: array of view filter values
offset: views offset
limit: limit views number of results
format_output: boolean whether we would like to get themed view or data