Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

REST API, creating incident with associated CI

sita_andrew
Kilo Explorer

Hi community. I am   new to Service Now so please forgive if this question has been answered - I found many close but all lacked the joined up view.

I am integrating our OSS platform to servicenow and am creating new CIs in the CMDB with the servicenow REST API (JSON) with no problems. (Full-fat management comes later but this is OK for now).

I can create incidents using the REST API also with no problems, but I need to attach the relevant CI to the incident. I capture the sys_id of the CI when I create it but looking at the incident dictionary I can't see anywhere I can pass the CI's sys_id so the newly created incident is "pinned" to the CI.

In a nutshell what I am trying to achieve is: Using the REST JSON API to create new incidents with the "Configuration Item" field populated by my integration ( I will be grabbing other stuff from the response also)

what am I missing?

thanks in advance.

5 REPLIES 5

Also, just so you know, in the Field Maps tab of the Transform Map record, the target field will say the field name (i.e., cmdb_ci) and the Field Map record will say the Label name (Configuration Item).