Azure Automation Runbook API

The Runbook API from Azure Automation — 4 operation(s) for runbook.

Operations 7

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks Runbook list by automation account #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName} Runbook get #
PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName} Runbook create or update #
PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName} Runbook update #
DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName} Runbook delete #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/content Runbook get content #
POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/publish Runbook publish #

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-automation:microsoft-azure-automation-runbook-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

microsoft-azure-automation-runbook-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Azure Automation Runbook API
  version: '2024-10-23'
  x-typespec-generated:
  - emitter: '@azure-tools/typespec-autorest'
  description: 'Operations tagged Runbook across 2 of this provider''s published API definitions: microsoft-azure-automation-openapi.json, microsoft-azure-automation-management-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: Runbook
paths:
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks
  : get:
      operationId: Runbook_ListByAutomationAccount
      tags:
      - Runbook
      description: Retrieve a list of runbooks.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/runbookoperations
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter
      - name: automationAccountName
        in: path
        description: The name of the automation account.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunbookListResult'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: ../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse
      x-ms-examples:
        List runbooks by automation account:
          $ref: ./examples/runbook/listRunbooksByAutomationAccount.json
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Runbook list by automation account
      x-summary-source: derived
    servers:
    - url: https://management.azure.com
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}
  : get:
      operationId: Runbook_Get
      tags:
      - Runbook
      description: Retrieve the runbook identified by runbook name.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/runbookoperations
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter
      - name: automationAccountName
        in: path
        description: The name of the automation account.
        required: true
        schema:
          type: string
      - name: runbookName
        in: path
        description: The runbook name.
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z][a-zA-Z-_0-9]*$
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Runbook'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: ../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse
      x-ms-examples:
        Get runbook:
          $ref: ./examples/runbook/getRunbook.json
      summary: Runbook get
      x-summary-source: derived
    put:
      operationId: Runbook_CreateOrUpdate
      tags:
      - Runbook
      description: Create the runbook identified by runbook name.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/runbookoperations
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter
      - name: automationAccountName
        in: path
        description: The name of the automation account.
        required: true
        schema:
          type: string
      - name: runbookName
        in: path
        description: The runbook name.
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z][a-zA-Z-_0-9]*$
      responses:
        '200':
          description: Resource 'Runbook' update operation succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Runbook'
        '201':
          description: Resource 'Runbook' create operation succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Runbook'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: ../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse
      x-ms-examples:
        Create or update runbook and publish it:
          $ref: ./examples/runbook/createOrUpdateRunbook.json
        Create runbook as draft:
          $ref: ./examples/runbook/createRunbookAsDraft.json
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunbookCreateOrUpdateParameters'
        description: The create or update parameters for runbook. Provide either content link for a published runbook or draft, not both.
        required: true
      summary: Runbook create or update
      x-summary-source: derived
    patch:
      operationId: Runbook_Update
      tags:
      - Runbook
      description: Update the runbook identified by runbook name.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/runbookoperations
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter
      - name: automationAccountName
        in: path
        description: The name of the automation account.
        required: true
        schema:
          type: string
      - name: runbookName
        in: path
        description: The runbook name.
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z][a-zA-Z-_0-9]*$
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Runbook'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: ../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse
      x-ms-examples:
        Update runbook:
          $ref: ./examples/runbook/updateRunbook.json
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunbookUpdateParameters'
        description: The update parameters for runbook.
        required: true
      summary: Runbook update
      x-summary-source: derived
    delete:
      operationId: Runbook_Delete
      tags:
      - Runbook
      description: Delete the runbook by name.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/runbookoperations
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter
      - name: automationAccountName
        in: path
        description: The name of the automation account.
        required: true
        schema:
          type: string
      - name: runbookName
        in: path
        description: The runbook name.
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z][a-zA-Z-_0-9]*$
      responses:
        '200':
          description: Resource deleted successfully.
        '204':
          description: Resource does not exist.
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: ../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse
      x-ms-examples:
        Delete a runbook:
          $ref: ./examples/runbook/deleteRunbook.json
      summary: Runbook delete
      x-summary-source: derived
    servers:
    - url: https://management.azure.com
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/content
  : get:
      operationId: Runbook_GetContent
      tags:
      - Runbook
      description: Retrieve the content of runbook identified by runbook name.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/runbookoperations
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter
      - name: automationAccountName
        in: path
        description: The name of the automation account.
        required: true
        schema:
          type: string
      - name: runbookName
        in: path
        description: The runbook name.
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z][a-zA-Z-_0-9]*$
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            text/plain:
              schema:
                type: string
            application/json:
              schema:
                type: string
        default:
          description: An unexpected error response.
          content:
            text/plain:
              schema:
                $ref: ../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse
            application/json:
              schema:
                $ref: ../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse
      x-ms-examples:
        Get runbook content:
          $ref: ./examples/runbook/getRunbookContent.json
      summary: Runbook get content
      x-summary-source: derived
    servers:
    - url: https://management.azure.com
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/publish
  : post:
      operationId: Runbook_Publish
      tags:
      - Runbook
      description: Publish runbook draft.
      externalDocs:
        url: http://aka.ms/azureautomationsdk/runbookdraftoperations
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter
      - name: automationAccountName
        in: path
        description: The name of the automation account.
        required: true
        schema:
          type: string
      - name: runbookName
        in: path
        description: The runbook name.
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z][a-zA-Z-_0-9]*$
      responses:
        '202':
          description: Resource operation accepted.
          headers:
            Location:
              description: The Location header contains the URL where the status of the long running operation can be checked.
              schema:
                type: string
            Retry-After:
              description: The Retry-After header can indicate how long the client should wait before polling the operation status.
              schema:
                type: integer
                format: int32
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: ../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse
      x-ms-examples:
        Publish runbook draft:
          $ref: ./examples/runbook/publishRunbook.json
      x-ms-long-running-operation-options:
        final-state-via: location
      x-ms-long-running-operation: true
      summary: Runbook publish
      x-summary-source: derived
    servers:
    - url: https://management.azure.com
