Appearance
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) ​
| Method | Path | Controller@method | Purpose |
|---|---|---|---|
| GET | /get-all | DamCollectionController@getAll | All collages (id, name, description), sorted by name |
| GET | /get-all-by-page | DamCollectionController@getAllCollectionByPage | 30 per page with group and permission names |
| GET | /{collectionId}/assets | DamCollectionController@getCollectionAssets | Collage detail with its assets |
| GET | /{collectionId}/asset-list | DamCollectionController@getCollectionAssetList | Paged assets (per_page 1 to 100, default 40) |
| GET | /{collectionId}/select-all-asset-ids | DamCollectionController@getCollectionSelectAllAssetIds | Live asset ids, capped |
| POST | /create | DamCollectionController@create | Create a collage |
| POST | /update/{collectionId} | DamCollectionController@update | Rename or edit description |
| DELETE | /delete/{collectionId} | DamCollectionController@delete | Delete a collage |
| POST | /{collectionId}/add-assets | DamCollectionController@addAssets | Add assets |
| POST | /{collectionId}/remove-assets | DamCollectionController@removeAssets | Remove assets |
| POST | /generate-share-url | DamCollectionController@generateShareUrl | Share link for the collage or a subset |
Portal API (/dam/v1/digital/collection) ​
| Method | Path | Controller@method | Purpose |
|---|---|---|---|
| GET | /get-all | DamCollectionController@getAll | Collages public in the portal |
| GET | /get-top-collection | DamCollectionController@getTopCollection | Home page collages |
| GET | /{collectionId}/assets | DamCollectionController@getCollectionAssets | Public assets of a public collage |
| POST | /generate-share-url | DamCollectionController@generateShareUrl | Partner 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 / table | Use |
|---|---|
DamCollection / dam_collections | Collages: workspace_id, instance_id, user_id, name, description, visibility, is_backend_user, modified_at, legacy permission / group_id |
DamCollectionAssets / dam_collection_assets | Membership |
DigitalAssets.collection_permission | Cleared when an asset is added |
DamInstancePermission | Per-portal collage rows (permissionable_type = DamCollection) |
ShareAssetsCategory / share_assets_category | Collage share links |
DigitalAssetsDownload | share events |