- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2018 09:23 AM
Hello All!
I appreciate any help I can get! I understand this may be a beginner question, but I need help!
I would like the Table API to return all records that contain specific text.
For example, if a user enters Barkley for a location, I would like to return all locations that contain Barkley.
Here is the url that I am currently using, but when I try this, I do not get any data back:
"https://myinstancehere.service-now.com/api/now/table/cmn_location?sysparm_query=name%3DBarkley&sysparm_limit=10"
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2018 09:39 AM
Try something like this:
https://myinstance.service-now.com/api/now/table/cmn_location?sysparm_query=nameLIKEBarkley&sysparm_limit=10
If you use the 'REST API Explorer', you can copy the 'GET' under the 'Request' section.
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2018 12:36 PM
So far I am not able to get any meanful data back by using nameLIKE but was successful using streetLIKE in my url. Maybe there is something else I am doing incorrectly? I removed the %3D.
I am getting:
{"result":[]}
LOCATION NAME: Does not return any data
"https://myinstancehere.service-now.com/api/now/table/cmn_location?sysparm_query=nameLIKEBarkley&sysparm_limit=10"
ADDRESS/STEET: Returns the correct location
"https://myinstancehere.service-now.com/api/now/table/cmn_location?sysparm_query=streetLIKE4747&sysparm_limit=10"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2018 01:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2018 05:24 PM
try
"https://myinstancehere.service-now.com/api/now/table/cmn_location?sysparm_query=full_nameLIKEBarkley&sysparm_limit=10"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2018 05:42 AM
Thank you very much Mike Patel I really appreciate it!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2018 06:18 AM
If this resolved your issue. Please mark answer correct so it doesn't appear on unsolved list.
Thanks
