Images - Update Metadata
This API accepts a batch of image Ids, and metadata, to update images. There is a limit of 64 images.
POST {Endpoint}/customvision/v3.3/training/projects/{projectId}/images/metadata?imageIds={imageIds}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
Endpoint
|
path | True |
string |
Supported Cognitive Services endpoints. |
project
|
path | True |
string uuid |
The project id. |
image
|
query | True |
string[] |
The list of image ids to update. Limited to 64. |
Request Header
Media Types: "application/json", "application/xml", "text/xml", "application/x-www-form-urlencoded"
Name | Required | Type | Description |
---|---|---|---|
Training-Key | True |
string |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK Media Types: "application/json", "application/xml", "text/xml" |
|
Other Status Codes |
207 Media Types: "application/json", "application/xml", "text/xml" |
|
Other Status Codes |
Error response Media Types: "application/json", "application/xml", "text/xml" |
Security
Training-Key
Type:
apiKey
In:
header
Examples
Successful UpdateImageMetadata request
Sample request
POST https://westus.api.cognitive.microsoft.com/customvision/v3.3/training/projects/bc3f7dad-5544-468c-8573-3ef04d55463e/images/metadata?imageIds=4d6eb844-42ee-42bc-bd6f-c32455ef07c9
{
"tag": "value"
}
Sample response
{
"isBatchSuccessful": true,
"images": [
{
"imageId": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"status": "OK",
"metadata": {
"tag": "value"
}
}
]
}
{
"isBatchSuccessful": false,
"images": [
{
"imageId": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"status": "ErrorLimitExceed"
}
]
}
Definitions
Name | Description |
---|---|
Custom |
|
Custom |
The error code. |
Image |
Entry associating a metadata to an image. |
Image |
Status of the metadata update. |
Image |
CustomVisionError
Name | Type | Description |
---|---|---|
code |
The error code. |
|
message |
string |
A message explaining the error reported by the service. |
CustomVisionErrorCodes
The error code.
Value | Description |
---|---|
BadRequest | |
BadRequestCannotMigrateProjectWithName | |
BadRequestClassificationTrainingValidationFailed | |
BadRequestCustomerManagedKeyRevoked | |
BadRequestDetectionTrainingNotAllowNegativeTag | |
BadRequestDetectionTrainingValidationFailed | |
BadRequestDomainNotSupportedForAdvancedTraining | |
BadRequestExceedIterationPerProjectLimit | |
BadRequestExceedProjectLimit | |
BadRequestExceedTagPerImageLimit | |
BadRequestExceedTagPerProjectLimit | |
BadRequestExceededBatchSize | |
BadRequestExceededQuota | |
BadRequestExportAlreadyInProgress | |
BadRequestExportPlatformNotSupportedForAdvancedTraining | |
BadRequestExportValidationFailed | |
BadRequestExportWhileTraining | |
BadRequestImageBatch | |
BadRequestImageDimensions | |
BadRequestImageExceededCount | |
BadRequestImageFormat | |
BadRequestImageMetadataKey | |
BadRequestImageMetadataValue | |
BadRequestImageRegions | |
BadRequestImageSizeBytes | |
BadRequestImageStream | |
BadRequestImageTags | |
BadRequestImageUrl | |
BadRequestInvalid | |
BadRequestInvalidArtifactUri | |
BadRequestInvalidEmailAddress | |
BadRequestInvalidIds | |
BadRequestInvalidImportToken | |
BadRequestInvalidPublishName | |
BadRequestInvalidPublishTarget | |
BadRequestIterationDescription | |
BadRequestIterationIsNotTrained | |
BadRequestIterationIsPublished | |
BadRequestIterationName | |
BadRequestIterationNameNotUnique | |
BadRequestIterationNotPublished | |
BadRequestIterationValidationFailed | |
BadRequestMultiClassClassificationTrainingValidationFailed | |
BadRequestMultiLabelClassificationTrainingValidationFailed | |
BadRequestMultipleGeneralProductTag | |
BadRequestMultipleNegativeTag | |
BadRequestNegativeAndRegularTagOnSameImage | |
BadRequestNotLimitedTrial | |
BadRequestNotSupported | |
BadRequestOperationNotSupported | |
BadRequestPredictionIdsExceededCount | |
BadRequestPredictionIdsMissing | |
BadRequestPredictionInvalidApplicationName | |
BadRequestPredictionInvalidQueryParameters | |
BadRequestPredictionResultsExceededCount | |
BadRequestPredictionTagsExceededCount | |
BadRequestProjectDescription | |
BadRequestProjectDuplicated | |
BadRequestProjectImagePreprocessingSettings | |
BadRequestProjectName | |
BadRequestProjectNameNotUnique | |
BadRequestProjectUnknownClassification | |
BadRequestProjectUnknownDomain | |
BadRequestProjectUnsupportedDomainTypeChange | |
BadRequestProjectUnsupportedExportPlatform | |
BadRequestRequiredParamIsNull | |
BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining | |
BadRequestSubscriptionApi | |
BadRequestTagDescription | |
BadRequestTagName | |
BadRequestTagNameNotUnique | |
BadRequestTagType | |
BadRequestTrainingAlreadyInProgress | |
BadRequestTrainingNotNeeded | |
BadRequestTrainingNotNeededButTrainingPipelineUpdated | |
BadRequestTrainingValidationFailed | |
BadRequestUnpublishFailed | |
BadRequestUnsupportedDomain | |
BadRequestWorkspaceCannotBeModified | |
BadRequestWorkspaceNotDeletable | |
Conflict | |
ConflictInvalid | |
ErrorExporterInvalidClassifier | |
ErrorExporterInvalidFeaturizer | |
ErrorExporterInvalidPlatform | |
ErrorFeaturizationAugmentationError | |
ErrorFeaturizationAugmentationUnavailable | |
ErrorFeaturizationInvalidFeaturizer | |
ErrorFeaturizationQueueTimeout | |
ErrorFeaturizationServiceUnavailable | |
ErrorFeaturizationUnrecognizedJob | |
ErrorInvalid | |
ErrorIterationCopyFailed | |
ErrorPrediction | |
ErrorPredictionModelNotCached | |
ErrorPredictionModelNotFound | |
ErrorPredictionServiceUnavailable | |
ErrorPredictionStorage | |
ErrorPreparePerformanceMigrationFailed | |
ErrorProjectExportRequestFailed | |
ErrorProjectImportRequestFailed | |
ErrorProjectInvalidDomain | |
ErrorProjectInvalidPipelineConfiguration | |
ErrorProjectInvalidWorkspace | |
ErrorProjectTrainingRequestFailed | |
ErrorRegionProposal | |
ErrorUnknown | |
ErrorUnknownBaseModel | |
Forbidden | |
ForbiddenDRModeEnabled | |
ForbiddenInvalid | |
ForbiddenUser | |
ForbiddenUserDisabled | |
ForbiddenUserDoesNotExist | |
ForbiddenUserInsufficientCapability | |
ForbiddenUserResource | |
ForbiddenUserSignupAllowanceExceeded | |
ForbiddenUserSignupDisabled | |
NoError | |
NotFound | |
NotFoundApimSubscription | |
NotFoundDomain | |
NotFoundImage | |
NotFoundInvalid | |
NotFoundIteration | |
NotFoundIterationPerformance | |
NotFoundProject | |
NotFoundProjectDefaultIteration | |
NotFoundTag | |
UnsupportedMediaType |
ImageMetadataUpdateEntry
Entry associating a metadata to an image.
Name | Type | Description |
---|---|---|
imageId |
string |
Id of the image. |
metadata |
object |
Metadata of the image. |
status |
Status of the metadata update. |
ImageMetadataUpdateStatus
Status of the metadata update.
Value | Description |
---|---|
ErrorImageNotFound | |
ErrorLimitExceed | |
ErrorUnknown | |
OK |
ImageMetadataUpdateSummary
Name | Type | Description |
---|---|---|
images |
Entry associating a metadata to an image. |
|
isBatchSuccessful |
boolean |