Table API - Return all records that contain specific text

jfencil
Kilo Contributor

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"

1 ACCEPTED SOLUTION

Community Alums
Not applicable

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

View solution in original post

10 REPLIES 10

Community Alums
Not applicable

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

Thank you @timmo I appreciate the reponse! I will give it a go! Where did you come up with something such as nameLIKE? Is there documentation for other similar query requests? 

You need to build your query and then use in REST API explorer.

find_real_file.png

 

find_real_file.png


Please mark this response as correct or helpful if it assisted you with your question.

I really appreciate the helpful suggestion @sanjivmeher!