Distinct Tag Values

I am trying to get a list of distinct values of a particular tag across all devices in my application. I think I can do this with a keyBy operation in a workflow, merged across pages of an open device query, but is there a better way? We have thousands of devices and can only paginate ~200 before we hit the 5MB payload limit.

Really, if I could just get an output of tag data and throw away all the other device information, I can go from there. I only need the one tag and it feels wasteful to grab an entire device of data just for one datapoint.

Based on your description of what you need, there is actually an API endpoint exactly for this use case - Device: Tag Values. That endpoint, given a tag key (and an optional device query filter), will return up to one thousand unique tag values for that key. You should be able to use this endpoint in a workflow using the Losant API node. Let me know if that is what you are looking for!

This works perfectly, thank you.