07 Jun 2018 04:41 PM - last edited on 20 Feb 2023 12:20 PM by Karolina_Linda
As part of the Maintenance Window API functionality, in order to set the scope of a maintenance window to filter on tags, it is necessary to pass only valid tags. Is there an API method to retrieve the valid tag list, similar to generating the list that pops up in the UI?
Solved! Go to Solution.
07 Jun 2018 07:58 PM
You could probably use the topology api and then crawl through that to pull the available tags. I'm not aware of an API endpoint that just pulls that. I'd submit an RFE.
13 Jun 2018 08:57 PM
I ended up using the Host entities feed , and then transforming that into a distinct list:
var listTags = from h in Entities
from t in h.Tags
select t.Key;
_uniqueTags = listTags.Distinct().OrderBy(x=>x).ToList();
return _uniqueTags;
}