Overview
Update the custom attributes of an asset.
HTTP method |
PATCH |
|
---|---|---|
URI template variables |
lockId |
Only for MediaCentral Newsroom Management ID of the edit lock. |
Query parameters |
- |
|
Request body |
- |
The content body contains an aa:attributes resource. Attributes that are given in the request are updated. Attributes that are not given, are not touched. The only required properties per attribute are "name" and "value". In case of multi-value attributes, the rows given in the request fully replace the currently existing rows. You can’t modify, delete or insert individual rows with this link rel. Detailed information about the handling in the different systems can be found below. |
HTTP response |
204 No Content |
|
400 Bad Request |
The format of a value is unexpected. |
|
404 Not Found |
The asset doesn’t exist or the service or an intermediate resource is not available. |
|
Response body |
- |
|
Available in |
Description
Update the custom attributes of an asset.
The body is expected in the same format that is return when getting the attributes of an asset (see aa:attributes relation). Custom attributes that are given in the request are updated.
Information for specific systems
MediaCentral Asset Management
In case of multi-value attributes, the rows given in the request fully replace the currently existing rows. You can’t modify, delete or insert individual rows with this link rel.
In MC|AM, it is not possible to update a multi-value attribute to contain only a single, empty row with this link rel. MC|AM interprets that as a command to delete all existing rows of that attribute. To create a single, empty row, use aa:multi-value-attribute-by-attributeid or aa:multi-value-attribute-range-by-attributeid, followed by aa:update-multi-value-attribute with a request body like this:
[
{ "op": "remove", "path": "/rows" },
{ "op": "add", "path": "/rows/-"}
]
MediaCentral Production Management
The body is expected in the same format that is returned when getting the information about an aa:attributes resource. Only modifiable (i.e. those not having the system model’s readOnly flag) custom attributes that are given in the payload are updated. - All custom attributes specified in the request must be modifiable for the request to succeed. Passing timecode in SMPTE notation, it’ll just be written as string. Passing timecode as integral value, it is assumed to represent a frame count. In this case, the property "editRate" must be specified as well, i.e. the payload must have the property "editRate" with a valid value. Also the property "dropFrame" is considered, when dealing with a frame count. If "dropFrame" is not specified, it defaults to false.
Note:: Updating an asset may not update the common attributes – modifier, modified or the attribute Changed By
MediaCentral Newsroom Management:
Client needs to lock asset form to be able to update attributes. The URI has additional query parameter lockId - asset lock id. After update the lock is automatically removed. See Link Relation - ia:lock-asset-by-id for details.