Metadata - Post
Gets metadata information
Retrieve the metadata information for the app, including its schema, etc.
POST https://api.applicationinsights.io/v1/apps/{appId}/metadata
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
app
|
path | True |
string |
ID of the application. This is Application ID from the API Access settings blade in the Azure portal. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successful response |
|
Other Status Codes |
An error response object. |
Security
oauth2
Connect to Azure Application 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 | impersonate your user account |
Examples
metadataPost
Sample request
POST https://api.applicationinsights.io/v1/apps/cf58dcfd-0683-487c-bc84-048789bca8e5/metadata
Sample response
{
"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"
]
}
]
}
Definitions
Name | Description |
---|---|
Columns |
The list of columns defined on the table |
error |
Error details. |
error |
The code and message for an error. |
error |
Error details. |
metadata |
An Application Insights application. |
Metadata |
The data type of the column |
metadata |
A stored function. |
metadata |
A metadata response. |
metadata |
A data table that takes part in a schema of an Application Insights app. |
metadata |
A group of tables. |
Columns
The list of columns defined on the table
Name | Type | Description |
---|---|---|
description |
string |
The description of the column |
isPreferredFacet |
boolean |
A flag indicating this column is a preferred facet |
name |
string |
The name of the column |
source |
object |
an indication of the source of the column, used only when multiple apps have conflicting definition for the column |
type |
The data type of the column |
errorDetail
Error details.
Name | Type | Description |
---|---|---|
additionalProperties |
object |
|
code |
string |
The error's code. |
message |
string |
A human readable error message. |
resources |
string[] |
Indicates resources which were responsible for the error. |
target |
string |
Indicates which property in the request is responsible for the error. |
value |
string |
Indicates which value in 'target' is responsible for the error. |
errorInfo
The code and message for an error.
Name | Type | Description |
---|---|---|
additionalProperties |
object |
|
code |
string |
A machine readable error code. |
details |
error details. |
|
innererror |
The code and message for an error. |
|
message |
string |
A human readable error message. |
errorResponse
Error details.
Name | Type | Description |
---|---|---|
error |
The code and message for an error. |
metadataApplication
An Application Insights application.
Name | Type | Description |
---|---|---|
functions |
string[] |
The list of stored functions on the Application Insights app |
id |
string |
The ID of the Application Insights app. |
name |
string |
The name of the Application Insights app. |
region |
string |
The Azure region of the Application Insights app. |
resourceId |
string |
The ARM resource ID of the Application Insights app. |
tableGroups |
string[] |
The list of table groups on the Application Insights app |
tables |
string[] |
The list of custom tables for the Application Insights app. |
MetadataColumnDataType
The data type of the column
Name | Type | Description |
---|---|---|
bool |
string |
|
datetime |
string |
|
dynamic |
string |
|
int |
string |
|
long |
string |
|
real |
string |
|
string |
string |
metadataFunction
A stored function.
Name | Type | Description |
---|---|---|
body |
string |
The KQL body of the function. |
description |
string |
The description of the function. |
displayName |
string |
The display name of the function. |
id |
string |
The ID of the function. |
name |
string |
The name of the function, to be used in queries. |
parameters |
string |
The parameters/arguments of the function, if any. |
metadataResults
A metadata response.
Name | Type | Description |
---|---|---|
applications |
The list of Application Insights apps that were referenced in the metadata request. |
|
functions |
The list of functions stored on the app. |
|
tableGroups |
The list of groups of tables on the app. |
|
tables |
The list of tables and columns that comprise the schema of the app. |
metadataTable
A data table that takes part in a schema of an Application Insights app.
Name | Type | Description |
---|---|---|
columns |
Columns[] |
The list of columns defined on the table |
description |
string |
The description of the table |
id |
string |
The ID of the table |
name |
string |
The name of the table |
timespanColumn |
string |
The column associated with the timespan query parameter for the table |
metadataTableGroup
A group of tables.
Name | Type | Description |
---|---|---|
description |
string |
The description of the table group |
displayName |
string |
The display name of the table group |
id |
string |
The ID of the table group |
name |
string |
The name of the table group |
source |
string |
The source of the table group, can be either AI or OMS for Log Analytics workspaces |
tables |
string[] |
The list of tables contained in the table group |