openapi: 3.2.0 info: title: Microsoft Azure Access Token API version: '1.0' description: 'Operations tagged AccessToken across 2 of this provider''s published API definitions: azure-container-registry-openapi-original.yml, vi-openapi-original.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://management.azure.com tags: - name: Access Token paths: /oauth2/token: post: tags: - Access Token description: Exchange ACR Refresh token for an ACR Access Token operationId: microsoftAzureGetacraccesstoken parameters: - $ref: '#/components/parameters/Service' responses: '200': description: Access token acquired content: application/json: schema: $ref: '#/components/schemas/AccessToken' default: description: ACR error response describing why the operation failed. content: application/json: schema: $ref: '#/components/schemas/AcrErrors' security: [] x-ms-examples: Get Access Token with Refresh Token: $ref: ./examples/PostAccessToken.json summary: Microsoft Azure Post Oauth2 Token requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: grant_type: type: string enum: - refresh_token description: Grant type is expected to be refresh_token scope: type: string description: Which is expected to be a valid scope, and can be specified more than once for multiple scope requests. You obtained this from the Www-Authenticate response header from the challenge. refresh_token: type: string description: Must be a valid ACR refresh token required: - grant_type - scope - refresh_token get: tags: - Access Token description: Exchange Username, Password and Scope an ACR Access Token operationId: microsoftAzureGetacraccesstokenfromlogin parameters: - name: service in: query required: true description: Indicates the name of your Azure container registry. schema: type: string - name: scope in: query required: true 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. schema: type: string responses: '200': description: Access token acquired content: application/json: schema: $ref: '#/components/schemas/AccessToken' default: description: ACR error response describing why the operation failed. content: application/json: schema: $ref: '#/components/schemas/AcrErrors' security: - registry_auth: [] x-ms-examples: Get Access Token with username and password: $ref: ./examples/GetAccessToken.json summary: Microsoft Azure Get Oauth2 Token ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VideoIndexer/accounts/{accountName}/generateAccessToken : post: tags: - Access Token operationId: microsoftAzureGenerateAccesstoken description: Generate an Azure Video Indexer access token. x-ms-examples: 'Generate accessToken for video contributor #1': $ref: ./examples/ViGenerateAccessToken/ViGenerateVideoContributerAccessToken1.json 'Generate accessToken for video contributor #2': $ref: ./examples/ViGenerateAccessToken/ViGenerateVideoContributerAccessToken2.json 'Generate accessToken for video reader #1': $ref: ./examples/ViGenerateAccessToken/ViGenerateVideoReaderAccessToken1.json 'Generate accessToken for video reader #2': $ref: ./examples/ViGenerateAccessToken/ViGenerateVideoReaderAccessToken2.json 'Generate accessToken for project contributor #1': $ref: ./examples/ViGenerateAccessToken/ViGenerateProjectContributerAccessToken1.json 'Generate accessToken for project contributor #2': $ref: ./examples/ViGenerateAccessToken/ViGenerateProjectContributerAccessToken2.json 'Generate accessToken for project reader #1': $ref: ./examples/ViGenerateAccessToken/ViGenerateProjectReaderAccessToken1.json 'Generate accessToken for project reader #2': $ref: ./examples/ViGenerateAccessToken/ViGenerateProjectReaderAccessToken2.json Generate accessToken for account contributor: $ref: ./examples/ViGenerateAccessToken/ViGenerateAccountContributerAccessToken.json Generate accessToken for account reader: $ref: ./examples/ViGenerateAccessToken/ViGenerateAccountReaderAccessToken.json parameters: - $ref: ../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter - $ref: ../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter - $ref: '#/components/parameters/AccountNameParameter' - $ref: ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter responses: '200': description: The Azure Video Indexer account's access token properties were retrieved successfully. content: application/json: schema: $ref: '#/components/schemas/AccessToken_2' '400': description: Bad Request. x-ms-error-response: true content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Not Found x-ms-error-response: true content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '409': description: Conflict x-ms-error-response: true content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal Server Error x-ms-error-response: true content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' default: description: Error response describing why the operation failed. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups… requestBody: content: application/json: schema: $ref: '#/components/schemas/GenerateAccessTokenParameters' description: The parameters for generating access token security: - azure_auth: - user_impersonation servers: - url: https://management.azure.com components: schemas: AccessToken: type: object properties: access_token: description: The access token for performing authenticated requests type: string AcrErrorInfo: description: Error information properties: code: description: Error code type: string message: type: string description: Error message detail: type: object description: Error details AcrErrors: description: Acr error response describing why the operation failed properties: errors: type: array description: Array of detailed error items: $ref: '#/components/schemas/AcrErrorInfo' ErrorResponse: description: Error response. type: object properties: error: $ref: '#/components/schemas/ErrorDefinition' description: The error details. ErrorDefinition: description: Error definition. type: object properties: code: description: Service specific error code which serves as the substatus for the HTTP error code. type: string readOnly: true message: description: Description of the error. type: string readOnly: true details: description: Internal error details. type: array items: $ref: '#/components/schemas/ErrorDefinition' readOnly: true GenerateAccessTokenParameters: description: Access token generation request's parameters type: object required: - permissionType - scope properties: permissionType: type: string description: The requested permission enum: - Contributor - Reader x-ms-enum: name: permissionType modelAsString: true scope: type: string description: The requested media type enum: - Video - Account - Project x-ms-enum: name: scope modelAsString: true videoId: description: The video ID type: string example: 07ec9e38d4 projectId: description: The project ID type: string AccessToken_2: description: Azure Video Indexer access token. type: object properties: accessToken: type: string readOnly: true description: The access token. x-ms-secret: true example: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJPbmxpbmUgSldUIEJ1aWxkZXIiLCJpYXQiOjE2MjI0NDc3MzMsImV4cCI6MTY1Mzk4MzczMywiYXVkIjoid3d3LmV4YW1wbGUuY29tIiwic3ViIjoianJvY2tldEBleGFtcGxlLmNvbSIsIkdpdmVuTmFtZSI6IkpvaG5ueSIsIlN1cm5hbWUiOiJSb2NrZXQiLCJFbWFpbCI6Impyb2NrZXRAZXhhbXBsZS5jb20iLCJSb2xlIjpbIk1hbmFnZXIiLCJQcm9qZWN0IEFkbWluaXN0cmF0b3IiXX0 parameters: Service: name: service in: formData required: true description: Indicates the name of your Azure container registry. type: string x-ms-parameter-location: method AccountNameParameter: name: accountName in: path required: true description: The name of the Azure Video Indexer account. x-ms-parameter-location: method schema: type: string maxLength: 50 minLength: 3 pattern: ^[A-Za-z0-9-]+$ securitySchemes: registry_auth: type: http scheme: basic registry_oauth2: type: apiKey in: header name: Authorization 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 x-refined-from: - azure-container-registry-openapi-original.yml - vi-openapi-original.yml x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/components/parameters/Endpoint'