Query - Get

분석 쿼리 실행
데이터에 대한 분석 쿼리를 실행합니다.

GET https://api.applicationinsights.io/v1/apps/{appId}/query?query={query}
GET https://api.applicationinsights.io/v1/apps/{appId}/query?query={query}&timespan={timespan}

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
appId
path True

string

애플리케이션의 ID입니다. Azure Portal API 액세스 설정 블레이드의 애플리케이션 ID입니다.

query
query True

string

분석 쿼리입니다. Analytics 쿼리 구문에 대해 자세히 알아보기

timespan
query

string

선택 사항입니다. 데이터를 쿼리할 시간 범위입니다. 이는 ISO8601 기간 값입니다. 이 시간 범위는 쿼리 식에 지정된 시간 범위 외에 적용됩니다.

응답

Name 형식 Description
200 OK

queryResults

성공적인 응답

Other Status Codes

errorResponse

오류 응답 개체입니다.

보안

oauth2

Azure 애플리케이션 Insights API에 연결

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize?resource=https%3A%2F%2Fapi.applicationinsights.io

Scopes

Name Description
user_impersonation 사용자 계정 가장

예제

queryGet

Sample Request

GET https://api.applicationinsights.io/v1/apps/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/query?query=requests | take 10&timespan=PT12H

Sample Response

x-ms-request-id: 58a37988-2c05-427a-891f-5e0e1266fcc5
x-ms-correlation-request-id: 58a37988-2c05-427a-891f-5e0e1266fcc5
{
  "tables": [
    {
      "name": "PrimaryResult",
      "columns": [
        {
          "name": "timestamp",
          "type": "datetime"
        },
        {
          "name": "id",
          "type": "string"
        },
        {
          "name": "source",
          "type": "string"
        },
        {
          "name": "name",
          "type": "string"
        },
        {
          "name": "url",
          "type": "string"
        },
        {
          "name": "success",
          "type": "string"
        },
        {
          "name": "resultCode",
          "type": "string"
        },
        {
          "name": "duration",
          "type": "real"
        },
        {
          "name": "performanceBucket",
          "type": "string"
        },
        {
          "name": "customDimensions",
          "type": "dynamic"
        },
        {
          "name": "customMeasurements",
          "type": "dynamic"
        },
        {
          "name": "operation_Name",
          "type": "string"
        },
        {
          "name": "operation_Id",
          "type": "string"
        },
        {
          "name": "operation_ParentId",
          "type": "string"
        },
        {
          "name": "operation_SyntheticSource",
          "type": "string"
        },
        {
          "name": "session_Id",
          "type": "string"
        },
        {
          "name": "user_Id",
          "type": "string"
        },
        {
          "name": "user_AuthenticatedId",
          "type": "string"
        },
        {
          "name": "user_AccountId",
          "type": "string"
        },
        {
          "name": "application_Version",
          "type": "string"
        },
        {
          "name": "client_Type",
          "type": "string"
        },
        {
          "name": "client_Model",
          "type": "string"
        },
        {
          "name": "client_OS",
          "type": "string"
        },
        {
          "name": "client_IP",
          "type": "string"
        },
        {
          "name": "client_City",
          "type": "string"
        },
        {
          "name": "client_StateOrProvince",
          "type": "string"
        },
        {
          "name": "client_CountryOrRegion",
          "type": "string"
        },
        {
          "name": "client_Browser",
          "type": "string"
        },
        {
          "name": "cloud_RoleName",
          "type": "string"
        },
        {
          "name": "cloud_RoleInstance",
          "type": "string"
        },
        {
          "name": "appId",
          "type": "string"
        },
        {
          "name": "appName",
          "type": "string"
        },
        {
          "name": "iKey",
          "type": "string"
        },
        {
          "name": "sdkVersion",
          "type": "string"
        },
        {
          "name": "itemId",
          "type": "string"
        },
        {
          "name": "itemType",
          "type": "string"
        },
        {
          "name": "itemCount",
          "type": "int"
        }
      ],
      "rows": [
        [
          "2018-02-01T17:33:09.788Z",
          "|0qRud6jz3k0=.c32c2659_",
          null,
          "GET Reports/Index",
          "http://fabrikamfiberapp.azurewebsites.net/Reports",
          "True",
          "200",
          "3.3833",
          "<250ms",
          "{\"_MS.ProcessedByMetricExtractors\":\"(Name:'Requests', Ver:'1.0')\"}",
          null,
          "GET Reports/Index",
          "0qRud6jz3k0=",
          "0qRud6jz3k0=",
          "Application Insights Availability Monitoring",
          "9fc6738d-7e26-44f0-b88e-6fae8ccb6b26",
          "us-va-ash-azr_9fc6738d-7e26-44f0-b88e-6fae8ccb6b26",
          null,
          null,
          "AutoGen_49c3aea0-4641-4675-93b5-55f7a62d22d3",
          "PC",
          null,
          null,
          "52.168.8.0",
          "Boydton",
          "Virginia",
          "United States",
          null,
          "fabrikamfiberapp",
          "RD00155D5053D1",
          "cf58dcfd-0683-487c-bc84-048789bca8e5",
          "fabrikamprod",
          "5a2e4e0c-e136-4a15-9824-90ba859b0a89",
          "web:2.5.0-33031",
          "051ad4ef-0776-11e8-ac6e-e30599af6943",
          "request",
          "1"
        ],
        [
          "2018-02-01T17:33:15.786Z",
          "|x/Ysh+M1TfU=.c32c265a_",
          null,
          "GET Home/Index",
          "http://fabrikamfiberapp.azurewebsites.net/",
          "True",
          "200",
          "716.2912",
          "500ms-1sec",
          "{\"_MS.ProcessedByMetricExtractors\":\"(Name:'Requests', Ver:'1.0')\"}",
          null,
          "GET Home/Index",
          "x/Ysh+M1TfU=",
          "x/Ysh+M1TfU=",
          "Application Insights Availability Monitoring",
          "58b15be6-d1e6-4d89-9919-52f63b840913",
          "emea-se-sto-edge_58b15be6-d1e6-4d89-9919-52f63b840913",
          null,
          null,
          "AutoGen_49c3aea0-4641-4675-93b5-55f7a62d22d3",
          "PC",
          null,
          null,
          "51.141.32.0",
          "Cardiff",
          "Cardiff",
          "United Kingdom",
          null,
          "fabrikamfiberapp",
          "RD00155D5053D1",
          "cf58dcfd-0683-487c-bc84-048789bca8e5",
          "fabrikamprod",
          "5a2e4e0c-e136-4a15-9824-90ba859b0a89",
          "web:2.5.0-33031",
          "051ad4f0-0776-11e8-ac6e-e30599af6943",
          "request",
          "1"
        ]
      ]
    }
  ]
}

