none
Using the JavaScript SDK in preview RRS feed

  • Question

  • I have been trying to use the JS SDK with a TSI preview service.

    When trying to query the service I get a error 400 (Bad Request) message.

    I think the problem as to do with the api version. The documentation states that preview requires  api-version=2018-11-01-preview, however the JS SDK doesn't let me choose the version and defaults to version 2016-12-12. Is this the problem?

    Is there a workaround for this?

    Thankyou in advance

    Wednesday, February 6, 2019 5:25 PM

Answers

  • Hello,

    Apologies for the delay.

    Since there was no indication of the library calls we need to do in order to use the preview SKU with the JS library, we searched the Service REST API for preview to find the differences between the GA and preview functions.

    Preview API documentation

    After knowing the functions, we searched in the JS library for these calls, then followed the flow to get to the main method in the library for what we wanted to do.

    Git hub source for the SDK library

     It was a tedious job, but we couldn't find any other way to do this.

    • Marked as answer by dtwaydd Friday, February 22, 2019 9:57 AM
    Friday, February 22, 2019 9:57 AM

All replies

  • Hi is it possible for you to share some code? Have you checked the Sample Application on the docs Tutorial: Explore the Azure Time Series Insights JavaScript client library
    Monday, February 11, 2019 9:41 PM
    Moderator
  • Hello,

    We have resolved this issue. The tutorial does not give documentation for the preview calls.

    That tutorial is specifically for the GA version. After much digging we were able to find the correct calls for the preview version. These are substantially different from what is shown in the tutorial.

    We will prepare a couple of indications of how we solved the issue and publish them on this thread so that anyone that comes next can get it working quickly. 

    Wednesday, February 13, 2019 9:38 AM
  • Thanks for the update and if you could share how you solved the issue that would be great :) 
    Wednesday, February 20, 2019 6:12 PM
    Moderator
  • Hello,

    Apologies for the delay.

    Since there was no indication of the library calls we need to do in order to use the preview SKU with the JS library, we searched the Service REST API for preview to find the differences between the GA and preview functions.

    Preview API documentation

    After knowing the functions, we searched in the JS library for these calls, then followed the flow to get to the main method in the library for what we wanted to do.

    Git hub source for the SDK library

     It was a tedious job, but we couldn't find any other way to do this.

    • Marked as answer by dtwaydd Friday, February 22, 2019 9:57 AM
    Friday, February 22, 2019 9:57 AM