You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/time-series-insights/time-series-insights-manage-reference-data-csharp.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,15 +9,25 @@ manager: cshankar
9
9
ms.devlang: csharp
10
10
ms.workload: big-data
11
11
ms.topic: conceptual
12
-
ms.date: 01/27/2020
12
+
ms.date: 01/31/2020
13
13
ms.custom: seodec18
14
14
---
15
15
16
16
# Manage GA reference data for an Azure Time Series Insights environment using C#
17
17
18
18
This article demonstrates how to combine C#, [MSAL.NET](https://github.com/AzureAD/microsoft-authentication-library-for-dotnet), and Azure Active Directory to make programmatic API requests to the Azure Time Series Insights GA [Reference Data Management API](https://docs.microsoft.com/rest/api/time-series-insights/ga-reference-data-api).
19
19
20
-
## Prerequisites
20
+
## Summary
21
+
22
+
The sample code below demonstrates the following features:
23
+
24
+
* Acquiring an access token using [MSAL.NET](https://github.com/AzureAD/microsoft-authentication-library-for-dotnet)**PublicClientApplication**.
25
+
* Sequential CREATE, READ, UPDATE, and DELETE operations against the GA [Reference Data Management API](https://docs.microsoft.com/rest/api/time-series-insights/ga-reference-data-api).
26
+
* Common response codes including [common error codes](https://docs.microsoft.com/rest/api/time-series-insights/ga-reference-data-api#validation-and-error-handling).
27
+
28
+
The Reference Data Management API processes each item individually and an error with one item does not prevent the others from successfully completing. For example, if your request has 100 items and one item has an error, then 99 items are written and one is rejected.
29
+
30
+
## Prerequisites and setup
21
31
22
32
Complete the following steps before you compile and run the sample code:
The sample code above demonstrates the following features:
298
-
299
-
* Acquiring an access token using [MSAL.NET](https://github.com/AzureAD/microsoft-authentication-library-for-dotnet)**PublicClientApplication**.
300
-
* Sequential CREATE, READ, UPDATE, and DELETE operations against the GA [Reference Data Management API](https://docs.microsoft.com/rest/api/time-series-insights/ga-reference-data-api).
301
-
* Common response codes including [common error codes](https://docs.microsoft.com/rest/api/time-series-insights/ga-reference-data-api#validation-and-error-handling).
302
-
303
-
The Reference Data Management API processes each item individually and an error with one item does not prevent the others from successfully completing. For example, if your request has 100 items and one item has an error, then 99 items are written and one is rejected.
304
-
305
305
## Next steps
306
306
307
307
- Read the GA [Reference Data Management API](https://docs.microsoft.com/rest/api/time-series-insights/ga-reference-data-api) reference documentation.
Copy file name to clipboardExpand all lines: articles/time-series-insights/time-series-insights-query-data-csharp.md
+53-11Lines changed: 53 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,34 +9,76 @@ manager: cshankar
9
9
ms.devlang: csharp
10
10
ms.workload: big-data
11
11
ms.topic: conceptual
12
-
ms.date: 12/02/2019
12
+
ms.date: 01/31/2020
13
13
ms.custom: seodec18
14
14
---
15
15
16
16
# Query data from the Azure Time Series Insights GA environment using C#
17
17
18
-
This C# example demonstrates how to querydata from the Azure Time Series Insights GA environment.
18
+
This C# example demonstrates how to use the [GA Query APIs](https://docs.microsoft.com/rest/api/time-series-insights/ga-query) to query data from Azure Time Series Insights GA environments.
19
19
20
-
The sample shows several basic examples of Query API usage:
20
+
## Summary
21
21
22
-
1. As a preparation step, acquire the access token through the Azure Active Directory API. Pass this token in the `Authorization` header of every Query API request. For setting up non-interactive applications, see [Authentication and authorization](time-series-insights-authentication-and-authorization.md). Also, ensure all the constants defined at the beginning of the sample are correctly set.
23
-
1. The list of environments that the user has access to is obtained. One of the environments is picked up as the environment of interest, and further data is queried for this environment.
24
-
1. As an example of HTTPS request, availability data is requested for the environment of interest.
25
-
1. As an example of web socket request, event aggregates data is requested for the environment of interest. Data is requested for the whole availability time range.
22
+
The sample code below demonstrates the following features:
23
+
24
+
* How to acquire an access token through Azure Active Directory using [Microsoft.IdentityModel.Clients.ActiveDirectory](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/).
25
+
26
+
* How to pass that acquired access token in the `Authorization` header of subsequent Query API requests.
27
+
28
+
* The sample calls each of the GA Query APIs demonstrating how HTTP requests are made to the:
29
+
*[Get Environments API](https://docs.microsoft.com/rest/api/time-series-insights/ga-query-api#get-environments-api) to return the environments the user has access to
> The example code is available at [https://github.com/Azure-Samples/Azure-Time-Series-Insights](https://github.com/Azure-Samples/Azure-Time-Series-Insights/tree/master/csharp-tsi-ga-sample).
29
42
30
-
## Project Dependencies
43
+
## Prerequisites and setup
44
+
45
+
Complete the following steps before you compile and run the sample code:
46
+
47
+
1.[Provision a GA Azure Time Series Insights](https://docs.microsoft.com/azure/time-series-insights/time-series-insights-get-started) environment.
48
+
49
+
1. Configure your Azure Time Series Insights environment for Azure Active Directory as described in [Authentication and authorization](time-series-insights-authentication-and-authorization.md).
50
+
51
+
1. Install the required project dependencies.
52
+
53
+
1. Edit the sample code below by replacing each **#DUMMY#** with the appropriate environment identifier.
54
+
55
+
1. Execute the code inside Visual Studio.
56
+
57
+
> [!TIP]
58
+
> * View other GA C# code samples at [https://github.com/Azure-Samples/Azure-Time-Series-Insights](https://github.com/Azure-Samples/Azure-Time-Series-Insights/tree/master/csharp-tsi-ga-sample).
59
+
60
+
## Project dependencies
61
+
62
+
It's recommended that you use the newest version of Visual Studio:
63
+
64
+
*[Visual Studio 2019](https://visualstudio.microsoft.com/vs/) - Version 16.4.2+
0 commit comments