canonical: https://jentic.com/apis/azure.com/application-insights-data-plane

# Microsoft Azure Azure Application Insights Data Plane

Jentic publishes the only available OpenAPI specification for Azure Application Insights Data Plane, keeping it validated and agent-ready. This API exposes the read-only telemetry surface for Application Insights: run Analytics (Kusto) queries against an application's logs, retrieve events filtered by event type, fetch event metadata via OData, and read pre-aggregated metric data with metadata. It is the surface used by dashboards, agents, and analytics pipelines that consume App Insights without hitting the management plane.

## For AI agents

Run Kusto/Analytics queries against an Application Insights resource and read its events and pre-aggregated metrics.

## Scope

Does not provision App Insights resources, configure sampling, or write telemetry - use only to read existing events, metrics, and run Analytics queries.

## Capabilities

- Run an Analytics (Kusto) query over an application's telemetry
- Retrieve events of a specific type for a given application
- Fetch a single event by id within an application
- Read pre-aggregated metric data with optional time grain and aggregation
- List the available metrics and their metadata for an application
- Discover OData metadata for the events endpoint

## Use cases

### Ad-Hoc Telemetry Investigation

On-call engineers triaging an alert run Analytics (Kusto) queries against Application Insights to find the affected requests, their durations, and correlated exceptions. GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/query takes a Kusto query string and returns columnar results suitable for piping into a notebook or chat reply.

Example prompt: Run a Kusto query 'requests | where success == false | summarize count() by resultCode' against application 'contoso-web' for the last 24 hours

### Event-Type Drilldowns

Analysts often filter by event type (requests, exceptions, dependencies, customEvents) for a focused view. GET /components/{applicationName}/events/{eventType} returns paginated events for the chosen type with OData query support, so dashboards can drill from a high-level metric down to individual events.

Example prompt: List the last 100 exception events for application 'contoso-web' filtered to severityLevel >= 3

### Pre-Aggregated Metric Reads

Status-page widgets and runbooks often need a single metric value over a fixed window without running a full Analytics query. GET /components/{applicationName}/metrics/{metricId} returns pre-aggregated metric data with timespan and aggregation parameters, which is faster and cheaper than the query endpoint for steady-state reads.

Example prompt: Read the requests/duration metric for application 'contoso-web' for the last hour with aggregation=avg

### Agent-Driven Incident Summaries

An AI agent investigating an alert can run a Kusto query, fetch the matching exception events, and summarise the failure mode for a human. Through Jentic, the agent searches for 'query Application Insights telemetry', loads the query endpoint, and submits the Kusto string. The Azure OAuth token is held in the credential vault, and the agent sees only structured results.

Example prompt: Search Jentic for 'query Application Insights telemetry', load the query endpoint, and execute a Kusto query that returns the top exception messages from the last hour

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/query | Run an Analytics query |
| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/events/{eventType} | Execute OData query for events of a type |
| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/events/{eventType}/{eventId} | Get a single event |
| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/events/$metadata | Get OData metadata |
| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/metrics/{metricId} | Read a metric |
| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/metrics/metadata | List metric metadata |

## Key resources

- **Analytics Query** — Run Kusto queries against an application's telemetry
- **Events** — Retrieve events filtered by type or by id
- **Metrics** — Read pre-aggregated metric data and list available metrics
- **OData Metadata** — Discover the OData schema for events

## Why Jentic

- **Setup:** Wiring the Azure Application Insights Data Plane by hand means registering an Azure AD app, acquiring and refreshing OAuth 2.0 bearer tokens, composing Kusto (Analytics) query strings, and following OData nextLink pagination on events yourself. Through Jentic you install once, import the Application Insights Data Plane from the API Directory, store the service principal credential once, and your agent calls it.
- **Permission scoping:** Applications are addressed by path parameters (/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/...), so a rule can pin your agent to one subscription, resource group, and named component. This surface is read-only, and you still choose which operations it may call, such as running a query or reading a metric, so it never gains reads you did not grant.
- **Credential handling:** Your Azure AD service principal credential is stored once, encrypted, by your own Jentic One instance and exchanged for a short-lived bearer token at execution time. The secret never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'query Application Insights telemetry' or 'read the request duration metric', and Jentic returns the matching query, events, or metrics operation with its input schema so the agent supplies the application name and Kusto string without reading the Microsoft.Insights data-plane docs.

## Related APIs

- **Azure Application Insights Management Client** — Provisions and configures the App Insights component this data-plane API reads from.
- **Azure Monitor Management Client** — Configures action groups and alert rules over the metrics surfaced here.
- **Azure Advisor Management Client** — Surfaces operational recommendations derived in part from App Insights signals.
- **Google Cloud Monitoring API** — GCP equivalent for time-series metrics and log-based queries.

## FAQ

### Why is there no official OpenAPI spec for Azure Application Insights Data Plane?

Microsoft Azure does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Azure Application Insights Data Plane via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Application Insights Data Plane use?

The API uses Azure Active Directory OAuth 2.0 bearer tokens (the azure_auth scheme). Jentic stores the AAD app secret in your Jentic One instance and exchanges it for a short-lived bearer token at execution time, so agents never see the raw secret.

### Can I run Kusto (Analytics) queries against an application?

Yes. GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/query accepts a Kusto query string and returns columnar results. Use it for ad-hoc telemetry investigation or scheduled report generation.

### How do I retrieve only exception events from an application?

Call GET /components/{applicationName}/events/{eventType} with eventType=exceptions. Add OData $filter and $top parameters to narrow severity, time range, or count, and follow nextLink for pagination.

### What are the rate limits for the Application Insights Data Plane?

Limits depend on the App Insights resource pricing tier and the workload's daily ingestion. Heavy Kusto queries are subject to tighter throttling than metric reads. Honour HTTP 429 Retry-After values and prefer the metrics endpoint over the query endpoint for steady-state polling.

### How do I run an Application Insights query through Jentic?

Run pip install jentic, then search Jentic with 'query Application Insights telemetry'. Jentic returns the query endpoint with its input schema. Load and execute with your subscription, resource group, application name, and Kusto string; the OAuth token is resolved from the vault automatically.

### Can I limit what my agent is allowed to do with the Application Insights Data Plane API?

Yes. Because you self-host Jentic One, your own rules decide which operations and credentials the agent may use, and this surface is read-only to begin with. Every request is addressed by path parameters (/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/...), so a rule can pin the agent to a single subscription, resource group, and named component. You also choose which read operations it may call, such as running a Kusto query, listing events by type, or reading a pre-aggregated metric, so it never gains reads you did not grant.
