ServiceNow CMDB get CI Relationships data - API

2.2k Views Asked by At

API Question for CMDB ServiceNow,

Trying to GET data from the CI Relationships tab that is within a Business AP (as presented in the UI) that falls under a business owner.

Steps:

  1. Getting the business owner ID:

GET https://xxx.service-now.com/api/now/table/sys_user?sysparm_query=email%3D{xxxx.com}&sysparm_limit=1

  1. Getting the Business Apps owned by the owner ID:

GET https://xxx.service-now.com/api/now/table/cmdb_ci_business_app?sysparm_query=owned_by%3Da3e8xxxxxxxx6d19e484755b0d&sysparm_limit=10

  1. and how to get the data with the CI Relationships:

I tried;

https://xxx.service-now.com/api/now/table/cmdb_rel_type?sysparm_query=sys_id%3D{ID}&sysparm_limit=10

But I cannot find the link between a Business App and its CI Relationship's data

Any suggestions?

1

There are 1 best solutions below

1
On

Use cmdb_rel_ci (CI Relationships) instead of cmdb_rel_type (CI Relationship Type):

GET https://xxx.service-now.com/api/now/table/cmdb_rel_ci?sysparm_query=parent%3D{PARENT_SYS_ID}&sysparm_limit=10