Storage - Sas Uri

Gets a URL with SAS token for a container/blob in the storage account associated with the workspace. The SAS URL can be used to upload job input and/or download job output.

POST https://{azureRegion}.quantum.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/storage/sasUri?api-version=2022-09-12-preview

URI Parameters

Name In Required Type Description
azureRegion
path True

string

Supported Azure regions for Azure Quantum Services. For example, "eastus"

resourceGroupName
path True

string

Name of an Azure resource group.

subscriptionId
path True

string

The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)

workspaceName
path True

string

Name of the workspace.

api-version
query True

string

The client API version.

Request Body

Name Required Type Description
containerName True

string

The container name.

blobName

string

The blob name.

Responses

Name Type Description
200 OK

SasUriResponse

OK

Other Status Codes

RestError

Error response describing why the operation failed.

Security

AzureAuth

Azure Active Directory OAuth2 Authentication

Type: oauth2
Flow: application
Token URL: https://login.microsoftonline.com/common/oauth2/v2.0/token

Scopes

Name Description
https://quantum.microsoft.com/.default client credential scope

Examples

Get a SAS token to upload data for a Quantum Workspace

Sample Request

POST https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/quantumResourcegroup/providers/Microsoft.Quantum/workspaces/quantumworkspace1/storage/sasUri?api-version=2022-09-12-preview

{
  "containerName": "some_container",
  "blobName": "input_blob"
}

Sample Response

{
  "sasUri": "https://storage.blob.core.windows.net/some_container/input_blob?sv=2019-02-02&sr=b&sig=cdO24OOoXterLJVM8T6QpSaog3ST4PjQsDj3mLflfJA%3D&se=2020-10-17T10%3A03%3A01Z&sp=rcw"
}

Definitions

Name Description
BlobDetails

Blob details.

ErrorData

An error response from Azure.

RestError

Error information returned by the API

SasUriResponse

Get SAS URL operation response.

BlobDetails

Blob details.

Name Type Description
blobName

string

The blob name.

containerName

string

The container name.

ErrorData

An error response from Azure.

Name Type Description
code

string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

message

string

A message describing the error, intended to be suitable for displaying in a user interface.

RestError

Error information returned by the API

Name Type Description
error

ErrorData

An error response from Azure.

SasUriResponse

Get SAS URL operation response.

Name Type Description
sasUri

string

A URL with a SAS token to upload a blob for execution in the given workspace.