title | description |
---|---|
Hello World Single Page Web Application |
This sample shows how to create a simple single page web application in JavaScript that uses Time Series Insights Query API and does not require any server-side code.
This article explains how to configure a custom application that calls the Azure Time Series Insights API.
-
In the Azure portal, select Azure Active Directory > App registrations > New application registration.
-
Give the application a name, select the type to be Web app / API, select "http://localhost/" for Sign-on URL, and click Create.
-
Select your newly created application and copy its application ID to your favorite text editor.
-
Click on Manifest and change "oauth2AllowImplicitFlow" to true, click Save.
-
Click on Settings, API Access, Required Permissions, Add.
-
Select Azure Time Series Insights, check the permissions checkbox, click on Select and Done buttons.
- Enable IIS if not already enabled (http://www.betterhostreview.com/turn-on-iis-windows-10.html)
- Download sample zip file and extract to a file location (e.g. C:\TsiHelloWorldSampleApp)
- Create a new web site with
- Physical path: C:\TsiHelloWorldSampleApp
- Binding Type: http
- IP address: All unassigned
- Port: 80
- Host name: localhost
- Allow IIS AppPool\DefaultAppPool access to your sample folder (e.g. C:\TsiHelloWorldSampleApp)
- Edit C:\TsiHelloWorldSampleApp\index.html and populate clientId with application ID and &&postLogoutRedirectUri to be the same as in application registration.
- Navigate to http://localhost/ in your browser.
- Query API for the full Query API reference
- Create a service principal in the Azure portal