- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2014 05:31 AM
Hello all,
I'm attempting to use the table API to retrieve users based on their username. According to this article, it appears to suggest I can add a query parameter that looks like "sysparm_query=active=true" to the end of a GET call to filter the users I get back. I've modified the query parameter I'm using to "sysparm_query=user_name=<some username>" but it doesn't seem to be filtering properly. Am I forming the query parameter wrong or am I overlooking something else?
Thanks for your time,
-Andrew Kennedy
Solved! Go to Solution.
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2014 06:02 AM
Hi Andrew,
I was able to filter by user name, the way you have attempted, with no problem. This is the full URL I used to retrieve the admin user's details:
https://<instance_name>.service-now.com/api/now/v1/table/sys_user?sysparm_query=user_name=admin
Just replace <instance_name> with yours and give it a try.
/Amado

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2014 06:02 AM
Hi Andrew,
I was able to filter by user name, the way you have attempted, with no problem. This is the full URL I used to retrieve the admin user's details:
https://<instance_name>.service-now.com/api/now/v1/table/sys_user?sysparm_query=user_name=admin
Just replace <instance_name> with yours and give it a try.
/Amado
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2014 06:03 AM
I was able to get a record using this:
http://<instance>/api/now/v1/table/sys_user?sysparm_query=user_name=<username>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2014 09:15 AM
Thanks everyone, turns out I wasn't spelling "sysparm_query" correctly, instead I was using "sysparam_query". Thanks again for your help.