How to create an incident via REST API ?

joseeduardo
Giga Expert

Hello everyone, I would like to know if someone has already created an incident via REST API?, what I am actually trying to do is to create a Facility Request(Facilites request plugin), but maybe knowing how to create an incident would give me a guideline and help me in order to create a facility request or even better if some knows how to create a faciliy request via REST I would appreciate it! thank you!

1 ACCEPTED SOLUTION

tony_barratt
ServiceNow Employee
ServiceNow Employee

Hi Jose,


Approach is mentioned here:


Getting Started with REST - ServiceNow Wiki


Use a POST request to create a new record.POST https://instance.service-now.com/api/now/v1/table/incident


Any issues - add to this thread and assistance will follow shortly..



Best Regards


Tony


View solution in original post

5 REPLIES 5

tony_barratt
ServiceNow Employee
ServiceNow Employee

Hi Jose,


Approach is mentioned here:


Getting Started with REST - ServiceNow Wiki


Use a POST request to create a new record.POST https://instance.service-now.com/api/now/v1/table/incident


Any issues - add to this thread and assistance will follow shortly..



Best Regards


Tony


Also if you want to create a facilities request, use the facilities_request table as a target, instead of incident table.


Yeah jajaja I dont know why but I was kinda mental blocked for a minute jaja I just read the wiki and I remember I have done this before! Thank you for the fast answer and mental refreshing to my person!


Hi Tony,

The link provided by you is not functioning, please share the code snippet