IQueryOperations.ExecuteWithHttpMessagesAsync Method

Definition

Execute an Analytics query

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.ApplicationInsights.Query.Models.QueryResults>> ExecuteWithHttpMessagesAsync (string appId, string query, string timespan = default, System.Collections.Generic.IList<string> applications = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ExecuteWithHttpMessagesAsync : string * string * string * System.Collections.Generic.IList<string> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.ApplicationInsights.Query.Models.QueryResults>>
Public Function ExecuteWithHttpMessagesAsync (appId As String, query As String, Optional timespan As String = Nothing, Optional applications As IList(Of String) = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of QueryResults))

Parameters

appId
String

ID of the application. This is Application ID from the API Access settings blade in the Azure portal.

query
String

The query to execute.

timespan
String

Optional. The timespan over which to query data. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the query expression.

applications
IList<String>

A list of Application IDs for cross-application queries.

customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Exceptions

Thrown when the operation returned an invalid status code

Thrown when unable to deserialize the response

Thrown when a required parameter is null

Remarks

Executes an Analytics query for data.

Here is an example for using POST with an Analytics query.

Applies to