Skip to main content
10-Marble
January 6, 2022
Solved

How do you properly invoke AddVisibilityPermission within Thingworx REST API properly?

  • January 6, 2022
  • 2 replies
  • 1687 views

Hello! Currently, I'm playing around with the Thingworx REST API.

I am trying to connect a ThingShape's visibility to an organizational unit. The highest Unit is "TopOrg" and the one directly below is "Administrator". Below that is "Worker", so TopOrg > Administrator > Worker.

According to documentation I need a "principal" and "principalType"

I've left my principalType to be "OrganizationalUnit", but I can't seem to get a correct "principal". I've tried "Administrator", "TopOrg:Administrator" and "TopOrg/Administrator". In either form, I get an error similar to this.

Unable to Invoke Service AddVisibilityPermission on AdminShape : Invalid Entity Reference: OrganizationalUnit/TopOrg/Administrator

How are principals properly formated?

PB_10110760_0-1641487158767.png

 

Best answer by GuruPrasad1

PrincipalType is Organization
Principlal is "TopOrg" in your case

PrincipalType is OrganizationUnit
Principlal is "Administrator" in your case

 

PrincipalType is OrganizationUnit
Principlal is "Worker" in your case

 

you have to set separately for each org / orgUnit.

2 replies

16-Pearl
January 7, 2022

@pjbiocco 

 

You can check the explanation provided in help center guide .

 

Regards,

Sachin Sharma

12-Amethyst
January 7, 2022

PrincipalType is Organization
Principlal is "TopOrg" in your case

PrincipalType is OrganizationUnit
Principlal is "Administrator" in your case

 

PrincipalType is OrganizationUnit
Principlal is "Worker" in your case

 

you have to set separately for each org / orgUnit.