Skip to main content

GET /api/folders

Returns the folder structure and contents for slideshow navigation and admin management.

Parameters

string
Specific folder path to get contents from. If not provided, returns root level structure.

Request Examples

Root Structure
Specific Folder

Response

Response Fields

string
Current folder path being viewed
string
Path to parent folder (null for root level)
array
Array of subfolders in current directory
array
Array of images in current directory
number
Count of subfolders in current directory
number
Count of images in current directory

Folder Object

string
Folder display name
string
Full path to folder from root
number
Number of images in this folder (recursive)
number
Number of direct subfolders
string
ISO timestamp of last modification

Image Object

string
Image filename
string
Full path to image from root
number
File size in bytes
object
Image width and height in pixels
string
ISO timestamp of last modification

Status Codes

Success
Folder contents retrieved successfully
Not Found
Specified folder path does not exist
Server Error
Error accessing file system

Usage Example

Path Handling

  • Use forward slashes for folder separators
  • Paths are relative to the uploads directory
  • URL encode folder names with special characters
  • Empty path parameter returns root level
  • Invalid paths return 404 error