Hi @development3 Greetings! Welcome to Microsoft Q&A forum! Thank you posting the question here.
You have mentioned in your post that you are using Azure Time Series Insights Gen2. I would like to clarify that the end point you are referring to in the sample you have shared is for Gen1
and does not apply to Gen2. Please refer the documentation on Azure Time Series Insights Gen1 Query API which provides details on the Get Environment Aggregates API end point which is used to group events by a specified property as it optionally measures the values of other properties on Gen1
.
Here is a reference to the documentation on Azure Time Series Insights Gen2 Environments APIs . Here is another reference which provides Examples of Aggregate series on Time Series Gen2.
Note that the URL you are using to obtain the authentication token may be outdated. Per the current documentation, the AuthURL is https://login.microsoftonline.com/microsoft.onmicrosoft.com/oauth2/authorize?scope=https://api.timeseries.azure.com//.default
. Please refer the resource Requesting Tokens for clarification on this.
Hope this helps. Please let us know if you have any additional questions or need further assistance on this in the comments below. We would be glad to help you further.
If the response helped, please do click Accept Answer and Yes. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.