Azure DevTest Labs Virtual Networks API

The Virtual Networks API from Azure DevTest Labs — 2 operation(s) for virtual networks.

GitHub OpenAPI

Operations 5

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks Virtual networks list #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name} Virtual networks get #
PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name} Virtual networks create or update #
PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name} Virtual networks update #
DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name} Virtual networks delete #

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/azure-test-labs:azure-test-labs-virtual-networks-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

azure-test-labs-virtual-networks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DevTestLabsClient Virtual Networks API
  version: '2018-09-15'
  description: The DevTest Labs Client.
  x-typespec-generated:
  - emitter: '@azure-tools/typespec-autorest'
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: Virtual Networks
paths:
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks
  : get:
      operationId: VirtualNetworks_List
      tags:
      - Virtual Networks
      description: List virtual networks in a given lab.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: labName
        in: path
        description: The name of the lab.
        required: true
        schema:
          type: string
      - name: $expand
        in: query
        description: 'Specify the $expand query. Example: ''properties($expand=externalSubnets)'''
        required: false
        schema:
          type: string
      - name: $filter
        in: query
        description: 'The filter to apply to the operation. Example: ''$filter=contains(name,''myName'')'
        required: false
        schema:
          type: string
      - name: $top
        in: query
        description: 'The maximum number of resources to return from the operation. Example: ''$top=10'''
        required: false
        schema:
          type: integer
          format: int32
      - name: $orderby
        in: query
        description: 'The ordering expression for the results, using OData notation. Example: ''$orderby=name desc'''
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualNetworkList'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Virtual networks list
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}
  : get:
      operationId: VirtualNetworks_Get
      tags:
      - Virtual Networks
      description: Get virtual network.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: labName
        in: path
        description: The name of the lab.
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the virtual network.
        required: true
        schema:
          type: string
      - name: $expand
        in: query
        description: 'Specify the $expand query. Example: ''properties($expand=externalSubnets)'''
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualNetwork'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      summary: Virtual networks get
      x-summary-source: derived
    put:
      operationId: VirtualNetworks_CreateOrUpdate
      tags:
      - Virtual Networks
      description: Create or replace an existing virtual network. This operation can take a while to complete.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: labName
        in: path
        description: The name of the lab.
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the virtual network.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Resource 'VirtualNetwork' update operation succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualNetwork'
        '201':
          description: Resource 'VirtualNetwork' create operation succeeded
          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
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualNetwork'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-ms-long-running-operation-options:
        final-state-via: location
      x-ms-long-running-operation: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VirtualNetwork'
        description: A virtual network.
        required: true
      summary: Virtual networks create or update
      x-summary-source: derived
    patch:
      operationId: VirtualNetworks_Update
      tags:
      - Virtual Networks
      description: Allows modifying tags of virtual networks. All other properties will be ignored.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: labName
        in: path
        description: The name of the lab.
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the virtual network.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualNetwork'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VirtualNetworkFragment'
        description: A virtual network.
        required: true
      summary: Virtual networks update
      x-summary-source: derived
    delete:
      operationId: VirtualNetworks_Delete
      tags:
      - Virtual Networks
      description: Delete virtual network. This operation can take a while to complete.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: labName
        in: path
        description: The name of the lab.
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The name of the virtual network.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Resource deleted successfully.
        '202':
          description: Resource deletion 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
        '204':
          description: Resource does not exist.
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-ms-long-running-operation-options:
        final-state-via: location
      x-ms-long-running-operation: true
      summary: Virtual networks delete
      x-summary-source: derived
