ServiceNow Create Request Using REST API

francisp
Kilo Contributor

Hello,

        I am using the ServiceNow REST API, specifically the table API. I know how to create a new RITM using POST. I have the following 3 questions though:

                  1. How can I create a request (REQ #)?

                  2. What is the table name for a request?

                  3. How do you associate an RITM within that same request?

        Thank you very much and please let me know if I need to elaborate.

1 REPLY 1

layla
Giga Expert

HI Francis,




If you want to create a request with a request item attached to it using REST API you need to do the folowing steps:




In the Rest api explorer you choose the namespace "sn_sc from the dropdown list called Namespace.


In the dropdown list of API you will have "Service catalog API"


You will see a list of web services you can use to use the service catalog



For your case you can choose "Buy Item (POST)" and you pass the sys_id of the item you want to order.


You need also to complete the field of your request in the Request body section.



This will create an RITM attached to a request of the item you have ordered.



Wish this will help