Microsoft Azure Disks API

The Disks API from Microsoft Azure, for disks.

GitHub OpenAPI
Business capability
IT Infrastructure Management BC-600.50

Operations 9

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}/providers/Microsoft.Compute.Admin/locations/{location}/disks List disks in an Azure Stack Hub location (admin) · Microsoft Azure Get Subscriptions Subscriptionid Providers Microsoft Compute… #
Ask an LLM
“As an Azure Stack Hub operator, how do I list the disks in a location?”
“Which managed disks exist on my Azure Stack Hub region from the admin API?”
Tell an agent
List all disks in Azure Stack Hub admin location {location}.
Show disks known to the Compute admin provider.
GET /subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/disks/{DiskId} Get a disk in an Azure Stack Hub location (admin) · Microsoft Azure Get Subscriptions Subscriptionid Providers Microsoft Compute… #
Ask an LLM
“Can an Azure Stack Hub operator read one disk's details from the admin API?”
“What does the Compute admin endpoint return for a single disk?”
Tell an agent
Get disk {DiskId} from the Azure Stack Hub Compute admin API in {location}.
Show admin-level details for Azure Stack Hub disk {DiskId}.
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks List a DevTest Labs user's disks · Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“Which disks belong to my user profile in a DevTest Lab?”
“Can I filter or sort the lab disks in my profile?”
Tell an agent
List disks for user {userName} in lab {labName} (resource group {resourceGroupName}, subscription {subscriptionId}).
Show lab disks for user {userName} in {labName} filtered by {filter}.
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name} Get a DevTest Labs disk · Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“How can I see the details of one disk in my DevTest Lab?”
“What size and type is a given lab disk?”
Tell an agent
Get disk {name} for user {userName} in lab {labName} (resource group {resourceGroupName}, subscription {subscriptionId}).
Show lab disk {name} owned by {userName} in {labName}.
PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name} Create or replace a DevTest Labs disk · Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“How do I create a data disk in my DevTest Lab profile?”
“Can I replace an existing lab disk definition, and does it take a while?”
Tell an agent
Create disk {name} for user {userName} in lab {labName} (resource group {resourceGroupName}, subscription {subscriptionId}).
Create lab disk {name} for {userName} in {labName} with properties {properties}.
DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name} Delete a DevTest Labs disk · Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“Can I delete a disk from my DevTest Lab profile?”
“What removes a lab disk I no longer need?”
Tell an agent destructive · confirm first
Delete disk {name} for user {userName} in lab {labName} (resource group {resourceGroupName}, subscription {subscriptionId}).
Remove lab disk {name} owned by {userName} in {labName}.
PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name} Update tags on a DevTest Labs disk · Microsoft Azure Patch Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“How do I change the tags on a lab disk?”
“Which disk properties can I modify after creation in DevTest Labs?”
Tell an agent
Set tags {tags} on disk {name} for user {userName} in lab {labName} (resource group {resourceGroupName}, subscription {subscriptionId}).
Retag lab disk {name} of user {userName} in {labName}.
POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}/attach Attach a DevTest Labs disk to a lab VM · Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“How do I attach a lab disk to one of my lab virtual machines?”
“Does attaching a DevTest Labs disk create a lease on the VM?”
Tell an agent
Attach disk {name} for user {userName} in lab {labName} (resource group {resourceGroupName}, subscription {subscriptionId}) to lab VM {vmId}.
Lease lab disk {name} of {userName} in {labName} to VM {vmId}.
POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}/detach Detach a DevTest Labs disk from a lab VM · Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“How do I detach a disk from my lab virtual machine?”
“Can I break a disk's lease on a DevTest Labs VM?”
Tell an agent
Detach disk {name} for user {userName} in lab {labName} (resource group {resourceGroupName}, subscription {subscriptionId}) from lab VM {vmId}.
Break the lease of lab disk {name} owned by {userName} in {labName}.

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-disks-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-disks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 2018-07-30-preview
  title: Microsoft Azure ComputeDiskAdminManagementClient Disks API
  description: The Admin Compute Disk Management Client.
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: Disks
paths:
  /subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/disks:
    get:
      x-ms-examples:
        Returns a list of disks.:
          $ref: ./examples/Disks/List.json
      tags:
      - Disks
      operationId: microsoftAzureDisksList
      description: Returns a list of disks.
      parameters:
      - $ref: ../2015-12-01-preview/Compute.json#/parameters/SubscriptionIdParameter
      - $ref: ../2015-12-01-preview/Compute.json#/parameters/LocationParameter
      - $ref: Disks.json#/parameters/UserSubscriptionIdParameter
      - $ref: Disks.json#/parameters/DiskStateParameter
      - $ref: Disks.json#/parameters/SourceSharePathParameter
      - $ref: Disks.json#/parameters/SourceScaleUnitParameter
      - $ref: Disks.json#/parameters/SourceVolumeLabelParameter
      - $ref: Disks.json#/parameters/DiskCountParameter
      - $ref: Disks.json#/parameters/DiskStartParameter
      - $ref: ../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter
      responses:
        '200':
          description: OK -- The list of disks has been returned.
          content:
            application/json:
              schema:
                $ref: Disks.json#/definitions/DiskList
        default:
          description: Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
          content:
            application/json:
              schema:
                $ref: ../2015-12-01-preview/Compute.json#/definitions/CrpErrorResponse
      x-ms-pageable:
        nextLinkName: null
      summary: Microsoft Azure Get Subscriptions Subscriptionid Providers Microsoft Compute…
  /subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/disks/{DiskId}:
    get:
      x-ms-examples:
        Returns the requested disk.:
          $ref: ./examples/Disks/Get.json
      tags:
      - Disks
      operationId: microsoftAzureDisksGet
      description: Returns the disk.
      parameters:
      - $ref: ../2015-12-01-preview/Compute.json#/parameters/SubscriptionIdParameter
      - $ref: ../2015-12-01-preview/Compute.json#/parameters/LocationParameter
      - $ref: Disks.json#/parameters/DiskIdParameter
      - $ref: ../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter
      responses:
        '200':
          description: OK -- The disk has been returned.
          content:
            application/json:
              schema:
                $ref: Disks.json#/definitions/Disk
        default:
          description: Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
          content:
            application/json:
              schema:
                $ref: ../2015-12-01-preview/Compute.json#/definitions/CrpErrorResponse
      summary: Microsoft Azure Get Subscriptions Subscriptionid Providers Microsoft Compute…
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks
  : get:
      tags:
      - Disks
      description: List disks in a given user profile.
      operationId: microsoftAzureDisksList
      parameters:
      - $ref: '#/components/parameters/subscriptionId'
      - $ref: '#/components/parameters/resourceGroupName'
      - name: labName
        in: path
        description: The name of the lab.
        required: true
        schema:
          type: string
      - name: userName
        in: path
        description: The name of the user profile.
        required: true
        schema:
          type: string
      - name: $expand
        in: query
        description: 'Specify the $expand query. Example: ''properties($select=diskType)'''
        schema:
          type: string
      - name: $filter
        in: query
        description: 'The filter to apply to the operation. Example: ''$filter=contains(name,''myName'')'
        schema:
          type: string
      - name: $top
        in: query
        description: 'The maximum number of resources to return from the operation. Example: ''$top=10'''
        schema:
          type: integer
          format: int32
      - name: $orderby
        in: query
        description: 'The ordering expression for the results, using OData notation. Example: ''$orderby=name desc'''
        schema:
          type: string
      - $ref: '#/components/parameters/api-version'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiskList'
        default:
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
      x-ms-odata: '#/definitions/Disk'
      x-ms-examples:
        Disks_List:
          $ref: ./examples/Disks_List.json
      summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups…
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}
  : get:
      tags:
      - Disks
      description: Get disk.
      operationId: microsoftAzureDisksGet
      parameters:
      - $ref: '#/components/parameters/subscriptionId'
      - $ref: '#/components/parameters/resourceGroupName'
      - name: labName
        in: path
        description: The name of the lab.
        required: true
        schema:
          type: string
      - name: userName
        in: path
        description: The name of the user profile.
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the disk.
        required: true
        schema:
          type: string
      - name: $expand
        in: query
        description: 'Specify the $expand query. Example: ''properties($select=diskType)'''
        schema:
          type: string
      - $ref: '#/components/parameters/api-version'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Disk'
        default:
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-examples:
        Disks_Get:
          $ref: ./examples/Disks_Get.json
      summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups…
    put:
      tags:
      - Disks
      description: Create or replace an existing disk. This operation can take a while to complete.
      operationId: microsoftAzureDisksCreateorupdate
      parameters:
      - $ref: '#/components/parameters/subscriptionId'
      - $ref: '#/components/parameters/resourceGroupName'
      - name: labName
        in: path
        description: The name of the lab.
        required: true
        schema:
          type: string
      - name: userName
        in: path
        description: The name of the user profile.
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the disk.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/api-version'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Disk'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Disk'
        default:
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-examples:
        Disks_CreateOrUpdate:
          $ref: ./examples/Disks_CreateOrUpdate.json
      x-ms-long-running-operation: true
      summary: Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups…
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Disk'
        description: A Disk.
        required: true
    delete:
      tags:
      - Disks
      description: Delete disk. This operation can take a while to complete.
      operationId: microsoftAzureDisksDelete
      parameters:
      - $ref: '#/components/parameters/subscriptionId'
      - $ref: '#/components/parameters/resourceGroupName'
      - name: labName
        in: path
        description: The name of the lab.
        required: true
        schema:
          type: string
      - name: userName
        in: path
        description: The name of the user profile.
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the disk.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/api-version'
      responses:
        '200':
          description: OK
        '202':
          description: Accepted
        '204':
          description: No Content
        default:
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-examples:
        Disks_Delete:
          $ref: ./examples/Disks_Delete.json
      x-ms-long-running-operation: true
      summary: Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups…
    patch:
      tags:
      - Disks
      description: Allows modifying tags of disks. All other properties will be ignored.
      operationId: microsoftAzureDisksUpdate
      parameters:
      - $ref: '#/components/parameters/subscriptionId'
      - $ref: '#/components/parameters/resourceGroupName'
      - name: labName
        in: path
        description: The name of the lab.
        required: true
        schema:
          type: string
      - name: userName
        in: path
        description: The name of the user profile.
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the disk.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/api-version'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Disk'
        default:
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-examples:
        Disks_Update:
          $ref: ./examples/Disks_Update.json
      summary: Microsoft Azure Patch Subscriptions Subscriptionid Resourcegroups…
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DiskFragment'
        description: A Disk.
        required: true
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}/attach
  : post:
      tags:
      - Disks
      description: Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete.
      operationId: microsoftAzureDisksAttach
      parameters:
      - $ref: '#/components/parameters/subscriptionId'
      - $ref: '#/components/parameters/resourceGroupName'
      - name: labName
        in: path
        description: The name of the lab.
        required: true
        schema:
          type: string
      - name: userName
        in: path
        description: The name of the user profile.
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the disk.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/api-version'
      responses:
        '200':
          description: OK
        '202':
          description: Accepted
        default:
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-examples:
        Disks_Attach:
          $ref: ./examples/Disks_Attach.json
      x-ms-long-running-operation: true
      summary: Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups…
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttachDiskProperties'
        description: Properties of the disk to attach.
        required: true
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}/detach
  : post:
      tags:
      - Disks
      description: Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete.
      operationId: microsoftAzureDisksDetach
      parameters:
      - $ref: '#/components/parameters/subscriptionId'
      - $ref: '#/components/parameters/resourceGroupName'
      - name: labName
        in: path
        description: The name of the lab.
        required: true
        schema:
          type: string
      - name: userName
        in: path
        description: The name of the user profile.
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the disk.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/api-version'
      responses:
        '200':
          description: OK
        '202':
          description: Accepted
        default:
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-examples:
        Disks_Detach:
          $ref: ./examples/Disks_Detach.json
      x-ms-long-running-operation: true
      summary: Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups…
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DetachDiskProperties'
        description: Properties of the disk to detach.
        required: true
