canonical: https://jentic.com/apis/azure.com/devtestlabsclient

# Microsoft Azure DevTestLabsClient

Jentic publishes the only available OpenAPI specification for DevTestLabsClient, keeping it validated and agent-ready. The API is the full management surface for Azure DevTest Labs under Microsoft.DevTestLab - labs, virtual machines, formulas, custom images, ARM templates, artifacts, schedules, policies, environments, and disks. Across 132 endpoints it covers every step of provisioning self-service dev/test environments, scheduling auto-shutdown, and enforcing per-user quotas without giving developers direct subscription access.

## For AI agents

Manage Azure DevTest Labs end-to-end - create labs and lab VMs, apply artefacts and ARM templates, schedule auto-shutdown, enforce policies, and manage formulas and custom images.

## Scope

Does not manage Azure subscriptions, run application workloads inside provisioned VMs, or handle billing - use for Microsoft.DevTestLab lab and lab-resource lifecycle only.

## Capabilities

- Create labs and provision lab virtual machines from formulas, custom images, or marketplace images
- Apply artefacts and ARM-template-based environments to lab VMs
- Schedule auto-shutdown and auto-start on labs and individual VMs
- Define and enforce per-user policies including VM-per-user, gallery image, and allowed VM sizes
- Manage formulas, custom images, secrets, and disks owned by lab users
- List artifact sources, ARM templates, and notification channels for a lab

## Use cases

### Self-service dev/test environments

Engineering organisations use DevTest Labs to give developers self-service access to VMs and full ARM-template environments without granting subscription-level access. The API provisions the lab, attaches policies and artefact sources, and lets each developer spin up VMs that automatically shut down at the configured time, controlling cost without manual intervention.

Example prompt: Create a DevTest Lab named 'platform-lab' in resource group 'lab-rg', attach the corporate artefact source, and set auto-shutdown to 19:00 in the local time zone

### Cost-controlled VM provisioning

Lab admins enforce limits on which VM sizes developers can pick, how many VMs a single user can run, and which gallery images are allowed. The policies and policy-set endpoints let an automation flow apply these guardrails consistently across every lab in the subscription.

Example prompt: Apply a policy on lab 'platform-lab' that restricts allowed VM sizes to Standard_B2ms and Standard_D2s_v3 and caps each user at 3 VMs

### Reproducible environment templates

Teams distribute reproducible environments as DevTest Labs formulas and ARM-template environments. Developers pick from a catalogue, the lab provisions the matching environment, and artefacts run automatically on first boot to install required tooling - turning environment setup into a one-click action.

Example prompt: Provision a lab VM from formula 'fullstack-dev' on lab 'platform-lab' for the requesting user and apply the 'install-corporate-tooling' artefact after boot

### Auto-shutdown sweep

Cost reports often surface lab VMs that escape auto-shutdown because they were created outside the standard provisioning flow. A nightly sweep iterates labs across the subscription, lists running VMs, and attaches the standard shutdown schedule to any VM missing one - capping idle spend without disrupting active work.

Example prompt: Walk every lab in the subscription, list its VMs, and attach the standard 19:00 shutdown schedule to any VM that does not already have one

### Agent-driven environment hand-out

An AI agent fronting an internal developer portal accepts a 'give me a workspace' request, searches Jentic for the lab VM create operation, picks a formula based on the requested role, and provisions the VM with the right artefacts. Jentic isolates the lab admin's Azure credentials so the agent never sees the underlying client secret.

Example prompt: Provision a lab VM from formula 'fullstack-dev' for the user 'alice@example.com' and confirm the auto-shutdown schedule is attached

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/labs | List labs in a subscription |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs | List labs in a resource group |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources | List artefact sources on a lab |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/armtemplates | List ARM templates from an artefact source |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/armtemplates/{name} | Get a specific ARM template |
| GET | /subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/schedules | List global schedules across the subscription |
| GET | /providers/Microsoft.DevTestLab/operations | List Microsoft.DevTestLab provider operations |

## Key resources

