---
title: "POST /providers/Microsoft.ResourceGraph/resources"
method: POST
path: "/providers/Microsoft.ResourceGraph/resources"
tags: ["Resources"]
---

# POST /providers/Microsoft.ResourceGraph/resources

`POST /providers/Microsoft.ResourceGraph/resources`

Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.

## Query parameters

- `api-version` string, required

## Request body

- QueryRequest — Describes a query to be executed.
  - `subscriptions` string[], required — Azure subscriptions against which to execute the query.
  - `query` string, required — The resources query.
  - `options` QueryRequestOptions — The options for query evaluation
    - `$skipToken` string — Continuation token for pagination, capturing the next page size and offset, as well as the context of the query.
    - `$top` integer — The maximum number of rows that the query should return. Overrides the page size when ```$skipToken``` property is present.
    - `$skip` integer — The number of rows to skip from the beginning of the results. Overrides the next page offset when ```$skipToken``` property is present.
    - `resultFormat` 'table' | 'objectArray' — Defines in which format query result returned.
  - `facets` FacetRequest[] — An array of facet requests to be computed against the query result.
    - `expression` string, required — The column or list of columns to summarize by
    - `options` FacetRequestOptions — The options for facet evaluation
      - `sortBy` string — The column name or query expression to sort on. Defaults to count if not present.
      - `sortOrder` 'asc' | 'desc' — The sorting order by the selected column (count by default).
      - `filter` string — Specifies the filter condition for the 'where' clause which will be run on main query's result, just before the actual faceting.
      - `$top` integer — The maximum number of facet rows that should be returned.

## Response `200`

Result of the query operation

- QueryResponse — Query result.
  - `totalRecords` integer, required — Number of total records matching the query.
  - `count` integer, required — Number of records returned in the current response. In the case of paging, this is the number of records in the current page.
  - `resultTruncated` 'true' | 'false', required — Indicates whether the query results are truncated.
  - `$skipToken` string — When present, the value can be passed to a subsequent query call (together with the same query and subscriptions used in the current request) to retrieve the next page of data.
  - `data` object, required — Query output in tabular format.
  - `facets` Facet[] — Query facets.
    - `expression` string, required — Facet expression, same as in the corresponding facet request.
    - `resultType` string, required — Result type

## Other responses

- `default` — An error occurred while processing the request. See the error.code parameter to identify the specific error.

---

[API](https://skmtc.dev/azure/apis/azure-resource-graph.md) · [All operations](https://skmtc.dev/azure/apis/azure-resource-graph/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/azure-resource-graph/revisions/d716430b06dc/schema)
