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.

how can I find the relation between CI and cmdb_ci_service table?

sai krishna25
Kilo Contributor

I am trying to find the relationship between CI table and cmdb_ci_service table. I need this information to find out the business criticality of the CI. I am looking to find it through API's.

1 ACCEPTED SOLUTION

Alikutty A
Tera Sage

Are you looking to find the criticality from its related business service? The CI relationships are stored in the cmdb_rel_ci table, so you could make API call to this table to fetch the Parent business service associated with the child CI and then access the required information from Parent.

View solution in original post

4 REPLIES 4

Alikutty A
Tera Sage

Are you looking to find the criticality from its related business service? The CI relationships are stored in the cmdb_rel_ci table, so you could make API call to this table to fetch the Parent business service associated with the child CI and then access the required information from Parent.

sai krishna25
Kilo Contributor

What if i found more than one Parent business service then how can I find the business criticality for the CI?

This is a process question. Ask this question to your process owner, how they want to handle this scenario and then implement it. The cmdb_rel_ci table should give what you need, you can then decide on what logic to be applied on calculating the criticality if there are more than one.

Harshinya1
Mega Guru

CMDB Instance API is an OOB API available to query for CI relationships, if this is something you are looking for. but the limitation is that the API returns only first level of parent or child relationships

https://docs.servicenow.com/bundle/madrid-application-development/page/integrate/inbound-rest/concep...

 

Hope this helps