Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

REST table API sysparm_query not working

mike275
Mega Expert

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?

2 REPLIES 2

Ashutosh Munot1
Kilo Patron

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

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.