Rest API query two incident number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2021 08:28 AM
Is that possible to query two incident number with below query ? or any available api to query two incident number ?
Incident management: https://<instance name>.service-now.com/nav_to.do?uri=incident.do?sysparm_query=number=$TICKETID
- Labels:
-
Facilities Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2021 08:38 AM
Hi Chong,
You can use https://<instance name>.service-now.com/nav_to.do?uri=incident.do?sysparm_query=numberIN$TICKETID1,$TICKETID2
You can put as many numbers comma(,) separated in the URL and call the REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2021 08:42 AM
Hi
To query more than one incident number your URL will be
https://InstanceID.service-now.com/api/now/table/incident?sysparm_query=active%3Dtrue%5Enumber%3DINC0010245%5EORnumber%3DINC0010244&sysparm_display_value=true&sysparm_fields=number%2Cshort_description%2Cdescription%2Cstate&sysparm_limit=10
or
https://instanceID.service-now.com/api/now/table/incident?sysparm_query=active%3Dtrue%5EnumberININC0010245%2CINC0010244&sysparm_display_value=true&sysparm_fields=number%2Cdescription%2Cshort_description%2Cstate%2Csys_created_on%2Csys_created_by%2Csys_updated_by%2Csys_updated_on&sysparm_limit=10
If you want URL you can check rest api explorer module just specify table name and method as GET and in sysparam_query paste query which you can create from list view and right click on it and copy query and paste it here. in sysparm_fields you can mention fields which you need in response.
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks & Regards,
Viraj Hudlikar.