components:
  parameters:
    SubscriptionIdParameter:
      name: subscriptionId
      in: path
      description: The ID of the target subscription.
      required: true
      schema:
        type: string
        minLength: 1
    ApiVersionParameter:
      name: api-version
      in: query
      description: The API version to use for this operation.
      required: true
      schema:
        type: string
        minLength: 1
    ResourceGroupNameParameter:
      name: resourceGroupName
      in: path
      description: The name of the resource group. The name is case insensitive.
      required: true
      x-ms-parameter-location: method
      schema:
        type: string
        maxLength: 90
        minLength: 1
  schemas:
    Subnet:
      type: object
      description: Subnet information.
      properties:
        resourceId:
          type: string
          description: The resource ID of the subnet.
        labSubnetName:
          type: string
          description: The name of the subnet as seen in the lab.
        allowPublicIp:
          $ref: '#/components/schemas/UsagePermissionType'
          description: The permission policy of the subnet for allowing public IP addresses (i.e. Allow, Deny)).
    Resource:
      type: object
      title: Resource
      description: Common fields that are returned in the response for all Azure Resource Manager resources
      properties:
        id:
          type: string
          description: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
          readOnly: true
        name:
          type: string
          description: The name of the resource
          readOnly: true
        type:
          type: string
          description: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
          readOnly: true
        systemData:
          $ref: '#/components/schemas/systemData'
          type: object
          description: Azure Resource Manager metadata containing createdBy and modifiedBy information.
          readOnly: true
      x-ms-azure-resource: true
    VirtualNetworkProperties:
      type: object
      description: Properties of a virtual network.
      properties:
        allowedSubnets:
          type: array
          description: The allowed subnets of the virtual network.
          items:
            $ref: '#/components/schemas/Subnet'
          x-ms-identifiers: []
        description:
          type: string
          description: The description of the virtual network.
        externalProviderResourceId:
          type: string
          description: The Microsoft.Network resource identifier of the virtual network.
        externalSubnets:
          type: array
          description: The external subnet properties.
          items:
            $ref: '#/components/schemas/ExternalSubnet'
          readOnly: true
        subnetOverrides:
          type: array
          description: The subnet overrides of the virtual network.
          items:
            $ref: '#/components/schemas/SubnetOverride'
          x-ms-identifiers: []
        createdDate:
          type: string
          format: date-time
          description: The creation date of the virtual network.
          readOnly: true
        provisioningState:
          type: string
          description: The provisioning status of the resource.
          readOnly: true
        uniqueIdentifier:
          type: string
          description: The unique immutable identifier of a resource (Guid).
          readOnly: true
    ErrorResponse:
      type: object
      title: Error response
      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.).
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
          description: The error object.
    VirtualNetwork:
      type: object
      description: A virtual network.
      properties:
        properties:
          $ref: '#/components/schemas/VirtualNetworkProperties'
          description: The properties of the resource.
          x-ms-client-flatten: true
        tags:
          type: object
          description: Resource tags.
          additionalProperties:
            type: string
        location:
          type: string
          description: The geo-location where the resource lives
          x-ms-mutability:
          - read
          - create
      required:
      - properties
      allOf:
      - $ref: '#/components/schemas/ProxyResource'
    SubnetSharedPublicIpAddressConfiguration:
      type: object
      description: Configuration for public IP address sharing.
      properties:
        allowedPorts:
          type: array
          description: Backend ports that virtual machines on this subnet are allowed to expose
          items:
            $ref: '#/components/schemas/Port'
          x-ms-identifiers: []
    VirtualNetworkFragment:
      type: object
      description: A virtual network.
      allOf:
      - $ref: '#/components/schemas/UpdateResource'
    VirtualNetworkList:
      type: object
      description: The response of a list operation.
      properties:
        value:
          type: array
          description: The VirtualNetwork items on this page
          items:
            $ref: '#/components/schemas/VirtualNetwork'
        nextLink:
          type: string
          format: uri
          description: The link to the next page of items
      required:
      - value
    UsagePermissionType:
      type: string
      description: The permission policy of the subnet for allowing public IP addresses (i.e. Allow, Deny)).
      enum:
      - Default
      - Deny
      - Allow
      x-ms-enum:
        name: UsagePermissionType
        modelAsString: true
        values:
        - name: Default
          value: Default
        - name: Deny
          value: Deny
        - name: Allow
          value: Allow
    SubnetOverride:
      type: object
      description: Property overrides on a subnet of a virtual network.
      properties:
        resourceId:
          type: string
          description: The resource ID of the subnet.
        labSubnetName:
          type: string
          description: The name given to the subnet within the lab.
        useInVmCreationPermission:
          $ref: '#/components/schemas/UsagePermissionType'
          description: Indicates whether this subnet can be used during virtual machine creation (i.e. Allow, Deny).
        usePublicIpAddressPermission:
          $ref: '#/components/schemas/UsagePermissionType'
          description: Indicates whether public IP addresses can be assigned to virtual machines on this subnet (i.e. Allow, Deny).
        sharedPublicIpAddressConfiguration:
          $ref: '#/components/schemas/SubnetSharedPublicIpAddressConfiguration'
          description: Properties that virtual machines on this subnet will share.
        virtualNetworkPoolName:
          type: string
          description: The virtual network pool associated with this subnet.
    Port:
      type: object
      description: Properties of a network port.
      properties:
        transportProtocol:
          $ref: '#/components/schemas/TransportProtocol'
          description: Protocol type of the port.
        backendPort:
          type: integer
          format: int32
          description: Backend port of the target virtual machine.
    TransportProtocol:
      type: string
      description: The transport protocol for the endpoint.
      enum:
      - Tcp
      - Udp
      x-ms-enum:
        name: TransportProtocol
        modelAsString: true
        values:
        - name: Tcp
          value: Tcp
        - name: Udp
          value: Udp
    UpdateResource:
      type: object
      description: Represents an update resource
      properties:
        tags:
          type: object
          description: The tags of the resource.
          additionalProperties:
            type: string
    ProxyResource:
      type: object
      title: Proxy Resource
      description: The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
      allOf:
      - $ref: '#/components/schemas/Resource'
    ExternalSubnet:
      type: object
      description: Subnet information as returned by the Microsoft.Network API.
      properties:
        id:
          type: string
          description: Gets or sets the identifier.
        name:
          type: string
          description: Gets or sets the name.
  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.