Adds one of more assets to a collection. A asset can belong to more than one collection at the same time. The asset_id parameter supports an array of asset id's. The response returns a result record (result_id, result) per asset_id given. Possible errors are "707 MM - the asset is already present in the collection" or "700 MM - asset_id=x1AjaVsefW8gVjZjsKmQRWsF9uM was not found in the database"
/collection/$coll_id/asset_relation [POST]
This call needs EGA authentication.
| Parameter (Type) | Description | Required | Default value | Max. length |
|---|---|---|---|---|
| asset_id[] (ALPHA_NUM) | The asset ID to add to the collection. Multiple assets may be given here with asset_id[]. | Required | - | |
| coll_id (ALPHA_NUM) | The collection ID. | Required | - | |
| user_id (ALPHA_NUM) | The user ID, must be owner of the collection. | Required | - | |
| mediamosa_version (MEDIAMOSA_VERSION) | Provide the version to get the REST call returned in the format of the specified MediaMosa version. Keep empty or skip to retrieve in current (latest) version. Provide '2' to retrieve the REST call in 2.x format. Or be more specific by providing up to 3 digits; '2.3.0'. This setting will override any setting used by client application or the default setting in MediaMosa. | Optional | - |
/collection/b1Tb9eoIgOeSLZ9cGO04rPej/asset_relation [POST] asset_id[]=X2OJSIuWKPUZUsdSNlsE8Tcx&asset_id[]=x1AjaVW8gVjZjsKmQRWsF9uM&user_id=foo
<items>
<item id="1">
<coll_id>b1Tb9eoIgOeSLZ9cGO04rPej</coll_id>
<asset_id>X2OJSIuWKPUZUsdSNlsE8Tcx</asset_id>
<result>success</result>
<result_id>601</result_id>
<result_description></result_description>
</item>
<item id="2">
<coll_id>b1Tb9eoIgOeSLZ9cGO04rPej</coll_id>
<asset_id>x1AjaVW8gVjZjsKmQRWsF9uM</asset_id>
<result>success</result>
<result_id>601</result_id>
<result_description></result_description>
</item>
</items>