Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
The following code snippet:
var params = {
principal: "AppUser" /* STRING */,
principalType: "Organization" /* STRING */,
collectionName: "Media" /* STRING */
};
// no return
Resources["CollectionFunctions"].AddCollectionVisibilityPermission(params);
gives the following error code:
[message: Execution error in service script [ThingName] : Unable to Invoke Service ServiceName on ThingName : Collection [Media does not exist]
What is the correct Collection name for Media Entities? This service worked for both "Things" and "ThingTemplates".
The only information available on the API is:
collectionName
- Collection name (Things, Users, ThingShapes, etc.) - STRING
Solved! Go to Solution.
Hi,
When I tried to view Media Entity lists, I had to use MediaEntities as below.
https://YOURSERVER:443/Thingworx/MediaEntities
So can you try calling the service with "MediaEntities" as the collectionName, instead of "Media"?
- var params = {
- principal: "AppUser" /* STRING */,
- principalType: "Organization" /* STRING */,
- collectionName: "MediaEntities" /* STRING */
- };
Thanks,
Takaaki
Hi,
When I tried to view Media Entity lists, I had to use MediaEntities as below.
https://YOURSERVER:443/Thingworx/MediaEntities
So can you try calling the service with "MediaEntities" as the collectionName, instead of "Media"?
- var params = {
- principal: "AppUser" /* STRING */,
- principalType: "Organization" /* STRING */,
- collectionName: "MediaEntities" /* STRING */
- };
Thanks,
Takaaki