{"files":{"SKILL.md":"---\nname: application-insights-data-plane\ndescription: \"Application Insights Data Plane API skill. Use when working with Application Insights Data Plane for subscriptions. Covers 9 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Application Insights Data Plane\nAPI version: 2018-04-20\n\n## Auth\nOAuth2\n\n## Base URL\nhttps://management.azure.com\n\n## Setup\n1. Configure auth: OAuth2\n2. GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/query -- execute an analytics query\n3. POST /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/query -- create first query\n\n## Endpoints\n9 endpoints across 1 group. See references/api-spec.lap for full details.\n\n### Subscriptions\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/query | Execute an Analytics query |\n| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/query | Execute an Analytics query |\n| POST | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/metadata | Gets metadata information |\n| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/metadata | Gets metadata information |\n| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/metrics/{metricId} | Retrieve metric data |\n| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/metrics/metadata | Retrieve metric metadata |\n| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/events/{eventType} | Execute OData query |\n| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/events/{eventType}/{eventId} | Get an event |\n| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/events/$metadata | Get OData metadata |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Create a query?\" -> POST /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/query\n- \"Search query?\" -> GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/query\n- \"Create a metadata?\" -> POST /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/metadata\n- \"List all metadata?\" -> GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/metadata\n- \"Get metric details?\" -> GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/metrics/{metricId}\n- \"Get event details?\" -> GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/events/{eventType}\n- \"List all $metadata?\" -> GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/events/$metadata\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints return the modified resource on success\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Application Insights Data Plane\n@base https://management.azure.com\n@version 2018-04-20\n@auth OAuth2\n@common_fields {subscriptionId: any # Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call., resourceGroupName: any # The name of the resource group to get. The name is case insensitive., applicationName: any # Name of the Application Insights application., apiVersion: any # Client API version.}\n@endpoints 9\n@toc subscriptions(9)\n\n@endpoint POST /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/query\n@desc Execute an Analytics query\n@required {body: map # The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)}\n@returns(200) Successful response\n\n@endpoint GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/query\n@desc Execute an Analytics query\n@required {query: any # The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)}\n@optional {timespan: any # Optional. The timespan over which to query data. This is an ISO8601 time period value.  This timespan is applied in addition to any that are specified in the query expression.}\n@returns(200) Successful response\n\n@endpoint POST /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/metadata\n@desc Gets metadata information\n@returns(200) Successful response\n\n@endpoint GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/metadata\n@desc Gets metadata information\n@returns(200) Successful response\n\n@endpoint GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/metrics/{metricId}\n@desc Retrieve metric data\n@required {metricId: any # ID of the metric. This is either a standard AI metric, or an application-specific custom metric.}\n@optional {timespan: any # The timespan over which to retrieve metric values. This is an ISO8601 time period value. If timespan is omitted, a default time range of `PT12H` (\"last 12 hours\") is used. The actual timespan that is queried may be adjusted by the server based. In all cases, the actual time span used for the query is included in the response., interval: any # The time interval to use when retrieving metric values. This is an ISO8601 duration. If interval is omitted, the metric value is aggregated across the entire timespan. If interval is supplied, the server may adjust the interval to a more appropriate size based on the timespan used for the query. In all cases, the actual interval used for the query is included in the response., aggregation: any # The aggregation to use when computing the metric values. To retrieve more than one aggregation at a time, separate them with a comma. If no aggregation is specified, then the default aggregation for the metric is used., segment: any # The name of the dimension to segment the metric values by. This dimension must be applicable to the metric you are retrieving. To segment by more than one dimension at a time, separate them with a comma (,). In this case, the metric data will be segmented in the order the dimensions are listed in the parameter., top: any # The number of segments to return.  This value is only valid when segment is specified., orderby: any # The aggregation function and direction to sort the segments by.  This value is only valid when segment is specified., filter: any # An expression used to filter the results.  This value should be a valid OData filter expression where the keys of each clause should be applicable dimensions for the metric you are retrieving.}\n@returns(200) Successful response\n\n@endpoint GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/metrics/metadata\n@desc Retrieve metric metadata\n@returns(200) Successful responses\n\n@endpoint GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/events/{eventType}\n@desc Execute OData query\n@required {eventType: any # The type of events to query; either a standard event type (`traces`, `customEvents`, `pageViews`, `requests`, `dependencies`, `exceptions`, `availabilityResults`) or `$all` to query across all event types.}\n@optional {timespan: any # Optional. The timespan over which to retrieve events. This is an ISO8601 time period value.  This timespan is applied in addition to any that are specified in the Odata expression., $filter: any # An expression used to filter the returned events, $search: any # A free-text search expression to match for whether a particular event should be returned, $orderby: any # A comma-separated list of properties with \\\"asc\\\" (the default) or \\\"desc\\\" to control the order of returned events, $select: any # Limits the properties to just those requested on each returned event, $skip: any # The number of items to skip over before returning events, $top: any # The number of events to return, $format: any # Format for the returned events, $count: any # Request a count of matching items included with the returned events, $apply: any # An expression used for aggregation over returned events}\n@returns(200) Successful response\n\n@endpoint GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/events/{eventType}/{eventId}\n@desc Get an event\n@required {eventType: any # The type of events to query; either a standard event type (`traces`, `customEvents`, `pageViews`, `requests`, `dependencies`, `exceptions`, `availabilityResults`) or `$all` to query across all event types., eventId: any # ID of event.}\n@optional {timespan: any # Optional. The timespan over which to retrieve events. This is an ISO8601 time period value.  This timespan is applied in addition to any that are specified in the Odata expression.}\n@returns(200) Successful response\n\n@endpoint GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/components/{applicationName}/events/$metadata\n@desc Get OData metadata\n@returns(200) Successful response\n\n@end\n"}}