Microsoft.OperationalInsights (stable:v1)

2025/07/21 • 3 updated methods

Query_ExecuteWithResourceId (updated)
Description Executes an Analytics query for data in the context of a resource. [Here](https://learn.microsoft.com/azure/azure-monitor/logs/api/azure-resource-queries) is an example for using POST with an Analytics query.
Reference Link ¶

⚶ Changes

{
  "#id": "Query_ExecuteWithResourceId",
  "$parameters": {
    "body": {
      "Description": {
        "new": "The Analytics query. Learn more about the\n[Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)",
        "old": "The Analytics query. Learn more about the [Analytics query\nsyntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)"
      }
    }
  }
}

⚼ Request

POST:  /{resourceId}/query
{
resourceId: string ,
Prefer: string ,
body:
{
query: string ,
timespan: string ,
workspaces:
[
string ,
]
,
}
,
}

⚐ Response (200)

{
tables:
[
{
name: string ,
columns:
[
{
name: string ,
type: enum ,
}
,
]
,
rows:
[
string ,
]
,
}
,
]
,
statistics: object ,
render: object ,
error:
{
code: string ,
message: string ,
details:
[
{
code: string ,
message: string ,
target: string ,
value: string ,
resources:
[
string ,
]
,
additionalProperties: object ,
}
,
]
,
innererror: string ,
additionalProperties: object ,
}
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
details:
[
{
code: string ,
message: string ,
target: string ,
value: string ,
resources:
[
string ,
]
,
additionalProperties: object ,
}
,
]
,
innererror: string ,
additionalProperties: object ,
}
,
}
Query_Batch (updated)
Description Executes a batch of Analytics queries for data. [Here](https://learn.microsoft.com/azure/azure-monitor/logs/api/batch-queries) is an example for using POST with an Analytics query.
Reference Link ¶

⚶ Changes

{
  "#id": "Query_Batch",
  "$parameters": {
    "body": {
      "$properties": {
        "requests": {
          "$properties": [
            {
              "#name": "body",
              "Description": {
                "new": "The Analytics query. Learn more about the\n[Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)",
                "old": "The Analytics query. Learn more about the [Analytics query\nsyntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)"
              }
            }
          ]
        }
      }
    }
  }
}

⚼ Request

POST:  /$batch
{
body:
{
requests:
[
{
id: string ,
headers: object ,
body:
{
query: string ,
timespan: string ,
workspaces:
[
string ,
]
,
}
,
path: string ,
method: string ,
workspace: string ,
}
,
]
,
}
,
}

⚐ Response (200)

{
responses:
[
{
id: string ,
status: integer ,
body:
{
tables:
[
{
name: string ,
columns:
[
{
name: string ,
type: enum ,
}
,
]
,
rows:
[
string ,
]
,
}
,
]
,
statistics: object ,
render: object ,
error:
{
code: string ,
message: string ,
details:
[
{
code: string ,
message: string ,
target: string ,
value: string ,
resources:
[
string ,
]
,
additionalProperties: object ,
}
,
]
,
innererror: string ,
additionalProperties: object ,
}
,
}
,
headers: object ,
}
,
]
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
details:
[
{
code: string ,
message: string ,
target: string ,
value: string ,
resources:
[
string ,
]
,
additionalProperties: object ,
}
,
]
,
innererror: string ,
additionalProperties: object ,
}
,
}
Query_Execute (updated)
Description Executes an Analytics query for data. [Here](https://learn.microsoft.com/azure/azure-monitor/logs/api/request-format) is an example for using POST with an Analytics query.
Reference Link ¶

⚶ Changes

{
  "#id": "Query_Execute",
  "$parameters": {
    "body": {
      "Description": {
        "new": "The Analytics query. Learn more about the\n[Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)",
        "old": "The Analytics query. Learn more about the [Analytics query\nsyntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)"
      }
    }
  }
}

⚼ Request

POST:  /workspaces/{workspaceId}/query
{
workspaceId: string ,
Prefer: string ,
body:
{
query: string ,
timespan: string ,
workspaces:
[
string ,
]
,
}
,
}

⚐ Response (200)

{
tables:
[
{
name: string ,
columns:
[
{
name: string ,
type: enum ,
}
,
]
,
rows:
[
string ,
]
,
}
,
]
,
statistics: object ,
render: object ,
error:
{
code: string ,
message: string ,
details:
[
{
code: string ,
message: string ,
target: string ,
value: string ,
resources:
[
string ,
]
,
additionalProperties: object ,
}
,
]
,
innererror: string ,
additionalProperties: object ,
}
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
details:
[
{
code: string ,
message: string ,
target: string ,
value: string ,
resources:
[
string ,
]
,
additionalProperties: object ,
}
,
]
,
innererror: string ,
additionalProperties: object ,
}
,
}