swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector AccessToken API schemes: - https tags: - name: AccessToken paths: /oauth2/token: post: tags: - AccessToken description: Exchange ACR Refresh token for an ACR Access Token operationId: microsoftAzureGetacraccesstoken consumes: - application/x-www-form-urlencoded parameters: - name: grant_type in: formData description: Grant type is expected to be refresh_token required: true type: string enum: - refresh_token - $ref: '#/parameters/Service' - name: scope in: formData required: true 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. type: string - name: refresh_token in: formData required: true description: Must be a valid ACR refresh token type: string responses: '200': description: Access token acquired schema: $ref: '#/definitions/AccessToken' default: description: ACR error response describing why the operation failed. schema: $ref: '#/definitions/AcrErrors' security: [] x-ms-examples: Get Access Token with Refresh Token: $ref: ./examples/PostAccessToken.json summary: Microsoft Azure Post Oauth2 Token get: tags: - AccessToken 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. 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. type: string responses: '200': description: Access token acquired schema: $ref: '#/definitions/AccessToken' default: description: ACR error response describing why the operation failed. schema: $ref: '#/definitions/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: - AccessToken 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: '#/parameters/AccountNameParameter' - $ref: ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter - in: body name: parameters x-ms-client-flatten: true description: The parameters for generating access token schema: $ref: '#/definitions/GenerateAccessTokenParameters' responses: '200': description: The Azure Video Indexer account's access token properties were retrieved successfully. schema: $ref: '#/definitions/AccessToken_2' '400': description: Bad Request. x-ms-error-response: true schema: $ref: '#/definitions/ErrorResponse' '404': description: Not Found x-ms-error-response: true schema: $ref: '#/definitions/ErrorResponse' '409': description: Conflict x-ms-error-response: true schema: $ref: '#/definitions/ErrorResponse' '500': description: Internal Server Error x-ms-error-response: true schema: $ref: '#/definitions/ErrorResponse' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/ErrorResponse' summary: Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Videoindexer Accounts Accountname Generateaccesstoken definitions: 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: '#/definitions/ErrorDefinition' readOnly: true ErrorResponse: description: Error response. type: object properties: error: $ref: '#/definitions/ErrorDefinition' description: The error details. 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 AccessToken: type: object properties: access_token: description: The access token for performing authenticated requests type: string AcrErrors: description: Acr error response describing why the operation failed properties: errors: type: array description: Array of detailed error items: $ref: '#/definitions/AcrErrorInfo' AcrErrorInfo: description: Error information properties: code: description: Error code type: string message: type: string description: Error message detail: type: object description: Error details parameters: AccountNameParameter: name: accountName in: path required: true type: string description: The name of the Azure Video Indexer account. pattern: ^[A-Za-z0-9-]+$ maxLength: 50 minLength: 3 x-ms-parameter-location: method Service: name: service in: formData required: true description: Indicates the name of your Azure container registry. type: string x-ms-parameter-location: method x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'