The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Creating request (REQ) - Python REST API

shynee
Giga Contributor

Hello SNOW Gurus,

I am using REST API to create incident tickets, modifying CI's successfully. But Now I have a need to create a request. I don't understand the process on how to accomplish this. I need to select the service from "service catalog", then create a request(REQ), and a request item (RTIM).  It seems updating mutiple tables (sc_request and sc_req_item). Any idea how can this be done ?  Any sample code or documentation will be really helpful.

TIA

Shynee

1 ACCEPTED SOLUTION

sachin_namjoshi
Kilo Patron
Kilo Patron

you need to use OOB service catalog REST API to create service request.

Please check below documentation

 

https://docs.servicenow.com/bundle/jakarta-application-development/page/integrate/inbound-rest/concept/c_ServiceCatalogAPI.html

 

Regards,

Sachin

View solution in original post

9 REPLIES 9

sachin_namjoshi
Kilo Patron
Kilo Patron

you need to use OOB service catalog REST API to create service request.

Please check below documentation

 

https://docs.servicenow.com/bundle/jakarta-application-development/page/integrate/inbound-rest/concept/c_ServiceCatalogAPI.html

 

Regards,

Sachin

also, use REST API explorer to test OOB service catalog API

 

 

Regards,

Sachin

In the same API I want to pass some more system field's like assignment_group, configuration_item. But they are not getting updated, Any clue is this a restriction?

Here is my payload:

 {"sysparm_quantity":"1","variables":{"requested_for":"nagarwa3","assignment_group":"e99065c31b61e0904a7c64a5ec4bcbee","configuration_item":"d9f6ed981bf1a4904a7c64a5ec4bcbe4"},"sysparm_item_guid":"d9bcc9bc1b4e94108dbf42eddc4bcbd2","get_portal_messages":"true","sysparm_no_validation":"true"}Here is my Payload:

 

shynee
Giga Contributor

Perfect, Thanks Sachin. Let me look into it.

Shynee