Datasets - Update

Update the properties of an existing dataset.

Status codes returned:

  • 200: Operation completed successfully.
  • 400: The request was malformed.
  • 404: A dataset with the specified name was not found.
  • 412: An If-Match header was provided, but the given ETag did not match the current ETag value.
PATCH /datasets/{name}?api-version=2023-04-01-preview

URI Parameters

Name In Required Type Description
name
path True

string

The name of the dataset to update.

Regex pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]*$

api-version
query True

string

Requested API version.

Request Header

Media Types: "application/json-patch+json"

Name Required Type Description
If-Match

string

Optional ETag for the dataset to update.
If an ETag is provided, then the dataset will be updated only if its current ETag value matches the given ETag. If the ETag values don't match, then the update operation will fail with status code 412 (Precondition Failed). This indicates that the dataset has been updated since the last time information for the dataset was obtained.
If an ETag is not provided or its value is '*', then the dataset will always be updated regardless of the current ETag value.

Request Body

Media Types: "application/json-patch+json"

Name Type Description
annotationFileUris

string[]

List of absolute URIs to annotation files, each of which must be stored as a blob in an Azure Storage blob container. Each file must follow the COCO format for the specified AnnotationKind, with each image path being an absolute URI to a blob in a blob container. The Computer Vision resource must have permission to read the annotation files and all referenced image files. This can be done by turning on System managed identities for the Computer Vision resource, then assigning the identity to a role that has permission to read from the blob container containing the annotation and image files.

annotationKind

AnnotationKind

The kind of annotations contained in the annotation files. For example, "ImageClassification" to specify that the annotation file contain object labels for training or testing a multiclass image classification model.

authentication

StorageAuthenticationSettingsApiModel

Describes the storage authentication settings.

createdDateTime

string

Read only. The date and time when the dataset was first registered, in UTC.

customProperties

object

Dictionary of arbitrary key-value pairs for use by the application. A maximum of 10 key-value pairs are allowed.

eTag

string

Read only. The latest ETag for the dataset. May be used with the 'If-Match' header when updating or deleting a dataset.

name

string

Read only. The name that is used to uniquely identify the dataset.

updatedDateTime

string

Read only. The date and time when the dataset was last updated, in UTC.

Responses

Name Type Description
200 OK

Dataset

Success

Other Status Codes

ErrorResponse

Error

Headers

x-ms-error-code: string

Examples

Datasets_Update

Sample request

PATCH /datasets/my_dataset_name?api-version=2023-04-01-preview

{
  "annotationKind": "imageClassification",
  "annotationFileUris": [
    "https://microsoft.com/a"
  ]
}

Sample response

{
  "annotationKind": "imageClassification",
  "annotationFileUris": [
    "https://microsoft.com/a"
  ],
  "name": "my_dataset_name",
  "createdDateTime": "2023-01-13T20:46:20.189Z",
  "updatedDateTime": "2023-01-13T20:46:20.189Z",
  "eTag": "kzktjgnqkjagdlkualdzikaseg"
}

Definitions

Name Description
AnnotationKind

The kind of annotations contained in the annotation files. For example, "ImageClassification" to specify that the annotation file contain object labels for training or testing a multiclass image classification model.

Dataset

Describes a dataset, which represents a set of images and annotations that can be used for training or testing a model.

ErrorResponse

Response returned when an error occurs.

ErrorResponseDetails

Error info.

ErrorResponseInnerError

Detailed error.

StorageAuthenticationKind

The storage authentication kind.

StorageAuthenticationSettingsApiModel

Describes the storage authentication settings.

AnnotationKind

The kind of annotations contained in the annotation files. For example, "ImageClassification" to specify that the annotation file contain object labels for training or testing a multiclass image classification model.

Name Type Description
imageClassification

string

imageObjectDetection

string

Dataset

Describes a dataset, which represents a set of images and annotations that can be used for training or testing a model.

Name Type Description
annotationFileUris

string[]

List of absolute URIs to annotation files, each of which must be stored as a blob in an Azure Storage blob container. Each file must follow the COCO format for the specified AnnotationKind, with each image path being an absolute URI to a blob in a blob container. The Computer Vision resource must have permission to read the annotation files and all referenced image files. This can be done by turning on System managed identities for the Computer Vision resource, then assigning the identity to a role that has permission to read from the blob container containing the annotation and image files.

annotationKind

AnnotationKind

The kind of annotations contained in the annotation files. For example, "ImageClassification" to specify that the annotation file contain object labels for training or testing a multiclass image classification model.

authentication

StorageAuthenticationSettingsApiModel

Describes the storage authentication settings.

createdDateTime

string

Read only. The date and time when the dataset was first registered, in UTC.

customProperties

object

Dictionary of arbitrary key-value pairs for use by the application. A maximum of 10 key-value pairs are allowed.

eTag

string

Read only. The latest ETag for the dataset. May be used with the 'If-Match' header when updating or deleting a dataset.

name

string

Read only. The name that is used to uniquely identify the dataset.

updatedDateTime

string

Read only. The date and time when the dataset was last updated, in UTC.

ErrorResponse

Response returned when an error occurs.

Name Type Description
error

ErrorResponseDetails

Error info.

ErrorResponseDetails

Error info.

Name Type Description
code

string

Error code.

details

ErrorResponseDetails[]

List of detailed errors.

innererror

ErrorResponseInnerError

Detailed error.

message

string

Error message.

target

string

Target of the error.

ErrorResponseInnerError

Detailed error.

Name Type Description
code

string

Error code.

innererror

ErrorResponseInnerError

Detailed error.

message

string

Error message.

StorageAuthenticationKind

The storage authentication kind.

Name Type Description
managedIdentity

string

none

string

sas

string

StorageAuthenticationSettingsApiModel

Describes the storage authentication settings.

Name Type Description
kind

StorageAuthenticationKind

The storage authentication kind.

sasToken

string

Optional. The sas token to access container. Only needed when Kind = Sas.