Microsoft Azure Graph Query API

The Graph Query API from Microsoft Azure, for graph query.

GitHub OpenAPI

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries List saved Resource Graph queries · Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“Which saved Azure Resource Graph queries exist in a resource group?”
“How can I see all the shared graph queries my team has stored?”
Tell an agent
List saved graph queries in resource group {resourceGroupName}, subscription {subscriptionId}.
Show every shared Resource Graph query in {resourceGroupName}.
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName} Get a saved Resource Graph query · Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“How do I read the KQL text of a saved graph query?”
“Can I fetch one shared Resource Graph query by its name?”
Tell an agent
Get graph query {resourceName} in {resourceGroupName}, subscription {subscriptionId}.
Show the query text of saved query {resourceName} in group {resourceGroupName}.
DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName} Delete a saved Resource Graph query · Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“How do I remove a shared graph query nobody uses anymore?”
“Can I delete a saved Resource Graph query by name?”
Tell an agent destructive · confirm first
Delete graph query {resourceName} in {resourceGroupName}, subscription {subscriptionId}.
Remove saved query {resourceName} from group {resourceGroupName}.
PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName} Save a new Resource Graph query · Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“How do I save a Resource Graph query so others on my team can reuse it?”
“Can I store a KQL query as an Azure resource with tags?”
Tell an agent
Save graph query {resourceName} in {resourceGroupName}, subscription {subscriptionId}, with {properties}.
Create shared query {resourceName} in group {resourceGroupName} tagged {tags}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure:microsoft-azure-graph-query-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-graph-query-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Azure Azure Resource Graph Query API
  description: Azure Resource Graph Query API Reference
  version: 2020-04-01-preview
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: Graph Query
paths:
  /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries:
    get:
      tags:
      - Graph Query
      description: Get all graph queries defined within a specified subscription and resource group.
      operationId: microsoftAzureGraphqueryList
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: A list containing 0 or more graph queries.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphQueryListResult'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphQueryError'
      x-ms-pageable:
        nextLinkName: nextLink
      x-ms-examples:
        Get a list of Graph Queries:
          $ref: ./examples/GraphQueryList.json
      summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups…
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}
  : get:
      tags:
      - Graph Query
      description: Get a single graph query by its resourceName.
      operationId: microsoftAzureGraphqueryGet
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/GraphQueryResourceNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: A graph query definition.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphQueryResource'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphQueryError'
      x-ms-examples:
        Get Graph Query:
          $ref: ./examples/GraphQueryGet.json
      summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups…
    delete:
      tags:
      - Graph Query
      description: Delete a graph query.
      operationId: microsoftAzureGraphqueryDelete
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/GraphQueryResourceNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: The graph query has been successfully deleted.
        '204':
          description: The resource doesn't exist.
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphQueryError'
      x-ms-examples:
        Delete Graph Query:
          $ref: ./examples/GraphQueryDelete.json
      summary: Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups…
    put:
      tags:
      - Graph Query
      description: Create a new graph query.
      operationId: microsoftAzureGraphqueryCreateorupdate
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/GraphQueryResourceNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: The newly created graph query.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphQueryResource'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphQueryError'
      x-ms-examples:
        Create Graph Query:
          $ref: ./examples/GraphQueryAdd.json
      summary: Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups…
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GraphQueryResource'
        description: Properties that need to be specified to create a new graph query.
        required: true
components:
  parameters:
    SubscriptionIdParameter:
      name: subscriptionId
      in: path
      required: true
      description: The Azure subscription Id.
      schema:
        type: string
    ApiVersionParameter:
      name: api-version
      in: query
      required: true
      description: Client Api Version.
      schema:
        type: string
    GraphQueryResourceNameParameter:
      name: resourceName
      in: path
      required: true
      description: The name of the Graph Query resource.
      x-ms-parameter-location: method
      schema:
        type: string
    ResourceGroupNameParameter:
      name: resourceGroupName
      in: path
      required: true
      description: The name of the resource group.
      x-ms-parameter-location: method
      schema:
        type: string
  schemas:
    GraphQueryListResult:
      properties:
        nextLink:
          description: URL to fetch the next set of queries.
          type: string
        value:
          type: array
          readOnly: true
          items:
            $ref: '#/components/schemas/GraphQueryResource'
          description: An array of graph queries.
      description: Graph query list result.
    GraphQueryProperties:
      description: Properties that contain a graph query.
      required:
      - query
      properties:
        timeModified:
          type: string
          description: Date and time in UTC of the last modification that was made to this graph query definition.
          format: date-time
          readOnly: true
        description:
          type: string
          description: The description of a graph query.
        query:
          type: string
          description: KQL query that will be graph.
        resultKind:
          description: Enum indicating a type of graph query.
          readOnly: true
          type: string
          enum:
          - basic
          x-ms-enum:
            name: ResultKind
            modelAsString: true
    GraphQueryResource:
      description: Graph Query entity definition.
      allOf:
      - $ref: '#/components/schemas/Resource'
      properties:
        properties:
          x-ms-client-flatten: true
          description: Metadata describing a graph query for an Azure resource.
          $ref: '#/components/schemas/GraphQueryProperties'
        tags:
          type: object
          additionalProperties:
            type: string
          description: Resource tags
        systemData:
          readOnly: true
          $ref: ../../../../../common-types/resource-management/v1/types.json#/definitions/systemData
        etag:
          type: string
          description: This will be used to handle Optimistic Concurrency.
    GraphQueryError:
      properties:
        code:
          type: string
          description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
        message:
          type: string
          description: Human-readable representation of the error.
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorFieldContract'
          description: The list of invalid fields send in request, in case of validation error.
      description: Error message body that will indicate why the operation failed.
    ErrorFieldContract:
      properties:
        code:
          type: string
          description: Property level error code.
        message:
          type: string
          description: Human-readable representation of property-level error.
        target:
          type: string
          description: Property name.
      description: Error Field contract.
    Resource:
      properties:
        id:
          type: string
          readOnly: true
          description: Azure resource Id
        name:
          type: string
          readOnly: true
          description: Azure resource name. This is GUID value. The display name should be assigned within properties field.
        location:
          type: string
          readOnly: true
          description: The location of the resource
        type:
          type: string
          readOnly: true
          description: Azure resource type
      x-ms-azure-resource: true
      description: An azure resource object
  securitySchemes:
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: impersonate your user account
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Azure Active Directory OAuth2 Flow.
x-provenance:
  method: harvested
  publisher: Microsoft Azure
  source: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)