components:
  securitySchemes:
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: impersonate your user account
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Authorization uses an Azure Active Directory OAuth2 flow.
  parameters:
    subscriptionId:
      name: subscriptionId
      in: path
      description: The subscription ID.
      required: true
      schema:
        type: string
    api-version:
      name: api-version
      in: query
      description: Client API version.
      required: true
      schema:
        type: string
        default: '2018-09-15'
    resourceGroupName:
      name: resourceGroupName
      in: path
      description: The name of the resource group.
      required: true
      x-ms-parameter-location: method
      schema:
        type: string
  schemas:
    UpdateResource:
      description: Represents an update resource
      type: object
      properties:
        tags:
          description: The tags of the resource.
          type: object
          additionalProperties:
            type: string
    DiskList:
      description: The response of a list operation.
      type: object
      properties:
        value:
          description: Results of the list operation.
          type: array
          items:
            $ref: '#/components/schemas/Disk'
        nextLink:
          description: Link for next set of results.
          type: string
    CloudErrorBody:
      description: Body of an error from a REST request.
      type: object
      properties:
        code:
          description: The error code.
          type: string
        message:
          description: The error message.
          type: string
        target:
          description: The error target.
          type: string
        details:
          description: Inner errors.
          type: array
          items:
            $ref: '#/components/schemas/CloudErrorBody'
      x-ms-external: true
    CloudError:
      description: Error from a REST request.
      type: object
      properties:
        error:
          $ref: '#/components/schemas/CloudErrorBody'
          description: The cloud error that occurred
      x-ms-external: true
    DetachDiskProperties:
      description: Properties of the disk to detach.
      type: object
      properties:
        leasedByLabVmId:
          description: The resource ID of the Lab VM to which the disk is attached.
          type: string
    Disk:
      description: A Disk.
      required:
      - properties
      type: object
      allOf:
      - $ref: '#/components/schemas/Resource'
      properties:
        properties:
          $ref: '#/components/schemas/DiskProperties'
          description: The properties of the resource.
          x-ms-client-flatten: true
    DiskProperties:
      description: Properties of a disk.
      type: object
      properties:
        diskType:
          description: The storage type for the disk (i.e. Standard, Premium).
          enum:
          - Standard
          - Premium
          - StandardSSD
          type: string
          x-ms-enum:
            name: StorageType
            modelAsString: true
        diskSizeGiB:
          format: int32
          description: The size of the disk in Gibibytes.
          type: integer
        leasedByLabVmId:
          description: The resource ID of the VM to which this disk is leased.
          type: string
        diskBlobName:
          description: When backed by a blob, the name of the VHD blob without extension.
          type: string
        diskUri:
          description: When backed by a blob, the URI of underlying blob.
          type: string
        storageAccountId:
          description: When backed by a blob, the storage account where the blob is.
          type: string
        createdDate:
          format: date-time
          description: The creation date of the disk.
          type: string
          readOnly: true
        hostCaching:
          description: The host caching policy of the disk (i.e. None, ReadOnly, ReadWrite).
          type: string
        managedDiskId:
          description: When backed by managed disk, this is the ID of the compute disk resource.
          type: string
        provisioningState:
          description: The provisioning status of the resource.
          type: string
          readOnly: true
        uniqueIdentifier:
          description: The unique immutable identifier of a resource (Guid).
          type: string
          readOnly: true
    AttachDiskProperties:
      description: Properties of the disk to attach.
      type: object
      properties:
        leasedByLabVmId:
          description: The resource ID of the Lab virtual machine to which the disk is attached.
          type: string
    DiskFragment:
      description: A Disk.
      type: object
      allOf:
      - $ref: '#/components/schemas/UpdateResource'
      properties: {}
    Resource:
      description: An Azure resource.
      type: object
      properties:
        id:
          description: The identifier of the resource.
          type: string
          readOnly: true
        name:
          description: The name of the resource.
          type: string
          readOnly: true
        type:
          description: The type of the resource.
          type: string
          readOnly: true
        location:
          description: The location of the resource.
          type: string
        tags:
          description: The tags of the resource.
          type: object
          additionalProperties:
            type: string
      x-ms-azure-resource: true