Skip to main content

UpdateDescriptor

Updates existing descriptor set objects that satisfy the specified constraints.

Parameters

Details

If the ref parameter is used, constraints will be ignored.

If the ref parameter is specified, it must refers to the search results of a previous FindDescriptorSet.

If the label parameter is present, the descriptor's labels will be updated.

For more complex searches for objects to update, a Find command must be used first within the transaction.

Examples

Find the descriptor set with the "source" property equal to "open_face", and remove the "year_created" property, and rename it:


[{
"UpdateDescriptor": {
"constraints": {
"source": ["==", "open_face"]
},
"remove_props": ["year_created"]
}
}]

Successful response:


[{
"UpdateDescriptor": {
"count": 1,
"status": 0
}
}]

Update the name of the descriptor set that is connected to an entity of the class "Dataset" with a property "name" equal to "Youtube":


[{
"FindEntity": {
"with_class": "Dataset",
"_ref": 1,
"constraints": {
"name": ["==", "Youtube"]
}
}
}, {
"FindDescriptor": {
"_ref": 2,
"is_connected_to": {
"ref": 1,
"connection_class": "in_dataset"
}
}
}, {
"UpdateDescriptor": {
"ref": 2,
"properties": {
"name": "Youtube8M"
}
}
}]

Successful response:


[{
"FindEntity": {
"returned": 0,
"status": 0
}
}, {
"FindDescriptor": {
"returned": 0,
"status": 0
}
}, {
"UpdateDescriptor": {
"count": 1,
"status": 0
}
}]