Link relation aa:update-asset-by-id

Overview

Update the Metadata of the asset with the given ID.

HTTP method

PATCH

URL template parameters

id

The ID of the asset to update.

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

An aa:asset resource.

  • Common attributes that are given in the request are updated.

  • Common attributes that are not given, are not touched.

  • Writable status properties that are given are updated (see Status).

You can embed an aa:attributes resource to update custom attributes:

  • Custom attributes that are given in the request are updated.

  • Custom attributes that are not given, are not touched.

HTTP response

204 No Content

The asset was updated successfully.

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

An aa:asset resource with the information about the asset.

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": "New York City"
  }
}
 

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 cannot be updated.

  • 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.

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-by-id 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
  }
}
 

MediaCentral Editorial Management

Only the common attribute name and the custom attribute Comments can be updated. The body is expected in the same format that is return when getting the information about an asset.