API template library

Azure Container Registry data-plane mock API and live sandbox

A WireMock simulation of Microsoft Azure's REST API — covering repository listings, manifests, tags, and the registry token exchange.

Vendor
Microsoft Azure
Functionality
Repositories, manifests, tags, tokens
Spec version
2021-07-01
Endpoints
26
Stubs
30
Protocol
REST
Validation
AI-validated Before publication, an AI agent exercised these endpoints against the real Microsoft Azure API through WireMock's recording proxy, and the recorded traffic was used to verify each stub's request and response shapes.

Live sandbox · no signup, no API key

Azure Container Registry Data Plane

A running WireMock Cloud instance of this template, callable right now from a terminal, a script, or an AI agent.

Base URL
https://lo8o6.wiremockapi.cloud

GET List repositories

curl -s -X GET 'https://lo8o6.wiremockapi.cloud/acr/v1/_catalog'

POST Exchange AAD token for ACR refresh token

curl -s -X POST 'https://lo8o6.wiremockapi.cloud/oauth2/exchange' \
  -H 'Content-Type: application/json' \
  -d '{}'

PUT Create or update manifest (Docker V2)

curl -s -X PUT 'https://lo8o6.wiremockapi.cloud/v2/your-name/manifests/your-reference' \
  -H 'Content-Type: application/json' \
  -d '{}'
Method Path Summary
GET /acr/v1/_catalog List repositories
DELETE /acr/v1/{name} Delete repository
GET /acr/v1/{name} Get repository properties
PATCH /acr/v1/{name} Update repository properties
GET /acr/v1/{name}/_manifests List manifests
GET /acr/v1/{name}/_manifests/{digest} Get manifest properties
PATCH /acr/v1/{name}/_manifests/{digest} Update manifest properties
GET /acr/v1/{name}/_tags List tags
DELETE /acr/v1/{name}/_tags/{reference} Delete tag
GET /acr/v1/{name}/_tags/{reference} Get tag properties
PATCH /acr/v1/{name}/_tags/{reference} Update tag attributes
POST /oauth2/exchange Exchange AAD access token for ACR refresh token
GET /oauth2/token Get ACR access token from login
POST /oauth2/token Exchange ACR refresh token for ACR access token
GET /v2/ Check Docker V2 API support
DELETE /v2/{name}/blobs/{digest} Delete blob
GET /v2/{name}/blobs/{digest} Get blob
HEAD /v2/{name}/blobs/{digest} Check if blob exists
POST /v2/{name}/blobs/uploads/ Start blob upload or mount blob
DELETE /v2/{name}/blobs/uploads/{uuid} Cancel blob upload
GET /v2/{name}/blobs/uploads/{uuid} Get blob upload status
PATCH /v2/{name}/blobs/uploads/{uuid} Upload blob chunk
PUT /v2/{name}/blobs/uploads/{uuid} Complete blob upload
DELETE /v2/{name}/manifests/{reference} Delete manifest
GET /v2/{name}/manifests/{reference} Get manifest
PUT /v2/{name}/manifests/{reference} Create or update manifest

Unauthenticated WireMock Cloud demo sandbox for Microsoft Azure — not an official Microsoft Azure sandbox, and it returns simulated example data only.

What's inside the data-plane template

A registry's data plane speaks two protocols at once, and the template stubs both. Under /acr/v1 lives Azure's metadata API — a catalog of three sample repositories, and tag records that pair each tag with its digest and the changeableAttributes lock flags (deleteEnabled, writeEnabled, and friends). Under /v2 lives the standard Docker Registry HTTP API: the version check answers 200, and a manifest request returns a schemaVersion-2 document whose config and layer entries carry sha256 digests a registry client can walk.

  • Repository metadata — the catalog listing plus per-repository properties, updates, and deletion
  • Tags & manifests — metadata reads and attribute updates, lock flags included
  • Docker Registry V2 — the version check, manifest routes, and the blob and chunked-upload family
  • Token chain — oauth2/exchange trading an AAD token for a refresh token, and oauth2/token for access

Example implementation using the container-registry SDK

The azure-containerregistry package is the rare Azure SDK that takes its endpoint as the first positional argument — and since it supports anonymous access, the sandbox needs no credential at all:

The .NET, Java, and JavaScript flavors of the same library share that endpoint-first construction, so whichever runtime your tooling uses, redirecting it here — or to your own WireMock Cloud copy — is one constructor argument.

Registry-adjacent tooling is where this pays off: image-cleanup jobs, tag-auditing scripts, and dashboard code that browses repositories can all run their logic against stable answers, with no ACR instance provisioned and no docker login performed first.

from azure.containerregistry import ContainerRegistryClient

# anonymous access — the mock gates nothing
client = ContainerRegistryClient("https://lo8o6.wiremockapi.cloud")

for repo in client.list_repository_names():
    print(repo)

Frequently asked questions

The routes a pull walks are present — version check, manifest fetch, blob downloads — but the blob bodies are stub payloads, not genuine image layers, so the Docker daemon would reject what it unpacks. Use the /v2 family to test registry-client wiring and protocol handling, not to produce runnable containers.

Faithfully in shape: POST an AAD token to oauth2/exchange and a refresh token comes back; trade it at oauth2/token for an access token. Neither input is checked, so the chain always completes — letting you verify your client performs the exchange sequence without standing up a real AAD tenant.

Tag and repository bodies are fixed samples — the {name} in your path selects the route, but the payload's registry and imageName fields don't echo it. Assertions should target structure (digests, timestamps, attribute flags) rather than expecting your repository name reflected back on the shared instance.

The vocabulary for it ships in every tag record: changeableAttributes exposes deleteEnabled, writeEnabled, listEnabled, and readEnabled, all true in the sandbox. Flip them to false in a WireMock Cloud copy and your handling of immutable tags or quarantine policies becomes a test you can run on every commit.

Vendor names identify APIs represented by WireMock template sources. This page does not imply vendor endorsement, certification, partnership, or official integration status.