Skip to content

Collages ​

Overview ​

Collages are the collection resource: DamCollection rows in dam_collections. They are flat (no nesting) and hold assets through dam_collection_assets. Adding an asset to a collage never changes its folder, and an asset can sit in many collages. Collages use soft deletes in the model, but the delete endpoint calls forceDelete().

Each admin-made collage is stored with workspace_id, the workspace's first DamInstance as instance_id, the creating user_id and is_backend_user = true. Admin list endpoints filter on that same workspace, first instance and is_backend_user = true.

The Admin API (/api/v1/digital-assets/collection/*) owns CRUD and membership. The Portal API (/dam/v1/digital/collection/*) lists collages that are public in the partner's portal and can create share links. Collages are Scout searchable (always indexed); their document carries assets_id, assets_count, preview_images and instance_visibility. Every admin collage endpoint calls DamInstance::checkUser(). Portal visibility of collages is covered in Permissions and Portal Visibility.

Endpoints ​

Admin API (/api/v1/digital-assets/collection) ​

MethodPathController@methodPurpose
GET/get-allDamCollectionController@getAllAll collages (id, name, description), sorted by name
GET/get-all-by-pageDamCollectionController@getAllCollectionByPage30 per page with group and permission names
GET/{collectionId}/assetsDamCollectionController@getCollectionAssetsCollage detail with its assets
GET/{collectionId}/asset-listDamCollectionController@getCollectionAssetListPaged assets (per_page 1 to 100, default 40)
GET/{collectionId}/select-all-asset-idsDamCollectionController@getCollectionSelectAllAssetIdsLive asset ids, capped
POST/createDamCollectionController@createCreate a collage
POST/update/{collectionId}DamCollectionController@updateRename or edit description
DELETE/delete/{collectionId}DamCollectionController@deleteDelete a collage
POST/{collectionId}/add-assetsDamCollectionController@addAssetsAdd assets
POST/{collectionId}/remove-assetsDamCollectionController@removeAssetsRemove assets
POST/generate-share-urlDamCollectionController@generateShareUrlShare link for the collage or a subset

Portal API (/dam/v1/digital/collection) ​

MethodPathController@methodPurpose
GET/get-allDamCollectionController@getAllCollages public in the portal
GET/get-top-collectionDamCollectionController@getTopCollectionHome page collages
GET/{collectionId}/assetsDamCollectionController@getCollectionAssetsPublic assets of a public collage
POST/generate-share-urlDamCollectionController@generateShareUrlPartner share link

Workflows ​

Create and edit a collage ​

create needs name. A new collage has no portal permission rows, so it is private in every portal until published through permission/change-permission. update/{collectionId} requires name, accepts description, and applies the same duplicate check. It sets modified_at = now() and, since f517b6b, returns name, description and modified_at with the message Collage updated successfully. A duplicate name in the same portal returns the warning Collage already exist.

Delete a collage ​

Delete is a hard delete, so a deleted collage cannot be restored. The assets themselves are untouched.

Add assets ​

assets_id must be an array. Validity only checks is_deleted and final_deleted, so archived assets can be added. Adding an asset does not change its portal visibility: a partner sees it in a public collage only if the asset itself is public in that portal.

Remove assets ​

Both membership endpoints bump the collage modified_at. Asset documents carry collection_ids, which is why membership changes reindex the assets.

Read a collage ​

Sort columns are display_file_name, file_size, file_type, created_at, updated_at, modified_at. select-all-asset-ids uses the same filter and caps at constant.MAX_BULK_OPERATION_LIMIT (default 5000). On the portal, get-all and {collectionId}/assets apply instanceVisible to both the collage (row with visibility = 0) and its assets.

Share a collage ​

An optional assets array shares only part of the collage. The portal version stores generated_source = 'user' and selects the collage and its assets with the legacy per-user scopes (userPermission, assetuserPermission), not with portal visibility, so it can include assets that are private in the partner's portal (Collection is not available. when the collage is excluded). How the link is opened, protected and expired is covered in Sharing.

Data ​

Model / tableUse
DamCollection / dam_collectionsCollages: workspace_id, instance_id, user_id, name, description, visibility, is_backend_user, modified_at, legacy permission / group_id
DamCollectionAssets / dam_collection_assetsMembership
DigitalAssets.collection_permissionCleared when an asset is added
DamInstancePermissionPer-portal collage rows (permissionable_type = DamCollection)
ShareAssetsCategory / share_assets_categoryCollage share links
DigitalAssetsDownloadshare events