Skip to main content

UpdateClip

Updates existing Clip 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 FindClip.

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

Examples

Find the clips with the "name" property equal to "The Lodge", and update the label and the time fraction range:


[{
"UpdateClip": {
"constraints": {
"name": ["==", "The Lodge"]
},
"label": "Building",
"time_fraction_range": {
"start": 0.5,
"stop": 0.6
}
}
}]

Successful response:


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

Find the clips connected to the video with "name" = "The Shining", and update "year" property to 1980


[{
"FindVideo": {
"_ref": 1,
"constraints": {
"name": ["==", "The Shining"]
}
}
}, {
"FindClip": {
"video_ref": 1,
"_ref": 2
}
}, {
"UpdateClip": {
"ref": 2,
"properties": {
"year": 1980
}
}
}]

Successful response:


[{
"FindVideo": {
"returned": 0,
"status": 0
}
}, {
"FindClip": {
"returned": 0,
"status": 0
}
}, {
"UpdateClip": {
"count": 4,
"status": 0
}
}]