Azure Container Registry Oauth2 API

The Oauth2 API from Azure Container Registry — 2 operation(s) for oauth2.

GitHub OpenAPI

Operations 3

POST /oauth2/exchange Authentication exchange aad access token for acr refresh token #
GET /oauth2/token Authentication get acr access token from login #
POST /oauth2/token Authentication exchange acr refresh token for acr access token #

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-container-registry:azure-container-registry-oauth2-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-container-registry-oauth2-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Azure Container Registry Oauth2 API
  version: '2021-07-01'
  description: Metadata API definition for the Azure Container Registry runtime
  x-typespec-generated:
  - emitter: '@azure-tools/typespec-autorest'
security:
- OAuth2Auth:
  - https://containerregistry.azure.net/.default
tags:
- name: OAuth2
paths:
  /oauth2/exchange:
    post:
      operationId: Authentication_ExchangeAadAccessTokenForAcrRefreshToken
      description: Exchange AAD tokens for an ACR refresh Token
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcrRefreshToken'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcrErrors'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                grantType:
                  type: string
                  enum:
                  - access_token_refresh_token
                  - access_token
                  - refresh_token
                  description: 'Can take a value of access_token_refresh_token, or access_token, or

                    refresh_token'
                service:
                  type: string
                  description: Indicates the name of your Azure container registry.
                tenant:
                  type: string
                  description: AAD tenant associated to the AAD credentials.
                refreshToken:
                  type: string
                  description: 'AAD refresh token, mandatory when grant_type is access_token_refresh_token or

                    refresh_token'
                accessToken:
                  type: string
                  description: 'AAD access token, mandatory when grant_type is access_token_refresh_token or

                    access_token.'
              required:
              - grantType
              - service
      tags:
      - OAuth2
      summary: Authentication exchange aad access token for acr refresh token
      x-summary-source: derived
  /oauth2/token:
    get:
      operationId: Authentication_GetAcrAccessTokenFromLogin
      description: Exchange Username, Password and Scope for an ACR Access Token
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: service
        in: query
        description: Indicates the name of your Azure container registry.
        required: true
        schema:
          type: string
      - name: scope
        in: query
        description: 'Expected to be a valid scope, and can be specified more than once for multiple

          scope requests. You can obtain this from the Www-Authenticate response header

          from the challenge.'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcrAccessToken'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcrErrors'
      tags:
      - OAuth2
      summary: Authentication get acr access token from login
      x-summary-source: derived
    post:
      operationId: Authentication_ExchangeAcrRefreshTokenForAcrAccessToken
      description: Exchange ACR Refresh token for an ACR Access Token
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcrAccessToken'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcrErrors'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                grantType:
                  type: string
                  enum:
                  - access_token_refresh_token
                  - access_token
                  - refresh_token
                  description: 'Can take a value of access_token_refresh_token, or access_token, or

                    refresh_token'
                service:
                  type: string
                  description: Indicates the name of your Azure container registry.
                tenant:
                  type: string
                  description: AAD tenant associated to the AAD credentials.
                refreshToken:
                  type: string
                  description: 'AAD refresh token, mandatory when grant_type is access_token_refresh_token or

                    refresh_token'
                accessToken:
                  type: string
                  description: 'AAD access token, mandatory when grant_type is access_token_refresh_token or

                    access_token.'
              required:
              - grantType
              - service
      tags:
      - OAuth2
      summary: Authentication exchange acr refresh token for acr access token
      x-summary-source: derived
components:
  schemas:
    AcrErrors:
      type: object
      description: Acr error response describing why the operation failed
      properties:
        errors:
          type: array
          description: Array of detailed error
          items:
            $ref: '#/components/schemas/AcrErrorInfo'
    AcrAccessToken:
      type: object
      description: The ACR access token response containing the access token for authentication.
      properties:
        access_token:
          type: string
          description: The access token for performing authenticated requests
          x-ms-client-name: accessToken
    AcrErrorInfo:
      type: object
      description: Error information
      properties:
        code:
          type: string
          description: Error code
        message:
          type: string
          description: Error message
        detail:
          type: object
          description: Error details
    AcrRefreshToken:
      type: object
      description: The ACR refresh token response containing the refresh token for authentication.
      properties:
        refresh_token:
          type: string
          description: The refresh token to be used for generating access tokens
          x-ms-client-name: refreshToken
  parameters:
    Azure.Core.Foundations.ApiVersionParameter:
      name: api-version
      in: query
      description: The API version to use for this operation.
      required: true
      x-ms-parameter-location: method
      x-ms-client-name: apiVersion
      schema:
        type: string
        minLength: 1
  securitySchemes:
    OAuth2Auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            https://containerregistry.azure.net/.default: ''
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
x-ms-parameterized-host:
  hostTemplate: '{endpoint}'
  useSchemePrefix: false
  parameters:
  - name: endpoint
    in: path
    required: true
    type: string
    format: uri
    x-ms-skip-url-encoding: true
x-ms-paths:
  /v2/{name}/blobs/{digest}?_overload=checkChunkExists:
    head:
      operationId: ContainerRegistryBlob_CheckChunkExists
      description: Same as GET, except only the headers are returned.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: name
        in: path
        description: Name of the image (including the namespace)
        required: true
        type: string
      - name: digest
        in: path
        description: Digest of a BLOB
        required: true
        type: string
      - name: range
        in: header
        description: 'Format : bytes=<start>-<end>,  HTTP Range header specifying blob chunk.'
        required: true
        type: string
        x-ms-client-name: Range
      responses:
        '200':
          description: The request has succeeded.
          headers:
            Content-Length:
              type: integer
              format: int64
              description: The length of the requested blob content.
            Content-Range:
              type: string
              description: Content range of the blob chunk.
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/components/schemas/AcrErrors'
  /v2/{name}/blobs/{digest}?_overload=getChunk:
    get:
      operationId: ContainerRegistryBlob_GetChunk
      description: 'Retrieve the blob from the registry identified by `digest`. This endpoint may

        also support RFC7233 compliant range requests. Support can be detected by

        issuing a HEAD request. If the header `Accept-Range: bytes` is returned, range

        requests can be used to fetch partial content.'
      produces:
      - application/octet-stream
      - application/json
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: name
        in: path
        description: Name of the image (including the namespace)
        required: true
        type: string
      - name: digest
        in: path
        description: Digest of a BLOB
        required: true
        type: string
      - name: range
        in: header
        description: 'Format : bytes=<start>-<end>,  HTTP Range header specifying blob chunk.'
        required: true
        type: string
        x-ms-client-name: Range
      responses:
        '206':
          description: Successful
          schema:
            type: string
            format: binary
          headers:
            Content-Length:
              type: integer
              format: int64
              description: The length of the requested blob content.
            Content-Range:
              type: string
              description: Content range of the blob chunk.
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/components/schemas/AcrErrors'
  /v2/{name}/blobs/uploads/?_overload=startUpload:
    post:
      operationId: ContainerRegistryBlob_StartUpload
      description: Initiate a resumable blob upload with an empty request body.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: name
        in: path
        description: Name of the image (including the namespace)
        required: true
        type: string
      responses:
        '202':
          description: The request has been accepted for processing, but processing has not yet completed.
          headers:
            Docker-Upload-UUID:
              type: string
              description: Identifies the docker upload uuid for the current request.
            Location:
              type: string
              description: Provided location for blob
            Range:
              type: string
              description: Range indicating the current progress of the upload.
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/components/schemas/AcrErrors'