Actions9
Update Multiple Asset Attributes
AI-generatedSummary
Update multiple attributes of a specific asset in MediaCockpit DAM by providing an array of attribute update objects, each specifying the attribute key and optional value, action, and enumeration creation flag.
Inputs
- Asset ID (required) — The ID of the asset to update multiple attributes for.
- Multi-Attribute Data (required) — A JSON array of attribute update objects. Each object must include 'attribute' (the attribute key) and can optionally include 'value' (the new value), 'action' (one of 'update', 'append', 'remove'), and 'create' (a boolean indicating if an enumeration should be created). Leaving this empty or as an empty array skips the update operation.
Output shape
a list of input items augmented with a JSON property 'updateMultipleResult' containing the response from the MediaCockpit API or a skip reason.
If no attributes are provided, the update operation is skipped and 'updateMultipleResult' contains an object indicating the skip with a reason. Validation errors occur if 'multiAttributeData' is not valid JSON or if any attribute object lacks the required 'attribute' field.
Examples
Example 1: Update the attributes 'color' and 'size' for an asset with ID '12345', setting new values and specifying update actions.
assetId = '12345', multiAttributeData = [{"attribute": "color", "value": "blue", "action": "update"}, {"attribute": "size", "value": "large", "action": "update"}]
Example 2: Skip the operation by providing empty multiAttributeData.
assetId = '12345', multiAttributeData = []