components:
  schemas:
    RunbookProperties:
      type: object
      description: Definition of the runbook property type.
      properties:
        runtimeEnvironment:
          type: string
          description: Runtime Environment of the runbook execution.
        runbookType:
          $ref: '#/components/schemas/RunbookTypeEnum'
          description: Gets or sets the type of the runbook.
        publishContentLink:
          $ref: '#/components/schemas/ContentLink'
          description: Gets or sets the published runbook content link.
        state:
          $ref: '#/components/schemas/RunbookState'
          description: Gets or sets the state of the runbook.
        logVerbose:
          type: boolean
          description: Gets or sets verbose log option.
        logProgress:
          type: boolean
          description: Gets or sets progress log option.
        logActivityTrace:
          type: integer
          format: int32
          description: Gets or sets the option to log activity trace of the runbook.
        jobCount:
          type: integer
          format: int32
          description: Gets or sets the job count of the runbook.
        parameters:
          type: object
          description: Gets or sets the runbook parameters.
          additionalProperties:
            $ref: '#/components/schemas/RunbookParameter'
        outputTypes:
          type: array
          description: Gets or sets the runbook output types.
          items:
            type: string
        draft:
          $ref: '#/components/schemas/RunbookDraft'
          description: Gets or sets the draft runbook properties.
        provisioningState:
          type: string
          description: Gets or sets the provisioning state of the runbook.
          enum:
          - Succeeded
          x-ms-enum:
            modelAsString: false
        lastModifiedBy:
          type: string
          description: Gets or sets the last modified by.
        creationTime:
          type: string
          format: date-time
          description: Gets or sets the creation time.
        lastModifiedTime:
          type: string
          format: date-time
          description: Gets or sets the last modified time.
        description:
          type: string
          description: Gets or sets the description.
    RunbookCreateOrUpdateProperties:
      type: object
      description: The parameters supplied to the create or update runbook properties.
      properties:
        logVerbose:
          type: boolean
          description: Gets or sets verbose log option.
        logProgress:
          type: boolean
          description: Gets or sets progress log option.
        runtimeEnvironment:
          type: string
          description: Environment of the runbook.
        runbookType:
          $ref: '#/components/schemas/RunbookTypeEnum'
          description: Gets or sets the type of the runbook.
        draft:
          $ref: '#/components/schemas/RunbookDraft'
          description: Gets or sets the draft runbook properties.
        publishContentLink:
          $ref: '#/components/schemas/ContentLink'
          description: Gets or sets the published runbook content link.
        description:
          type: string
          description: Gets or sets the description of the runbook.
        logActivityTrace:
          type: integer
          format: int32
          description: Gets or sets the activity-level tracing options of the runbook.
      required:
      - runbookType
    RunbookCreateOrUpdateParameters:
      type: object
      description: The parameters supplied to the create or update runbook operation.
      properties:
        properties:
          $ref: '#/components/schemas/RunbookCreateOrUpdateProperties'
          description: Gets or sets runbook create or update properties.
          x-ms-client-flatten: true
        name:
          type: string
          description: Gets or sets the name of the resource.
        location:
          type: string
          description: Gets or sets the location of the resource.
        tags:
          type: object
          description: Gets or sets the tags attached to the resource.
          additionalProperties:
            type: string
      required:
      - properties
    Runbook:
      type: object
      description: Definition of the runbook type.
      properties:
        properties:
          $ref: '#/components/schemas/RunbookProperties'
          description: Gets or sets the runbook properties.
          x-ms-client-flatten: true
        etag:
          type: string
          description: Gets or sets the etag of the resource.
      allOf:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource
    RunbookUpdateParameters:
      type: object
      description: The parameters supplied to the update runbook operation.
      properties:
        properties:
          $ref: '#/components/schemas/RunbookUpdateProperties'
          description: Gets or sets the runbook update properties.
          x-ms-client-flatten: true
        name:
          type: string
          description: Gets or sets the name of the resource.
        location:
          type: string
          description: Gets or sets the location of the resource.
        tags:
          type: object
          description: Gets or sets the tags attached to the resource.
          additionalProperties:
            type: string
    RunbookState:
      type: string
      description: Gets or sets the state of the runbook.
      enum:
      - New
      - Edit
      - Published
      x-ms-enum:
        name: RunbookState
        modelAsString: true
        values:
        - name: New
          value: New
          description: New
        - name: Edit
          value: Edit
          description: Edit
        - name: Published
          value: Published
          description: Published
    RunbookDraft:
      type: object
      properties:
        inEdit:
          type: boolean
          description: Gets or sets whether runbook is in edit mode.
        draftContentLink:
          $ref: '#/components/schemas/ContentLink'
          description: Gets or sets the draft runbook content link.
        creationTime:
          type: string
          format: date-time
          description: Gets or sets the creation time of the runbook draft.
        lastModifiedTime:
          type: string
          format: date-time
          description: Gets or sets the last modified time of the runbook draft.
        parameters:
          type: object
          description: Gets or sets the runbook draft parameters.
          additionalProperties:
            $ref: '#/components/schemas/RunbookParameter'
        outputTypes:
          type: array
          description: Gets or sets the runbook output types.
          items:
            type: string
    RunbookTypeEnum:
      type: string
      description: Gets or sets the type of the runbook.
      enum:
      - Script
      - Graph
      - PowerShellWorkflow
      - PowerShell
      - GraphPowerShellWorkflow
      - GraphPowerShell
      - Python2
      - Python3
      - Python
      - PowerShell72
      x-ms-enum:
        name: RunbookTypeEnum
        modelAsString: true
        values:
        - name: Script
          value: Script
          description: Script
        - name: Graph
          value: Graph
          description: Graph
        - name: PowerShellWorkflow
          value: PowerShellWorkflow
          description: PowerShellWorkflow
        - name: PowerShell
          value: PowerShell
          description: PowerShell
        - name: GraphPowerShellWorkflow
          value: GraphPowerShellWorkflow
          description: GraphPowerShellWorkflow
        - name: GraphPowerShell
          value: GraphPowerShell
          description: GraphPowerShell
        - name: Python2
          value: Python2
          description: Python2
        - name: Python3
          value: Python3
          description: Python3
        - name: Python
          value: Python
          description: Python
        - name: PowerShell72
          value: PowerShell72
          description: PowerShell72
    RunbookListResult:
      type: object
      description: The response of a Runbook list operation.
      properties:
        value:
          type: array
          description: The Runbook items on this page
          items:
            $ref: '#/components/schemas/Runbook'
        nextLink:
          type: string
          format: uri
          description: The link to the next page of items
      required:
      - value
    RunbookParameter:
      type: object
      description: Definition of the runbook parameter type.
      properties:
        type:
          type: string
          description: Gets or sets the type of the parameter.
        isMandatory:
          type: boolean
          description: Gets or sets a Boolean value to indicate whether the parameter is mandatory or not.
        position:
          type: integer
          format: int32
          description: Get or sets the position of the parameter.
        defaultValue:
          type: string
          description: Gets or sets the default value of parameter.
    ContentLink:
      type: object
      description: Definition of the content link.
      properties:
        uri:
          type: string
          description: Gets or sets the uri of content.
        contentHash:
          $ref: '#/components/schemas/ContentHash'
          description: Gets or sets the hash.
        version:
          type: string
          description: Gets or sets the version of the content.
    ContentHash:
      type: object
      description: Definition of the runbook property type.
      properties:
        algorithm:
          type: string
          description: Gets or sets the content hash algorithm used to hash the content.
        value:
          type: string
          description: Gets or sets expected hash value of the content.
      required:
      - algorithm
      - value
    RunbookUpdateProperties:
      type: object
      description: The parameters supplied to the update runbook properties.
      properties:
        description:
          type: string
          description: Gets or sets the description of the runbook.
        logVerbose:
          type: boolean
          description: Gets or sets verbose log option.
        logProgress:
          type: boolean
          description: Gets or sets progress log option.
        logActivityTrace:
          type: integer
          format: int32
          description: Gets or sets the activity-level tracing options of the runbook.
  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-refined-from:
- microsoft-azure-automation-openapi.json
- microsoft-azure-automation-management-openapi.yml