정의

Name Description
column

테이블 열입니다.

errorDetail

오류 세부 정보입니다.

errorInfo

오류에 대한 코드 및 메시지입니다.

errorResponse

오류 세부 정보입니다.

queryResults

쿼리 응답입니다.

table

쿼리 응답 테이블입니다.

column

테이블 열입니다.

Name 형식 Description
name

string

이 열의 이름입니다.

type

string

이 열의 데이터 형식입니다.

errorDetail

오류 세부 정보입니다.

Name 형식 Description
additionalProperties

object

code

string

오류의 코드입니다.

message

string

사람이 읽을 수 있는 오류 메시지입니다.

resources

string[]

오류를 담당한 리소스를 나타냅니다.

target

string

요청에서 오류를 담당하는 속성을 나타냅니다.

value

string

오류를 담당하는 '대상'의 값을 나타냅니다.

errorInfo

오류에 대한 코드 및 메시지입니다.

Name 형식 Description
additionalProperties

object

code

string

컴퓨터에서 읽을 수 있는 오류 코드입니다.

details

errorDetail[]

오류 세부 정보입니다.

innererror

errorInfo

오류에 대한 코드 및 메시지입니다.
내부 오류 세부 정보(있는 경우)

message

string

사람이 읽을 수 있는 오류 메시지입니다.

errorResponse

오류 세부 정보입니다.

Name 형식 Description
error

errorInfo

오류에 대한 코드 및 메시지입니다.
오류 세부 정보입니다.

queryResults

쿼리 응답입니다.

Name 형식 Description
tables

table[]

테이블, 열 및 행 목록입니다.

table

쿼리 응답 테이블입니다.

Name 형식 Description
columns

column[]

이 테이블의 열 목록입니다.

name

string

테이블의 이름입니다.

rows

string[]

이 쿼리의 결과 행입니다.