Metadata - Get

Gets metadata information
Retrieve the metadata information for the app, including its schema, etc.

GET https://api.applicationinsights.io/v1/apps/{appId}/metadata

URI Parameters

Name In Required Type Description
appId
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

metadataResults

Successful response

Other Status Codes

errorResponse

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

metadataGet

Sample Request

GET 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

errorDetail

Error details.

errorInfo

The code and message for an error.

errorResponse

Error details.

metadataApplication

An Application Insights application.

MetadataColumnDataType

The data type of the column

metadataFunction

A stored function.

metadataResults

A metadata response.

metadataTable

A data table that takes part in a schema of an Application Insights app.

metadataTableGroup

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

MetadataColumnDataType

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

errorDetail[]

error details.

innererror

errorInfo

The code and message for an error.
Inner error details if they exist.

message

string

A human readable error message.

errorResponse

Error details.

Name Type Description
error

errorInfo

The code and message for an error.
The error details.

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

metadataApplication[]

The list of Application Insights apps that were referenced in the metadata request.

functions

metadataFunction[]

The list of functions stored on the app.

tableGroups

metadataTableGroup[]

The list of groups of tables on the app.

tables

metadataTable[]

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