cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Programmatically set Mashup tags?

ptc-6292103
1-Newbie

Programmatically set Mashup tags?

Is there a way to change Mashup tags via script?

I have several (~40) Mashups which need a tag removed.

2 REPLIES 2

Chad, 

Every Thingworx entity has a service for adding tags and removing tags. You simply pass in the tag that you want to add or remove. For example: http://server/Thingworx/Users/ryan.miller@thingworx.com/Services/RemoveTags?tags=Applications:FancyApp will remove the 'Applications:FancyApp' from the User ryan.miller@thingworx.com.

abalousek
6-Contributor
(To:ptc-6292103)

Assuming that you are referring to ThingWorx scripting, in the current 3.2 version you cannot 'directly' script to a Mashup. In theory you will be able to do the following in 4.0:


var params = {

tags: undefined /* TAGS */

};

Mashups["<MashupName>"].RemoveTags(params);

...but as Ryan points out you could always use direct API calls in external scripts...this could even be facilitated in a ThingWorx script using the ContentLoader Resource Post functionality, although we don't consider it best practice to call a ThingWorx API (via URL) from within a ThingWorx script.




Top Tags