Skip to content

Content Drive BE: Folders CRUD #32302

Closed
9 of 9 issues completed
Closed

Description

@zJaaal

🧩 Overview

This issue tracks the backend implementation of Folder CRUD operations for the new Content Drive experience in dotCMS. The goal is to support site-scoped, infinitely nested folders that behave like a modern file manager, with user-friendly metadata and permission-aware access.

For more context and information about each endpoint refer to this document.

📐 Folder Data Structure

type Folder = {
  identifier: string;              // Unique ID
  title: string;                   // User-facing label (can be duplicated)
  name: string;                    // Slug, must be unique within parent
  path: string;                    // Full path to this folder (e.g. "siteA/folder/subfolder")
  order: number;                   // Sibling sort order
  showOnMenu: boolean;             // Shown in navigation menu
  authorName: string;              // Last modified by
  modDate: string;                 // ISO8601 format ("2025-05-25T12:00:00Z")
  defaultType: 'images' | 'file';  // Type of assets supported
  allowedExtensions: string[];     // e.g. ["jpg", "png", "pdf"]
  hasChildren: boolean;            // Whether this folder has children (lazy-loaded)
  children?: Folder[];             // Only populated when explicitly fetched
};

🔐 Permissions

  • Requires a valid token — no anonymous access
  • Users will only see folders they have access to
  • Unauthorized access should return a 401 or exclude the folders from the response

🧭 Folder Hierarchy & Scope

  • Folder trees are scoped by site (e.g. site1/, site2/)
  • Supports infinite nesting
  • Child folders are lazy-loaded per path (avoid full recursion)

🌐 API Endpoints

Method Endpoint Description
GET /api/v1/folders?path=<site>/<folder> Lists folders at given path
POST /api/v1/folders Creates a new folder (in root or nested)
PUT /api/v1/folders?path=<site>/<folder> Updates folder fields
DELETE /api/v1/folders?path=<site>/<folder> Deletes folder and all contained content
PUT /api/v1/folders/move?from=<site>/<folder>&to=<site>/<folder> Moves folder and contents
PUT /api/v1/folders/copy?from=<site>/<folder>&to=<site>/<folder> Copies folder and contents

✅ Validations

  • name (slug) must be unique within the same parent
  • Field types must be validated (e.g., allowedExtensions must be an array)
  • Invalid or unauthorized actions should fail gracefully and provide enough context for the user

Sub-issues

Sub-issues

9 of 9 Issues completed
Loading 9 sub-issues

Activity

  1. added theissue type on Jun 3, 2025
  2. 18 remaining items

  3. changed the issue type fromtoon Sep 10, 2025
  4. moved this from Current Sprint Backlog to Next 2-4 Sprints in dotCMS - Product Planningon Nov 20, 2025
  5. moved this from Next 2-4 Sprints to Done in dotCMS - Product Planningon Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions