none
TSI (Preview) REST API not working RRS feed

  • Question

  • Hi all,

          I am trying to call REST Api for TSI (preview - SKU PAYG) by Postman.

    I followed this link REST APIs with Postman in 2 Minutes and I successfully get the token. 

    I copied the FQND from the portal and called the "Get Instances" (GET https://{MyFQDN}.env.timeseries.azure.com/timeseries/instances?api-version=2018-11-01-preview) and this error is returned

    {
        "error": {
            "code": "ResourceNotFound",
            "message": "Environment with id '
    {MyFQDN}' is not found."
        }
    }

    So I tried to call the "Get Environments" (GET https://api.timeseries.azure.com/timeseries/environments?api-version=2016-12-12) and I got this error.

    {
        "error": {
            "code": "InvalidUrl",
            "message": "The request URL '/timeseries/environments' could not be parsed."
        }
    }

    I am not sure if this feature in alreagy available. considering the documentation is still imprecise.

    Thanks all,

    Dan

    Thursday, January 24, 2019 3:41 PM

Answers

  • Hello DanVe,

    Thank you for your patience. In order to retrieve the environments you will need to add the application to "Data Access Policies" as well. See here how to do it.

    By granting access to the app on Access Control (IAM), we only give access to the Management APIs (that is why the APIs did not fail but returned empty). Data Access policies are different from that and needs to be given specifically for every user/app.

    We acknowledge that the reference to the instructions doc should be added to the REST API here. Work is in progress to improve the documentation related with the REST API. Thank you so much for your feedback.

    Let us know if this can now be marked as answer?

    Wednesday, March 20, 2019 10:23 AM
    Moderator

All replies

  • Hi DanVe,

    Can you make sure you are following all the Common Headers and Parameters (I am almost sure you are since you don't have an authorization error but I found it worth to ask)?

    https://docs.microsoft.com/en-us/rest/api/time-series-insights/preview-query#common-headers-and-parameters

    1) When did you create the Time Series Insights SKU PAYG?

    2) Can you Visualize data in the explorer Preview?

    3) Can you create a new one and test it? You can try creating it on a different region.

    I will go ahead and check if there are any known issues with the REST API.

    Thanks!

    Friday, January 25, 2019 2:24 PM
    Moderator
  • Hi Antonio,

         I have the Authorization header required, but not the optional headers.

    To answer to your other questions.

    1) I create the TSI on Wednesday, January 23, 2019, 3:27:56 PM. It is deployed in West Europe. 

    2) Yes, I correctly visualize data

    3) I will try, but in these days I will be out of office.

    Thanks,

    Daniele

    Monday, January 28, 2019 1:12 PM
  • I created a new TSI environment in East US, but I have the same problems.

    "Get Environments" returns 400 Bad Request and "Get Instances" returns 404 Not found with the error descripted in the previous post.

    Thanks,

    Daniele 

    Tuesday, January 29, 2019 10:05 AM
  • Following this blog https://blogs.technet.microsoft.com/uktechnet/2018/04/26/use-the-query-apis-to-unlock-the-power-of-azure-time-series-insights/ I retried "Get Environments" without "timeseries" in path and works but the response is empty (this explains why "Get Instances" returns 404).

    {
        "environments": []
    }

    However I don't understand why, is something missing in the call?

    Also I have to notice there is a big lack in the documentation that should be notify to the holder.

    1)

    https://api.timeseries.azure.com/timeseries/environments?api-version=2016-12-12 -> Does not work

    https://api.timeseries.azure.com/environments?api-version=2016-12-12 -> Works

    2)

    An example is provided without any explanation.

    GET https://123f394f-a3c6-4cc2-b13a-55e2fcf57823.env.timeseries.azure.com/timeseries/instances?api-version=2018-11-01-preview

    What is "123f394f-a3c6-4cc2-b13a-55e2fcf57823.env.timeseries.azure.com" (the FQND) is not explained.

    Tuesday, January 29, 2019 11:23 AM
  • Thanks Dan for all the reported results!

    I can repro all and I am discussing it internally. Will get back to you soon!

    Tuesday, January 29, 2019 5:10 PM
    Moderator
  • Hi Antonio,

        any updates after your internal discussion?

    Thanks,

    Daniele

    Tuesday, February 12, 2019 10:48 AM
  • Sorry for taking some time on this Dan, it is not forgotten.

    Will get back to you soon.

    Appreciate your time in advance.

    Tuesday, February 26, 2019 3:20 PM
    Moderator
  • Hello DanVe,

    Thank you for your patience. In order to retrieve the environments you will need to add the application to "Data Access Policies" as well. See here how to do it.

    By granting access to the app on Access Control (IAM), we only give access to the Management APIs (that is why the APIs did not fail but returned empty). Data Access policies are different from that and needs to be given specifically for every user/app.

    We acknowledge that the reference to the instructions doc should be added to the REST API here. Work is in progress to improve the documentation related with the REST API. Thank you so much for your feedback.

    Let us know if this can now be marked as answer?

    Wednesday, March 20, 2019 10:23 AM
    Moderator
  • I added the application to the Data Access policies and it works.

    Thanks for your support.

    Daniele

    Thursday, March 21, 2019 2:19 PM