- **Labs** — Top-level DevTest Lab resources at subscription and resource-group scope
- **VirtualMachines** — Lab VMs with create, claim, start, stop, and apply-artefact actions
- **Formulas** — Reusable VM templates that capture base image and applied artefacts
- **ArtifactSources and Artifacts** — Sources and individual artefacts that install tooling on lab VMs
- **ArmTemplates and Environments** — ARM-template-based environments deployed inside a lab
- **Policies and PolicySets** — Per-lab and per-user policies that enforce quotas and allowed configurations
- **Schedules** — Auto-start and auto-shutdown schedules at lab and VM scope, plus global schedules across the subscription
- **CustomImages, Disks, Secrets** — User-owned and lab-owned images, disks, and secrets managed inside a lab

## Why Jentic

- **Setup:** Wiring the 132-endpoint Microsoft.DevTestLab surface by hand means acquiring Azure AD OAuth 2.0 bearer tokens, hand-building deeply nested ARM URLs under management.azure.com, and polling every long-running VM, artefact, and schedule operation yourself. Through Jentic you install once, import DevTestLabsClient from the API Directory, store the Azure AD credential once, and your agent calls it.
- **Permission scoping:** Lab and lab-resource ids sit in the URL path (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/...), so a rule can pin your agent to one subscription, resource group, and lab. You choose the operations it may call, so destructive ones like deleting a lab or a lab VM are not included unless you add them.
- **Credential handling:** Your Azure AD credential is stored once, encrypted, by your own Jentic One instance and injected as a short-lived bearer token at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'provision an azure devtest labs vm from a formula' or 'attach an auto-shutdown schedule to a lab', and Jentic returns the matching operation with its lab-name, vm-name, and formula input schema so the agent calls the right endpoint without reading the ARM reference.

## Related APIs

- **DevSpacesManagement** — Provides Kubernetes-based per-developer namespaces instead of VM labs
- **DeploymentScriptsClient** — Runs inline ARM Deployment Scripts that may seed lab artefacts
- **DeviceServices** — Manages Windows IoT device services rather than dev/test VMs
- **DeletedWebApps API Client** — Surfaces soft-deleted App Service apps that may have hosted lab webhooks

## FAQ

### Why is there no official OpenAPI spec for DevTestLabsClient?

Microsoft Azure does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call DevTestLabsClient via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the DevTest Labs API use?

The API runs through Azure Resource Manager and uses OAuth 2.0 bearer tokens issued by Azure Active Directory. Through Jentic, the AAD client secret or managed identity refresh token is held in the encrypted vault and a short-lived access token is supplied at execute time so the bearer token never appears in the agent's context.

### Can I provision a lab VM from a formula with this API?

Yes. PUT under .../labs/{labName}/virtualmachines/{name} accepts a payload referencing a formula or custom image and creates the VM in the lab. The call returns immediately with a long-running operation; poll the VM resource until provisioningState reaches Succeeded before claiming or applying artefacts.

### What are the rate limits for the DevTest Labs API?

Azure Resource Manager applies subscription-level read and write throttles (around 12,000 reads per hour and 1,200 writes per hour per region per subscription) and returns 429 with a Retry-After header when exceeded. Lab-scoped operations like listing artefacts share the read budget, so cache results across short windows.

### How do I attach an auto-shutdown schedule to a lab through Jentic?

Search Jentic for 'attach auto shutdown schedule devtest lab', load the schema for the schedule createOrUpdate operation under .../labs/{labName}/schedules/{name}, then execute with the desired daily recurrence and time zone. The pip install jentic Python SDK uses the async search, load, execute pattern.

### Is the DevTest Labs API free?

There is no per-call charge for the management API itself; Azure DevTest Labs bills the underlying VMs, disks, storage, and network according to standard Azure pricing. The lab construct is free - costs come from the resources you provision through it.

### Can I limit what my agent is allowed to do with the Azure DevTest Labs API?

Yes. Because the subscription, resource group, and lab name all sit in the request path (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/...), a rule in your self-hosted Jentic One can pin the agent to a single subscription, resource group, and lab. You decide which operations it may call, so read and provisioning actions like listing labs or creating a VM from a formula can be enabled while destructive ones such as deleting a lab or a lab VM stay out unless you add them. Your Azure AD credential is held by your own instance and injected only at execution time, so the agent scopes what it touches without ever handling the secret.
