Appearance
Folders ​
Overview ​
Folders are the category resource: DigitalAssetsCategory rows in digital_assets_categories. They nest through parent_id, and each row caches its ancestor chain in category_path (comma separated ids, root first). An asset has one folder (digital_assets.category_id) or none; an asset without a folder is an uncategorised recent upload and is not searchable. Folders use soft deletes, so the trash is the set of soft-deleted folders plus assets flagged is_deleted.
The Admin API (/api/v1/digital-assets/category/*) owns create, rename, browse, trash, restore and permanent delete. Moving folders goes through the asset move endpoint. The Portal API (/dam/v1/digital/...) reads only folders that are public or protected in the partner's portal. The External API reads folders through get-category and get-category-with-file, filtered by an ACL role. Folders are Scout searchable while visible_in_trashed = 0 and not final deleted; see Search.
Most admin folder endpoints call DamInstance::checkUser() (DAM module active, role Admin, Manager or Viewer). The exceptions are listed under each workflow. Per-portal visibility of folders is covered in Permissions and Portal Visibility.
Endpoints ​
Admin API (/api/v1/digital-assets) ​
| Method | Path | Controller@method | checkUser | Purpose |
|---|---|---|---|---|
| POST | /category/add | CategoryController@addCategory | yes | Create a root folder |
| POST | /category/add-sub-category | CategoryController@addSubCategory | yes | Create a sub folder |
| POST | /category/rename/{categoryId} | CategoryController@renameCategory | no | Rename and set description |
| GET | /category/all-category-list | CategoryController@getAllCategory | yes | Root folders with child flags and permission names |
| GET | /category/sub-category-list | CategoryController@getSubCategoryList | yes | Direct children of category_id, by name |
| POST | /category/view | CategoryController@viewCategory | yes | Folder detail with children and asset counts |
| POST | /category/get-count/{categoryId} | CategoryController@getCategoryAssetCount | no | Live asset count of the folder and its whole subtree |
| GET | /category/view-files-with-category | CategoryController@getCategoryAndFiles | no | One page of sub folders plus assets |
| GET | /category/view-files-with-category/select-all | CategoryController@getCategoryAndFilesSelectAllIds | no | All ids for select-all, capped |
| GET | /category/view-files-with-category-tags | CategoryController@getCategoryAndFilesOld | Older browse endpoint | |
| POST | /multiple-file-folder-move | AssetController@moveMultipleFileOrFolderToFolder | yes | Move folders and assets |
| POST | /category/delete-category-with-files | CategoryController@deleteCategoryAndFiles | yes | Move to trash |
| GET | /category/get-deleted-category-with-files | CategoryController@getDeleteCategoryAndFiles | yes | List trash |
| POST | /category/restore-deleted-category-with-files | CategoryController@restoreDeleteCategoryAndFiles | yes | Restore selected items |
| GET | /category/all-restore-deleted-category-with-files | CategoryController@allRestoreDeleteCategoryAndFiles | yes | Restore everything |
| POST | /category/permanent-delete-category-with-files | CategoryController@permanentDeleteCategoryAndFiles | yes | Delete for good |
Portal API (/dam/v1/digital) ​
| Method | Path | Controller@method | Purpose |
|---|---|---|---|
| GET | /category-list | CategoryController@getCategory | Root folders visible in the portal, with child folders and counts |
| GET | /view-files-with-category | CategoryController@getCategoryAndFiles | Folder contents for the portal |
| POST | /view-category | CategoryController@viewCategory | Folder detail |
| POST | /get-count/{categoryId} | CategoryController@getCategoryAssetCount | Public asset count of the subtree |
| POST | /sub-category | CategoryController@getChildCategory | Children of parent_id |
| POST | /get-parent-category | CategoryController@getParentCategory | Parent chain for breadcrumbs |
| GET | /view-asset-metadata | CategoryController@GetAssetMetaData | Asset metadata |
External API (/external/v1) ​
| Method | Path | Controller@method | Purpose |
|---|---|---|---|
| POST | /get-category | External\AssetsController@getCategory | Folders with counts of assets carrying the role ACL |
| POST | /get-category-with-file | External\AssetsController@getCategoryAndFiles | Folder contents for a role |
Workflows ​
Create a folder or sub folder ​
category/add needs url_workspace_id and folder_name and always creates a root folder with the legacy column visibility = 0 but no portal permission rows, so a new root folder is private in every portal (portal visibility reads only the permission rows). add-sub-category does not run a validator, so a missing folder_name is not rejected by a rule. Neither endpoint checks for duplicate names.
Rename a folder ​
Rename does not call checkUser. The model save() lets Scout sync the folder document; asset breadcrumbs that include the old name are not reindexed by this endpoint.
Browse a folder (admin) ​
Folders and assets share one paged list: folders come first, and each page takes assets only after the folders that fall on it, so the asset offset is max(0, offset - folders). Allowed sort columns are display_file_name, file_size, file_type, created_at, updated_at, modified_at; anything else falls back to created_at. Folders sort by folder_name when the asset sort is a name, size or type column. Only live assets count (is_archive, is_deleted, final_deleted all 0). get_tags=true and get_cf=true add tags and custom fields in the Typesense shape; display_file is appended for document, GIF and SVG types. collage_adobe_integration=true also returns all_assets_ids and all_folder_ids for the Adobe plugin. The endpoint does not call checkUser. select-all returns ids up to constant.MAX_BULK_OPERATION_LIMIT (default 5000), folders first.
Move a folder ​
The same endpoint moves assets; see Assets. Folder documents are reindexed in chunks of 500. Assets under a moved folder are reindexed inline up to 2000; above that they go through ReindexAssetsByIds jobs.
Trash a folder ​
Only the folders the user picked get visible_in_trashed = 1; their sub folders are trashed with visible_in_trashed = 0, stay out of the trash list and come back with their parent. Directly picked assets also get visible_in_trashed = 1 and their embed codes turned off. The trash list (get-deleted-category-with-files) unions trashed folders and trashed assets with visible_in_trashed = 1, ordered by sort_by (default desc).
Restore and permanent delete ​
all-restore-deleted-category-with-files restores every trashed folder that is not final deleted, then every trashed asset whose folder is live or missing. permanent-delete-category-with-files takes category_ids and assets_ids, removes the S3 files, sets final_deleted = 1 and clears category_id on the deleted assets. dam:assets-delete purges anything trashed more than 30 days ago (daily 09:10).
Portal folder browse ​
The query uses the request instance_id (required here), falling back to the partner's own instance_id on other portal endpoints. Sub-folder counts on this page join permission rows with visibility in [0, 1], so they count private children and skip protected ones; the folder list itself uses [0, 2]. sub-category and get-parent-category do not apply the portal visibility filter or a workspace filter.
Data ​
| Model / table | Use |
|---|---|
DigitalAssetsCategory / digital_assets_categories | parent_id, category_path, folder_name, description, visible_in_trashed, final_deleted, modified_at, soft deletes. visibility is the legacy single-portal column (0 public, 1 private, 2 protected), copied into dam_instance_permissions by migration 2026_03_23_120000; it is still written on create and restore |
DigitalAssets | category_id, live flags |
AssetsVersion | category_id and trash flags copied from the asset |
DamInstancePermission | Per-portal folder rows (permissionable_type = DigitalAssetsCategory) |
DamGroup | Legacy group permission names shown on folder lists |