Using the above service code mentioned by me, you can extract all the entities which are tagged with your tag. Once you get all those entities you have to loop through them and on the basis of parentType/parentName you can remove the tag on a particular entity name. For example, if you have parentType/parentName in the row as mashup then using the name column you can remove the tag. //below is just a sample code to explain how you can do it, I just wrote it but did not test the loop.
let params = {
maxItems: undefined /* NUMBER */,
searchExpression: undefined /* STRING */,
types: undefined /* JSON */,
aspects: undefined /* JSON */,
excludedAspects: undefined /* JSON */,
maxSearchItems: undefined /* NUMBER */,
tags: "ABC:Test" /* TAGS */
};
// result: INFOTABLE dataShape: EntityDescriptor
let table = Resources["SearchFunctions"].SearchModelEntities(params);
for(var a=0;a<table.length;a++)
{
If(table[a].parentType/parentName="Mashup")
Mashups[table[a].name].RemoveTags({
tags: "ABC:Test" /* TAGS */
});
else if (table[a].parentType/parentName="Thing")
{
Things[table[a].name].RemoveTags({
tags: "ABC:Test" /* TAGS */
});
//for all the different parentType/Name
}
}