Skip to content

Commit d6f5e69

Browse files
committed
authorization
1 parent a8d0aee commit d6f5e69

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

articles/time-series-insights/time-series-insights-authentication-and-authorization.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.reviewer: v-mamcge, jasonh, kfile
1010
ms.devlang: csharp
1111
ms.workload: big-data
1212
ms.topic: conceptual
13-
ms.date: 08/08/2019
13+
ms.date: 09/23/2019
1414
ms.custom: seodec18
1515
---
1616

@@ -96,6 +96,50 @@ Per **step 3**, separating your application's and your user credentials allows y
9696

9797
1. The token can then be passed in the `Authorization` header when the application calls the Time Series Insights API.
9898

99+
## Common headers and parameters
100+
101+
This section describes common HTTP request headers and parameters used to make queries against the Time Series Insights GA and Preview APIs. API-specific requirements are covered in greater detail in the [Time Series Insights REST API reference documentation](https://docs.microsoft.com/rest/api/time-series-insights/).
102+
103+
### Authentication
104+
105+
To perform authenticated queries against the [Time Series Insights REST APIs](https://docs.microsoft.com/rest/api/time-series-insights/), a valid OAuth 2.0 bearer token must be passed in the [Authorization header](/rest/api/apimanagement/authorizationserver/createorupdate) using a REST client of your choice (Postman, JavaScript, C#).
106+
107+
> [!IMPORTANT]
108+
> The token must be issued exactly to the `https://api.timeseries.azure.com/` resource (also known as the "audience" of the token).
109+
> * Your [Postman](https://www.getpostman.com/) **AuthURL** with therefore conform to: `https://login.microsoftonline.com/microsoft.onmicrosoft.com/oauth2/authorize?resource=https://api.timeseries.azure.com/`
110+
111+
> [!TIP]
112+
> See the [Explore the Azure Time Series Insights JavaScript client library](tutorial-explore-js-client-lib.md#authentication) tutorial to see how to authenticate with the Time Series Insights APIs programmatically using the [JavaScript Client SDK](https://github.com/microsoft/tsiclient/blob/master/docs/API.md).
113+
114+
### HTTP headers
115+
116+
Required request headers:
117+
118+
- `Authorization` for authentication and authorization, a valid OAuth 2.0 Bearer token must be passed in the Authorization header. The token must be issued exactly to the `https://api.timeseries.azure.com/` resource (also known as the "audience" of the token).
119+
120+
Optional request headers:
121+
122+
- `Content-type` - only `application/json` is supported.
123+
- `x-ms-client-request-id` - a client request ID. Service records this value. Allows the service to trace operation across services.
124+
- `x-ms-client-session-id` - a client session ID. Service records this value. Allows the service to trace a group of related operations across services.
125+
- `x-ms-client-application-name` - name of the application that generated this request. Service records this value.
126+
127+
Response headers:
128+
129+
- `Content-type` - only `application/json` is supported.
130+
- `x-ms-request-id` - server-generated request ID. Can be used to contact Microsoft to investigate a request.
131+
132+
### HTTP parameters
133+
134+
Required URL query string parameters:
135+
136+
- `api-version=2016-12-12`
137+
- `api-version=2018-11-01-preview`
138+
139+
Optional URL query string parameters:
140+
141+
- `timeout=<timeout>` – server-side timeout for the request execution. Applicable only to the [Get Environment Events](https://docs.microsoft.com/rest/api/time-series-insights/ga-query-api#get-environment-events-api) and [Get Environment Aggregates](https://docs.microsoft.com/rest/api/time-series-insights/ga-query-api#get-environment-aggregates-api) APIs. Timeout value should be in ISO 8601 duration format, for example `"PT20S"` and should be in the range `1-30 s`. Default value is `30 s`.
142+
99143
## Next steps
100144

101145
- For sample code that calls the GA Time Series Insights API, see [Query data using C#](./time-series-insights-query-data-csharp.md).

0 commit comments

Comments
 (0)