How to fix "ResourceNotFound" when post API to env.timeseries.azure.com/aggregates?api-version

development3 25 Reputation points
2023-05-17T10:31:21.1666667+00:00

I get error when try to post to "https://5bf0d40d-0537-474c-b40c-aa892eae792d.env.timeseries.azure.com/aggregates?api-version=2020-07-31"

Althought i can get access_token with URL "https://login.microsoftonline.com/b83edb26-0faf-4004-9eb2-7403e8c437ad/oauth2/token". I still can not access to timeseries.azure.com.

Do I missing any thing?

Sku of TSI is Gen2 (L1)

User's image

Azure Time Series Insights
Azure Time Series Insights
An Azure internet of things (IoT) analytics platform to monitor, analyze, and visualize industrial IoT analytics data at scale.
78 questions
{count} votes

Accepted answer
  1. LeelaRajeshSayana-MSFT 16,281 Reputation points
    2023-05-22T22:11:54.0266667+00:00

    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.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.