ReadAPI Multiple Aggregate Methods & Return Format
I’m wondering if the getTagData2 API method can return a list of tags over the same time interval but with different aggregate methods. Axiom seems to handle this, so I assume it's using the API under the hood—unless it's calling each trend separately.
Also, is there a way for the API to return data in CSV format directly? I know we can convert it ourselves, but I wanted to check if I missed something in the documentation.
3 replies
-
Hi ,
The API does not have the ability to request different aggregates through a single call. It would need to be a separate call per aggregate.
The payload is a JSON format which you would need to convert to a CSV. There are few powershell examples here that output a csv file (https://github.com/CanaryLabs/SampleCode/blob/master/Samples/V23/Data%20Retrieval/Powershell/ExportToCSV.ps1) but these are from v23. If you're using v24, there is no anonymous endpoint (55235) anymore. You would need to use the secure endpoint (55236) and pass in an apiToken.