Skip to main content
1-Visitor
August 6, 2016
Question

Rest API to get Things that user has permission to

  • August 6, 2016
  • 1 reply
  • 3210 views

We want to query for all the Things that a user (current user) has permission to and based on the ThingTemplate of the Thing or based on a property on the Thing. Could you please let us know how can we achieve this with Restful API.

*Edit*

We can consider filtering by design time read or run time read.

Thanks

1 reply

5-Regular Member
August 8, 2016

Hi Pavan,

By default; ThingWorx system shows only the entities for which user has visibility permission.

Sample RestAPI example:

https://<Thingworx_URL_Here>/Thingworx/ThingTemplates/<ThingTemplate_Name_Here>/ImplementingThings/

For e.g. if user has visibility to only two Things out of five implementing Thing of the Thing Template; he/she will receive the two he/she has access to as response. Here I am considering that user has access to the ThingTemplate whose Implementing Thing we want to view.

I hope it helps.

Thanks,

Ankit Gupta

1-Visitor
August 9, 2016

Hi Ankit Thanks for providing the Rest API.

2 issues:

1. Even though the user does not have any access to the ThingTemplate, the user can execute this service from a Postman using the Basic Authentication in header.

Does this API go by the visibility (Orgs and Org Units) or by Runtime permissions for filtering out the results?

2. It is returning all the implementing things even though I did not set the visibility to any org.

Does it return results based only visibility of the Thing or Design Time or Run time permissions?

Thanks

Pavan

5-Regular Member
August 10, 2016

Hi Pavan,

It seems that you have users group added in the Everyone organization. Could you please remove users from Everyone organization and recheck.

Also, please share the ThingWorx version you are on.

Thanks,

Ankit Gupta