REST API - use template to create incident

baddeacs
Kilo Contributor

Is this the correct method to open an incident with a template?

POST https://<hostname>/api/now/table/incident?sysparm_template=<template name>

3 REPLIES 3

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Brian,



It should be


https://<hostname>/api/now/table/incident.do?sysparm_template=<template name>

Pradeep - This does not work with the REST API:



{


  "error": {


      "detail": null,


      "message": "Invalid table incident.do"


  },


  "status": "failure"


}



I think '.do' is for SOAP.



Ideas?


Hi Brian,



Thanks for the update. Please refer below thread for more info.


Apply template using rest api