Registry Code Versions - Create Or Get Start Pending Upload
Generate a storage location and credential for the client to upload a code asset to.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}/startPendingUpload?api-version=2025-09-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
code
|
path | True |
string pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$ |
Pending upload name. This is case-sensitive. |
|
registry
|
path | True |
string pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_]{2,32}$ |
Name of Azure Machine Learning registry. This is case-insensitive |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
subscription
|
path | True |
string minLength: 1 |
The ID of the target subscription. |
|
version
|
path | True |
string |
Version identifier. This is case-sensitive. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Type | Description |
|---|---|---|
| pendingUploadId |
string |
If PendingUploadId = null then random guid will be used. |
| pendingUploadType |
TemporaryBlobReference is the only supported type |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Success |
|
| Other Status Codes |
Error |
Examples
CreateOrGetStartPendingUpload Registry Code Version.
Sample request
POST https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.MachineLearningServices/registries/registryName/codes/string/versions/string/startPendingUpload?api-version=2025-09-01
{
"pendingUploadId": "string",
"pendingUploadType": "TemporaryBlobReference"
}
Sample response
{
"blobReferenceForConsumption": {
"blobUri": "https://www.contoso.com/example",
"storageAccountArmId": "string",
"credential": {
"credentialType": "SAS",
"sasUri": "https://www.contoso.com/example"
}
},
"pendingUploadId": "string",
"pendingUploadType": "None"
}
Definitions
| Name | Description |
|---|---|
|
Blob |
|
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Pending |
Enum to determine the PendingUpload credentials type. |
|
Pending |
|
|
Pending |
|
|
Pending |
Type of storage to use for the pending upload location |
|
SASCredential |
BlobReferenceForConsumptionDto
| Name | Type | Description |
|---|---|---|
| blobUri |
string (uri) |
Blob URI path for client to upload data. Example: https://blob.windows.core.net/Container/Path |
| credential | PendingUploadCredentialDto: |
Credential info to access storage account |
| storageAccountArmId |
string |
Arm ID of the storage account to use |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
PendingUploadCredentialType
Enum to determine the PendingUpload credentials type.
| Value | Description |
|---|---|
| SAS |
PendingUploadRequestDto
| Name | Type | Default value | Description |
|---|---|---|---|
| pendingUploadId |
string |
If PendingUploadId = null then random guid will be used. |
|
| pendingUploadType | TemporaryBlobReference |
TemporaryBlobReference is the only supported type |
PendingUploadResponseDto
| Name | Type | Default value | Description |
|---|---|---|---|
| blobReferenceForConsumption |
Container level read, write, list SAS |
||
| pendingUploadId |
string |
ID for this upload request |
|
| pendingUploadType | TemporaryBlobReference |
TemporaryBlobReference is the only supported type |
PendingUploadType
Type of storage to use for the pending upload location
| Value | Description |
|---|---|
| None | |
| TemporaryBlobReference |
SASCredentialDto
| Name | Type | Description |
|---|---|---|
| credentialType |
string:
SAS |
[Required] Credential type used to authentication with storage. |
| sasUri |
string (uri) |
Full SAS Uri, including the storage, container/blob path and SAS token |