Through REST API, How to get RITM and Task values for each Request?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2018 05:13 AM
we are integration SNOW with third party platform " Hybrid cloud management" through REST APIs. we use only REST APIs for integration.
We order Catalog Items through Service catalog APIs(https://docs.servicenow.com/bundle/istanbul-servicenow-platform/page/integrate/inbound-rest/reference/r_SCatAPIAddItemToCartPOST.html#ariaid-title12) and a request is generated (REQ0010180). Through REST APIs, How would I get RITM and Task values for each Request?
we don't want to use client script gliderecord
regards
Soibam
- Labels:
-
Scoped App Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2018 06:04 AM
When you order the catalog item through the rest api you should get a response with the create Request number and sys_id. Based on that you can use the REST Table API to query the RITMs related to that request, and then a second GET to get all of the tasks associated with those items.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2018 07:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2018 08:15 AM
Its work with passing sys_id in sysparam_query
https://devXXX.service-now.com/api/now/table/sc_req_item?sysparm_query=request%3D0c4c9457dbd4a30071ec771c8c961916&sysparm_limit=1

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2018 08:21 AM
Yes, you should pass the sys_id there instead of the number, but you could do something like:
GET https://devXXXX.service-now.com/api/now/table/sc_req_item?sysparm_query=request.number%3DREQ0010180&sysparm_limit=1