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

Programmatically set Mashup tags?

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.

Tags (1)
2 REPLIES 2

Programmatically set Mashup tags?

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.

Programmatically set Mashup tags?

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.