Affected CIs - 'affected_cis_view' table

Andrew Catchpol
Giga Contributor

Using the REST API, I can retrieve GET the Affected CIs 'affected_cis_view' table

https://devxxxxx.service-now.com/api/now/table/affected_cis_view

However, how can I create POST new Affected CI entry in the table?

Using Create in the usual manner causes an ACL error so I assume I'm doing something wrong. I've tried Put and Patch and still get errors.

Thanks

 

 

 

 

 

1 ACCEPTED SOLUTION

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,


This is a relationship right. if you want to add below incident then use task_ci table.

Thanks,
Ashutosh

View solution in original post

14 REPLIES 14

Andrew Catchpol
Giga Contributor

@Ankur Bawiskar 

If I manually add a CI to an incident record then the CI correctly appears in the Affected Cis View (affected_cis_view) table. I just cant repllcate this using the REST API.

the cmdb_outage_ci_mtom table is always empty - not sure where this is seen in the UI?

Andrew Catchpol
Giga Contributor

@Mahmoud Ramadan cc

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,


This is a relationship right. if you want to add below incident then use task_ci table.

Thanks,
Ashutosh

Andrew Catchpol
Giga Contributor

 

Post affected CIs using Incident Number and CI name

POST https://devxxxx.service-now.com/api/now/table/task_ci?sysparm_display_value=true

Request Body  {"ci_item":"Salt Lake City power","task":"INC0000046"}

Retrive affected CIs using Incident Number (Task)

GET https://devxxxxx.service-now.com/api/now/table/task_ci/0c41176c2fab44d00e39f7ecf699b600?sysparm_display_value=true

GET https://devxxxx.service-now.com/api/now/table/task_ci?sysparm_query=taskLIKEINC0000046&sysparm_display_value=true&sysparm_limit=1

 

Andrew Catchpol
Giga Contributor

thank you @Ashutosh Munot 

Just needed your help to identify the correct table CIs_Affected (task_ci)

Regards Andrew