Get Owner-Group Name via REST api/now/table/cmdb_ci.

Benedikt Kaiser
Tera Contributor

Hi,

I have a small problem with the SeviceNOW API.

 

I am currently try to query many different CIs via api/now/table/cmdb_ci.

With the sysparm_query I get back like 500 CIs. I also need the NAME of the u_owner_group of each CI. However, the only thing I get back is the link and sys_id of the owner_group.

Is there any way to get the name back without making an additional REST call?

 

I tried it with sysparm_fields=owner_group and others but haven't found any solution.

 

Would be very glad if someone can help me.

 

1 ACCEPTED SOLUTION

Ahmmed Ali
Mega Sage

Hello @Benedikt Kaiser 

 

You need to add one more query parameter in your API to have display value of the fields in response instead of backend value, i.e sys_id will be the actual value stored in reference fields (example assignment group, assigned_to, caller etc) in database.

 

The parameter is sysparm_display_value=true

 

For details refer: https://docs.servicenow.com/bundle/rome-application-development/page/integrate/inbound-rest/concept/...

 

Thank you,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

View solution in original post

1 REPLY 1

Ahmmed Ali
Mega Sage

Hello @Benedikt Kaiser 

 

You need to add one more query parameter in your API to have display value of the fields in response instead of backend value, i.e sys_id will be the actual value stored in reference fields (example assignment group, assigned_to, caller etc) in database.

 

The parameter is sysparm_display_value=true

 

For details refer: https://docs.servicenow.com/bundle/rome-application-development/page/integrate/inbound-rest/concept/...

 

Thank you,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali