- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 05:38 AM
Hi guys,
Im trying to construct a rest api call ( using the rest explorer ) to query for all "new" tickets created "today" with a specific "Origination method".
Can anyone help?
I'm very new to this so please be gentle!
thanks!
Jon
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 05:49 AM
Hi Jon,
Go to the incident.list or task.list and use the filter to define your query.
Execute it to preview the result.
Now you can do a left click on the filter breadcrumb to copy the query.
In the REST API Explorer, paste this in the field sysparm_query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 05:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 06:15 AM
Hi guys,
both worked perfectly, thanks!
Now, when querying for the user all I get is:
u_requested_for": {
"link": "https://my-siteservice-now.com/api/now/table/sys_user/d64b8f8e4fe0be80e7fae57d0210c796",
"value": "d64b8f8e4fe0be80e7fae57d0210c796"
How can I make this into either a user name or email address??
Thanks again for all of your help.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 06:43 AM
Set sysparm_display_value to true on REST API Explorer and it will return back the display value on your table either name or email.
Thanks
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 07:11 AM
Hi Alikutty,
Even better, in the REST API Explorer, set the sysparm_display_value field to "all".
It will display the sys_id, the link, AND the display value.