Using rest api wanted to create/update incident with configuration item with single endpoint even th

adhanyamraj
Mega Contributor

Using rest api wanted to create/update incident with configuration item with single endpoint even though configuration item is'nt available.
Wanted to create incident with configuration item which is'nt available, now process could be like

1. Create configuration item as required with /api/now/table/cmdb_ci endpoint.

2. Create/update incident with above created configuration item's sys_id or name with /api/now/table/incident endpoint.
Is there any way or endpoint , if i post the payload with configuration item which isn't available it creates configuration item and also create incident , assign created item to the saame??

1 REPLY 1

jonsan09
Giga Sage
Giga Sage

It sounds like you could make use of Scripted REST APIs. Here are a few good vids on the topic:

https://www.youtube.com/watch?v=ulKSAZsxFlw

or

https://www.youtube.com/watch?v=tgLpTkIocsI