REST table API sysparm_query not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2019 11:30 AM
I'm developing a query to show me emails with a certain recipient - I'm using the following with a valid token:
export SNOW_URL="https://someinstance.service-now.com/api/now/table/sys_email?sysparm_limit=5&sysparm_query=recipientsLIKEbaranski"
curl --request GET -H "Accept:application/json" -H "Authorization:Bearer ${SNOW_ACCESS_TOKEN}" "${SNOW_URL}" | jq
{
"result": []
}
I also get 0 results with `?sysparm_limit=5` and no query.
However, I get loads of results if I use this for my URL:
export SNOW_URL="https://someinstance.service-now.com/api/now/table/sys_email"
For some reason, the sysparm_limit and sysparm_query are causing my query to return 0 rows.
Why?
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2019 11:59 AM
HI,
I think we should use email api instead of table API. I think we dont have table API for this Email table.
I tried to check in REST API Explorer and i dont see Email table in table API.
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2019 12:14 PM
How do I get a list of emails filtered by subject? The email API allows me to get a single email (via a sys_id) or send an email.
I want a list of emails and to be able to query.