Microsoft Azure Query Generation API

The QueryGeneration API from Microsoft Azure, for querygeneration.

GitHub OpenAPI

Operations 1

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

POST /providers/Microsoft.ResourceGraph/generateQuery Generate a Resource Graph query from a prompt · Microsoft Azure Post Providers Microsoft Resourcegraph Generatequery #
Ask an LLM
“Can I turn a plain-English question into an Azure Resource Graph query?”
“What Resource Graph query would answer my natural-language prompt?”
Tell an agent
Generate a Resource Graph query for {prompt}.
Write an ARG query that answers {prompt}, using the earlier conversation {history}.

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-querygeneration-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-querygeneration-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Azure ARG Query Generation API
  version: 2023-09-01-preview
  x-typespec-generated:
  - emitter: '@azure-tools/typespec-autorest'
tags:
- name: QueryGeneration
paths:
  /providers/Microsoft.ResourceGraph/generateQuery:
    post:
      operationId: microsoftAzureQueryGeneratequery
      tags:
      - QueryGeneration
      description: Generates ARG query for a given user prompt.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryGenerationResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-ms-examples:
        Succeeded ARG Query Generation:
          $ref: ./examples/ResourcesGenerateQuery.json
        Failed ARG Query Generation:
          $ref: ./examples/ResourcesGenerateQueryNoGeneration.json
        ARG Query Generation with history:
          $ref: ./examples/ResourcesGenerateQueryWithHistory.json
      summary: Microsoft Azure Post Providers Microsoft Resourcegraph Generatequery
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryGenerationRequest'
        required: true
components:
  schemas:
    QueryGenerationRequest:
      type: object
      description: Query Generation Request
      properties:
        history:
          type: array
          description: A collection of chat history to provide context in query generation
          items:
            $ref: '#/components/schemas/HistoryContext'
          x-ms-identifiers: []
        prompt:
          type: string
          description: Prompt text from user
      required:
      - prompt
    ErrorResponse:
      title: Error response.
      type: object
      description: An error response from the API.
      properties:
        error:
          $ref: '#/components/schemas/Error'
          description: Error information.
      required:
      - error
    Error:
      title: Error info.
      type: object
      description: Error details.
      properties:
        code:
          type: string
          description: Error code identifying the specific error.
        message:
          type: string
          description: A human readable error message.
        details:
          type: array
          description: Error details
          items:
            $ref: '#/components/schemas/ErrorDetails'
      required:
      - code
      - message
    HistoryContext:
      type: object
      description: History content generated by a user, assistant or system role
      properties:
        content:
          type: string
          description: Content generated by a given role
        role:
          $ref: '#/components/schemas/Role'
          description: Role which generates the content e.g., user, assistant or system
      required:
      - content
      - role
    StatusResponse:
      type: object
      description: Status
      properties:
        category:
          $ref: '#/components/schemas/StatusCategory'
          description: Status category for query generation result
        message:
          type: string
          description: Status message for query generation result
      required:
      - category
      - message
    Role:
      type: string
      description: The role which generates a specific message. Restricted to the user or assistant role.
      enum:
      - user
      - assistant
      - system
      x-ms-enum:
        name: Role
        modelAsString: true
        values:
        - name: user
          value: user
          description: If a message was generated by a human, the role should be assigned user
        - name: assistant
          value: assistant
          description: If a message was generated by ARG Query Generation service, then the role should be assistant
        - name: system
          value: system
          description: If a message provides high level instructions for the query generation, then the role should be system
    QueryGenerationResponse:
      type: object
      description: Query Generation Response
      properties:
        query:
          type: string
          description: Query generated for a given user prompt text
        status:
          $ref: '#/components/schemas/StatusResponse'
          description: Status for the query generation result
      required:
      - query
      - status
    ErrorDetails:
      title: Error details.
      type: object
      properties:
        code:
          type: string
          description: Error code identifying the specific error.
        message:
          type: string
          description: A human readable error message.
      additionalProperties:
        type: object
      required:
      - code
      - message
    StatusCategory:
      type: string
      description: Status Category
      enum:
      - Succeeded
      - Failed
      x-ms-enum:
        name: StatusCategory
        modelAsString: true
        values:
        - name: Succeeded
          value: Succeeded
          description: Succeeded when query was generated successfully
        - name: Failed
          value: Failed
          description: Failed when query was not generated
  parameters:
    ApiVersionParameter:
      name: api-version
      in: query
      required: true
      description: Api Version.
      schema:
        type: string