Inventory Detail Call with "withParents=true" doesn't return parents

What product/components do you use and which version/fix level are you on?

"@c8y/client": "1015.0.218",
"@c8y/ng1-modules": "1015.0.218",
"@c8y/ngx-components": "1015.0.218",
"@c8y/style": "1015.0.218",

Is your question related to the free trial, or to a production (customer) instance?

Production

What are you trying to achieve? Please describe it in detail.

In my C8Y Angular Application, I am trying to get all the parents of one specific device. For that, I’m using the the detail function of the InventoryService. When I’m logged in with a user that has admin roles, this works. When I’m logged in with another user, that only has a Inventory Role for a specific group, the assetParents Array is empty. The Role has all inventory access fo that specific group. This is the device/group structure:

|- Group
|— Subgroup
|------ Device

The Inventory Role is activated for Group (and automaticaly for Subgroup) in this case, and when I call inventoryService.detail(deviceId, {withParents: true}), assetParents is empty.

Does anyone know, what I have to do to get the parents of the specific device?

Do you get any error messages? Please provide a full error message screenshot and log file.

Have you installed all the latest fixes for the products and systems you are using?

Same for plain REST call - when inventory roles are in use, even if the parent device is in the accessible group, it’s not returned with withParents=true.

There are known shortcomings with Inventory Roles, e.g. can’t use them with exports/reports. I think you’ve found another.

R&D are aware of these shortcomings and thought is being given to how they can be addressed, but this is no trivial task so won’t be a quick fix.

This should be raised as a support request.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.