To update an existing asset, you first need to identify the asset you want to update. There are two ways to identify an existing asset:
By asset ID (the preferred and more reliable option)
This example uses the YouTube-assigned asset ID to uniquely identify the asset. The XML snippet below would update the title of the asset without affecting its other metadata:
By custom ID and asset type
<asset path="/external/asset[@custom_id='id-012'][@type='sound_recording']" type="sound_recording"> <title>New sound recording title</title> </asset>
Note that the <asset> tag's type attribute is required, so the asset type must be specified twice – once in the XPath and again in the type attribute value.
You should identify existing assets using their asset IDs whenever possible. YouTube’s feed handler may update the correct asset if you specify the same values for tags that uniquely identify the asset (such as an ISRC, a TMS ID, an ISWC, or a custom ID), but you may wind up creating a second asset instead of updating the original asset. The duplicate asset might eventually be merged with the original, but this might not happen automatically or in a timely matter.
In addition, even if the feed handler does update the proper asset, the update will still not be processed like a typical metadata update:
If you do not specify an asset ID, then all of the asset's metadata will be replaced, even if fields are not specified. As such, the only way to submit an incremental data update is to use the id attribute to identify the asset being updated.
If you update an asset without having provided an asset ID, the status report will identify the Process asset action as an INSERT even though the actions carried out constituted an update.
You only need to provide values for the metadata fields you are updating. The new values overwrite the previous values, even for fields like <keyword> that accept repeating values. You cannot incrementally update a repeating tag value by only adding the new values in your feed. The exception to this rule is the <asset_label> tag, which does append new values.
If you leave a field out, it will not be updated, and fields that have default values will not be reset to their defaults if you omit them. Or, if you prefer, you can provide all of the metadata for the asset in the update request, specifying the already existing values for fields that have not changed.
You can delete the values stored for an optional tag by setting the tag value to an empty string. For example, the XML feed below updates the title of a movie asset and deletes its list of actors.
<asset type="movie" id="ASSET_ID_1_"> <title>This title may not seem new, but it is</title> <actor/> </asset>
For episode and movie assets
Many <asset> subtags (such as <actor>, <director>, and <rating>) actually set values on the associated video object. You'll want to update the video metadata, not the asset metadata. (You update the asset metadata to make changes that affect rights management rather than providing video information.) See Update video metadata for more information.