Metadata - Get
取得元數據資訊
擷取應用程式的元數據資訊,包括其架構等等。
GET https://api.applicationinsights.io/v1/apps/{appId}/metadata
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
app
|
path | True |
string |
應用程式的識別碼。 這是 Azure 入口網站 中 [API 存取設定] 刀鋒視窗中的應用程式識別碼。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
成功的回應 |
|
Other Status Codes |
錯誤回應物件。 |
安全性
oauth2
連線至 Azure 應用程式 Insights API
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize?resource=https%3A%2F%2Fapi.applicationinsights.io
範圍
名稱 | Description |
---|---|
user_impersonation | 模擬您的用戶帳戶 |
範例
metadataGet
範例要求
GET https://api.applicationinsights.io/v1/apps/cf58dcfd-0683-487c-bc84-048789bca8e5/metadata
範例回覆
{
"tables": [
{
"id": "t/requests",
"name": "requests",
"timespanColumn": "timestamp",
"columns": [
{
"name": "timestamp",
"type": "datetime"
},
{
"name": "id",
"type": "string"
},
{
"name": "source",
"type": "string"
},
{
"name": "name",
"type": "string",
"isPreferredFacet": true
},
{
"name": "url",
"type": "string",
"isPreferredFacet": true
},
{
"name": "success",
"type": "string",
"isPreferredFacet": true
},
{
"name": "resultCode",
"type": "string",
"isPreferredFacet": true
},
{
"name": "duration",
"type": "real"
},
{
"name": "performanceBucket",
"type": "string",
"isPreferredFacet": true
},
{
"name": "itemType",
"type": "string"
},
{
"name": "customDimensions",
"type": "dynamic",
"isPreferredFacet": true
},
{
"name": "customMeasurements",
"type": "dynamic"
},
{
"name": "operation_Name",
"type": "string",
"isPreferredFacet": true
},
{
"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",
"isPreferredFacet": true
},
{
"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",
"isPreferredFacet": true
},
{
"name": "cloud_RoleName",
"type": "string",
"isPreferredFacet": true
},
{
"name": "cloud_RoleInstance",
"type": "string",
"isPreferredFacet": true
},
{
"name": "appId",
"type": "string"
},
{
"name": "appName",
"type": "string"
},
{
"name": "iKey",
"type": "string"
},
{
"name": "sdkVersion",
"type": "string"
},
{
"name": "itemId",
"type": "string"
},
{
"name": "itemCount",
"type": "int"
}
]
}
],
"tableGroups": [
{
"id": "ai/StandardSchema",
"name": "StandardSchema",
"source": "ai",
"tables": [
"t/requests"
]
}
],
"applications": [
{
"id": "cf58dcfd-0683-487c-bc84-048789bca8e5",
"name": "FabrikamProd",
"resourceId": "/subscriptions/72993b69-db12-44fc-9a66-9c2005c30513/resourceGroups/Fabrikam/providers/microsoft.insights/components/FabrikamProd",
"tables": [],
"region": "southcentralus",
"tableGroups": [
"ai/StandardSchema"
]
}
]
}
定義
名稱 | Description |
---|---|
Columns |
數據表上定義的數據列清單 |
error |
錯誤詳細數據。 |
error |
錯誤的程式代碼和訊息。 |
error |
錯誤詳細數據。 |
metadata |
Application Insights 應用程式。 |
Metadata |
數據行的數據類型 |
metadata |
預存函式。 |
metadata |
元數據回應。 |
metadata |
參與 Application Insights 應用程式架構的數據表。 |
metadata |
數據表群組。 |
Columns
數據表上定義的數據列清單
名稱 | 類型 | Description |
---|---|---|
description |
string |
數據行的描述 |
isPreferredFacet |
boolean |
指出此數據行為慣用 Facet 的旗標 |
name |
string |
資料行的名稱 |
source |
object |
數據行來源的指示,只有在多個應用程式有數據行的衝突定義時,才會使用 |
type |
數據行的數據類型 |
errorDetail
錯誤詳細數據。
名稱 | 類型 | Description |
---|---|---|
additionalProperties |
object |
|
code |
string |
錯誤的程序代碼。 |
message |
string |
人類可讀取的錯誤訊息。 |
resources |
string[] |
指出負責錯誤的資源。 |
target |
string |
指出要求中的哪個屬性負責錯誤。 |
value |
string |
指出 『target』 中的哪個值負責錯誤。 |
errorInfo
錯誤的程式代碼和訊息。
名稱 | 類型 | Description |
---|---|---|
additionalProperties |
object |
|
code |
string |
計算機可讀取的錯誤碼。 |
details |
錯誤詳細數據。 |
|
innererror |
錯誤的程式代碼和訊息。 |
|
message |
string |
人類可讀取的錯誤訊息。 |
errorResponse
錯誤詳細數據。
名稱 | 類型 | Description |
---|---|---|
error |
錯誤的程式代碼和訊息。 |
metadataApplication
Application Insights 應用程式。
名稱 | 類型 | Description |
---|---|---|
functions |
string[] |
Application Insights 應用程式上的預存函式清單 |
id |
string |
Application Insights 應用程式的標識碼。 |
name |
string |
Application Insights 應用程式的名稱。 |
region |
string |
Application Insights 應用程式的 Azure 區域。 |
resourceId |
string |
Application Insights 應用程式的 ARM 資源識別碼。 |
tableGroups |
string[] |
Application Insights 應用程式上的數據表群組清單 |
tables |
string[] |
Application Insights 應用程式的自定義數據表清單。 |
MetadataColumnDataType
數據行的數據類型
名稱 | 類型 | Description |
---|---|---|
bool |
string |
|
datetime |
string |
|
dynamic |
string |
|
int |
string |
|
long |
string |
|
real |
string |
|
string |
string |
metadataFunction
預存函式。
名稱 | 類型 | Description |
---|---|---|
body |
string |
函式的 KQL 主體。 |
description |
string |
函式的說明。 |
displayName |
string |
函式的顯示名稱。 |
id |
string |
函式的識別碼。 |
name |
string |
要用於查詢的函式名稱。 |
parameters |
string |
函式的參數/自變數,如果有的話。 |
metadataResults
元數據回應。
名稱 | 類型 | Description |
---|---|---|
applications |
元數據要求中所參考的Application Insights 應用程式清單。 |
|
functions |
儲存在應用程式上的函式清單。 |
|
tableGroups |
應用程式上的數據表群組清單。 |
|
tables |
組成應用程式架構的數據表和數據列清單。 |
metadataTable
參與 Application Insights 應用程式架構的數據表。
名稱 | 類型 | Description |
---|---|---|
columns |
Columns[] |
數據表上定義的數據列清單 |
description |
string |
數據表的描述 |
id |
string |
數據表的識別碼 |
name |
string |
資料表的名稱 |
timespanColumn |
string |
與數據表之 timespan 查詢參數相關聯的數據行 |
metadataTableGroup
數據表群組。
名稱 | 類型 | Description |
---|---|---|
description |
string |
數據表群組的描述 |
displayName |
string |
數據表群組的顯示名稱 |
id |
string |
數據表群組的標識碼 |
name |
string |
數據表群組的名稱 |
source |
string |
數據表群組的來源可以是Log Analytics工作區的 AI 或 OMS |
tables |
string[] |
數據表群組中包含的數據表清單 |