Time Series Insights API 'aggregates' is not supported for environment '....'

Denice 21 Reputation points
2021-07-06T09:30:17.747+00:00

Hi,

I have a web application where I try to visualize the data I have in my Time Series Insights environment in a basic chart with the Azure Time Series Insights Javascript SDK, but when I try to get the data I get the following error:

112094-error-in-webapp.png

When trying this is postman I get the following:

112066-api-call.png
112115-error-api-call.png

Because of the error this is what I see in my webapp:

112114-image.png

I don't know exactly what I need to do to fix this problem so I'm hoping someone can help me with this problem.

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.
74 questions
{count} votes

Accepted answer
  1. QuantumCache 20,031 Reputation points
    2021-07-07T00:21:17.637+00:00

    Hello @Denice

    If you are using Gen2, then the below sample is useful.

    this is an example of how to use the SDK with a Gen2 (aka PAYG) environment

    https://tsiclientsample.azurewebsites.net/withplatform/PAYG.html


1 additional answer

Sort by: Most helpful
  1. Karthik Shetty 6 Reputation points
    2021-09-01T13:05:52.657+00:00

    Hello @QuantumCache , @Denice

    I have a web application where I try to visualize the data I have in my Time Series Insights environment in a basic chart with the Azure Time Series Insights Javascript SDK same as above i got an input aggregate error.

    I am using Gen2, i need to shape json for sending data, Is there any document for shaping JSON
    In Document link was Broken https://learn.microsoft.com/en-us/azure/time-series-insights/how-to-shape-json.

    tsiClient.server.getTsqResults(response.accessToken, '10000000000000000'.env.timeseries.azure.com', linechartTsqExpressions.map(function(ae){return ae.toTsq()})).then(function(result){
    console.log(result)
    // result I am getting 400 response.