Datasets - Create Or Update Version
Create a new or update an existing DatasetVersion with the given version id
PATCH {endpoint}/datasets/{name}/versions/{version}?api-version=v1
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (uri) |
Project endpoint. In the form "https://your-ai-services-account-name.services.ai.azure.com/api/projects/_project" if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form "https://your-ai-services-account-name.services.ai.azure.com/api/projects/your-project-name" if you want to explicitly specify the Foundry Project name. |
|
name
|
path | True |
string |
The name of the resource |
|
version
|
path | True |
string |
The specific version id of the DatasetVersion to create or update. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
Media Types: "application/merge-patch+json"
The request body can be one of the following:
| Name | Description |
|---|---|
|
File |
FileDatasetVersion Definition |
|
Folder |
FileDatasetVersion Definition |
FileDatasetVersion
FileDatasetVersion Definition
| Name | Required | Type | Description |
|---|---|---|---|
| dataUri | True |
string minLength: 1pattern: [a-zA-Z0-9_] |
URI of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 |
| type | True |
string:
uri_file |
Dataset type |
| connectionName |
string |
The Azure Storage Account connection name. Required if startPendingUploadVersion was not called before creating the Dataset |
|
| description |
string |
The asset description text. |
|
| tags |
object |
Tag dictionary. Tags can be added, removed, and updated. |
FolderDatasetVersion
FileDatasetVersion Definition
| Name | Required | Type | Description |
|---|---|---|---|
| dataUri | True |
string minLength: 1pattern: [a-zA-Z0-9_] |
URI of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 |
| type | True |
string:
uri_folder |
Dataset type |
| connectionName |
string |
The Azure Storage Account connection name. Required if startPendingUploadVersion was not called before creating the Dataset |
|
| description |
string |
The asset description text. |
|
| tags |
object |
Tag dictionary. Tags can be added, removed, and updated. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK | DatasetVersion: |
The request has succeeded. |
| 201 Created | DatasetVersion: |
The request has succeeded and a new resource has been created as a result. |
| Other Status Codes |
An unexpected error response. Headers x-ms-error-code: string |
Security
OAuth2Auth
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
Scopes
| Name | Description |
|---|---|
| https://ai.azure.com/.default |
Examples
|
Datasets_Create |
|
Datasets_Create |
Datasets_CreateOrUpdateVersion_MaximumSet
Sample request
PATCH {endpoint}/datasets/nsvugzcnsvqodrxiojanhtdymgglnx/versions/utbfmfka?api-version=v1
{
"dataUri": "Replace this value with a string matching RegExp [a-zA-Z0-9_]",
"type": "DatasetVersion",
"description": "grthjigklkewz",
"tags": {
"key868": "yjmiiufnnccqfiljtndr"
}
}
Sample response
{
"dataUri": "Replace this value with a string matching RegExp [a-zA-Z0-9_]",
"type": "DatasetVersion",
"isReference": true,
"id": "cfgncrzpcpqbpxefd",
"name": "zoskzytcqmndtyqwugy",
"version": "joegai"
}
{
"dataUri": "Replace this value with a string matching RegExp [a-zA-Z0-9_]",
"type": "DatasetVersion",
"isReference": true,
"id": "cfgncrzpcpqbpxefd",
"name": "zoskzytcqmndtyqwugy",
"version": "joegai"
}
Datasets_CreateOrUpdateVersion_MinimumSet
Sample request
PATCH {endpoint}/datasets/pluvp/versions/playwidjgezovivciosnkerrdwe?api-version=v1
{
"dataUri": "Replace this value with a string matching RegExp [a-zA-Z0-9_]",
"type": "DatasetVersion"
}
Sample response
{
"dataUri": "Replace this value with a string matching RegExp [a-zA-Z0-9_]",
"type": "DatasetVersion",
"name": "zoskzytcqmndtyqwugy",
"version": "joegai"
}
{
"dataUri": "Replace this value with a string matching RegExp [a-zA-Z0-9_]",
"type": "DatasetVersion",
"name": "zoskzytcqmndtyqwugy",
"version": "joegai"
}
Definitions
| Name | Description |
|---|---|
|
Azure. |
The error object. |
|
Azure. |
A response containing error details. |
|
Azure. |
An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors. |
|
Dataset |
Enum to determine the type of data. |
|
File |
FileDatasetVersion Definition |
|
Folder |
FileDatasetVersion Definition |
Azure.Core.Foundations.Error
The error object.
| Name | Type | Description |
|---|---|---|
| code |
string |
One of a server-defined set of error codes. |
| details |
An array of details about specific errors that led to this reported error. |
|
| innererror |
An object containing more specific information than the current object about the error. |
|
| message |
string |
A human-readable representation of the error. |
| target |
string |
The target of the error. |
Azure.Core.Foundations.ErrorResponse
A response containing error details.
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
Azure.Core.Foundations.InnerError
An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.
| Name | Type | Description |
|---|---|---|
| code |
string |
One of a server-defined set of error codes. |
| innererror |
Inner error. |
DatasetType
Enum to determine the type of data.
| Value | Description |
|---|---|
| uri_file |
URI file. |
| uri_folder |
URI folder. |
FileDatasetVersion
FileDatasetVersion Definition
| Name | Type | Description |
|---|---|---|
| connectionName |
string |
The Azure Storage Account connection name. Required if startPendingUploadVersion was not called before creating the Dataset |
| dataUri |
string minLength: 1pattern: [a-zA-Z0-9_] |
URI of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 |
| description |
string |
The asset description text. |
| id |
string |
Asset ID, a unique identifier for the asset |
| isReference |
boolean |
Indicates if the dataset holds a reference to the storage, or the dataset manages storage itself. If true, the underlying data will not be deleted when the dataset version is deleted |
| name |
string |
The name of the resource |
| tags |
object |
Tag dictionary. Tags can be added, removed, and updated. |
| type |
string:
uri_file |
Dataset type |
| version |
string |
The version of the resource |
FolderDatasetVersion
FileDatasetVersion Definition
| Name | Type | Description |
|---|---|---|
| connectionName |
string |
The Azure Storage Account connection name. Required if startPendingUploadVersion was not called before creating the Dataset |
| dataUri |
string minLength: 1pattern: [a-zA-Z0-9_] |
URI of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 |
| description |
string |
The asset description text. |
| id |
string |
Asset ID, a unique identifier for the asset |
| isReference |
boolean |
Indicates if the dataset holds a reference to the storage, or the dataset manages storage itself. If true, the underlying data will not be deleted when the dataset version is deleted |
| name |
string |
The name of the resource |
| tags |
object |
Tag dictionary. Tags can be added, removed, and updated. |
| type |
string:
uri_folder |
Dataset type |
| version |
string |
The version of the resource |