Overview
Update the metadata of an asset.
HTTP method |
PATCH |
|
---|---|---|
URI template variables |
lockId |
Only for MediaCentral Newsroom Management ID of the edit lock. |
Query parameters |
unlock |
Only for MediaCentral Newsroom Management Put false to preserve asset lock, default value is true. |
qkey |
Only for MediaCentral Newsroom Management Password for key-locked queue. |
|
skey |
Only for MediaCentral Newsroom Management Password for key-locked asset. |
|
Request body |
|
|
HTTP response |
200 OK 204 No Content |
The asset was updated successfully. A service may choose to return HTTP status 200 OK or 204 No Content to indicate success. |
403 Forbidden |
Write access to the asset was denied. |
|
404 Not Found |
The asset doesn’t exist or the service or an intermediate resource is not available. |
|
Response body |
- |
If the service returns the HTTP status code 200 OK the response body contains the updated aa:asset resource. |
Available in |
Description
MediaCentral Asset Management
Example request body:
{
"base": {
"id": "aktest1_20170302122800",
"type": "asset.VIDEO",
"systemType": "interplay-mam",
"systemID": "a80eaff4-a086-47b1-8775-9e22d3b2f8cb"
},
"common": {
"name": "AKTest1"
}
}
You can embed an aa:attributes resource to update custom attributes. The same restrictions apply as in aa:update-attributes.
Example request body with an embedded aa:attributes resource to set custom attributes, including multi-value attributes:
{
"base": {
"id": "aktest1_20170302122800",
"type": "asset.VIDEO",
"systemType": "interplay-mam",
"systemID": "a80eaff4-a086-47b1-8775-9e22d3b2f8cb"
},
"common": {
"name": "8AudioChannels 3"
},
"_embedded": {
"aa:attributes": {
"attributes": [
{
"name": "REGISTRATION_DATETIME",
"value": "2017-02-10 23:10:12"
},
{
"name": "CONTRIBUTIONS",
"type": "multi-value compound",
"value": [
{
"index": 0,
"attributes": [
{
"name": "ROLE",
"value": "288"
},
{
"name": "REAL_NAME",
"value": "John Doe"
}
]
},
{
"index": 1,
"attributes": [
{
"name": "ROLE",
"value": "221"
},
{
"name": "REAL_NAME",
"value": "John Smith"
}
]
}
]
},
{
"name": "KEYWORDS",
"type": "multi-value string",
"value": [
{
"index": 0,
"value": "Germany"
},
{
"index": 1,
"value": "Berlin"
},
{
"index": 2,
"value": null
},
{
"value": "Politics"
}
]
}
]
}
}
}
MediaCentral Production Management
The body is expected in the same format that is returned when getting the information about an asset.
-
Writable status properties that are given are updated (see Status).
-
Common attributes –name and description can be updated, the other common attributes cannot be updated. The common attributes name and description take preference over their respective attributes NXN_Display_Name and Comments.
-
Custom attributes to be updated must be contained as embedded aa:attributes resource of the asset. Only modifiable (i.e. those not having the system model’s readOnly flag) custom attributes that are given in the embedded aa:attributes 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. embedded aa:attributes must have the property editRate with a valid value. Also aa:attributes' property dropFrame is considered, when dealing with a frame count. If dropFrame is not specified, it defaults to false.
-
-
Updating attributes of an asset
-
Updating an asset may not update the common attributes – modifier, modified or the embedded attribute Changed By.
-
Modifications on readonly common attributes like modifier, modified, creator, etc. are ignored, resulting in a 200 OK status code.
-
Modifications on readonly embedded attributes result in a 400 Bad Request error response.
-
MediaCentral Newsroom Management
The body is expected in NSML format. Content-Type must be set to application/vnd.com.avid.inews.nsml+xml. To update story NSML you need to lock corresponding story section, see ia:lock-asset for details.
Example request body:
<nsml version="4.1">
<head>
<meta words="4" rate="180" wordlength="6" version="2"/>
<formname>DEFAULT-FORM</formname>
<storyid>0ba0af50:0000a8b9:56bc92a9</storyid>
</head>
<fields>
<string id="title">Weather forecast</string>
<date id="create-date">1453717480</date>
<date id="modify-date">1455198889</date>
<string id="modify-by">avstar</string>
</fields>
<body>
<p>The weather is fine.</p>
</body>
</nsml>
Draft sequence
For MediaCentral Asset Management and MediaCentral Production Management: This request body can be used to set the
draft-sequence-exists status to true
Example request body:
{
"status": {
"draft-sequence-exists": true
}
}