For the complete documentation index, see llms.txt. This page is also available as Markdown.

FilemanagerDirectories

Introduction

FilemanagerDirectories form a persisted directory hierarchy. Each directory stores its parent_id, name, and normalized absolute path; access assignments on parent directories affect visibility throughout the path.

Model Definition

Alias

filemanagerDirectory

Relations

Key
Relation
Type
Relation Field(s)

user

Belongs to

user_id

parent

Belongs to

parent_id

children

Has many

parent_id

filemanagerFiles

Has many

filemanager_directory_id

users

Belongs to many

user_filemanager_directory

departments

Belongs to many

department_filemanager_directory

Computed Properties

  • hash - Hashed representation of the directory id.

  • url and static_url - Link to the directory page.

Capabilities

  • Targetables - user_ids or department_ids restrict directory access; an empty assignment is public to users with Filemanager access, while visibility through a nested path also depends on its ancestors.

  • URL Context - Directory URLs resolve to access-checked context containing the directory name, parent path, and last update time.

List

List all directories visible to the authenticated user.

Definition

GET /api/filemanager/directories

Request Keys

Key
Type
Default
Description

filter

object

{}

Result Control filters, including the Filemanager path filters.

sort

string

API default

Result Control sort expression.

include

string

API default

Relations to include.

appends

string

API default

Computed properties to append.

Behavior

  • Recursive path filtering can be more expensive than the direct List by Path endpoint.

Example Request

Example Response

List by Path

List direct child directories of a normalized path. Omitting path lists the root.

Definition

GET /api/filemanager/directories/path/{path?}

Route Parameters

Parameter
Type
Description

path

string

Optional. Directory path without a required leading or trailing slash. Defaults to /.

Request Keys

Key
Type
Default
Description

filter

object

{}

Optional Result Control filters applied to the direct children.

sort

string

API default

Result Control sort expression.

Example Request

Example Response

Count

Count directories visible to the authenticated user after Result Control filters are applied.

Definition

GET /api/filemanager/directories/count

Request Keys

Key
Type
Default
Description

filter

object

{}

Result Control filters applied before counting.

Example Request

Example Response

List by Directory

List direct child directories of one visible directory.

Definition

GET /api/filemanager/directories/{filemanagerDirectory}/directories

Route Parameters

Parameter
Type
Description

filemanagerDirectory

integer | string

Parent directory ID or hash.

Request Keys

Key
Type
Default
Description

filter

object

{}

Optional Result Control filters applied to the direct children.

sort

string

API default

Result Control sort expression.

Behavior

  • The parent directory must be visible to the authenticated user. The response contains only its direct visible children.

Example Request

Example Response

Show

Show one visible directory.

Definition

GET /api/filemanager/directories/{filemanagerDirectory}

Route Parameters

Parameter
Type
Description

filemanagerDirectory

integer | string

Directory ID or hash.

Example Request

Example Response

Show Information

Return the number and total byte size of all visible files in a directory and its descendants.

Definition

GET /api/filemanager/directories/{filemanagerDirectory}/information

Route Parameters

Parameter
Type
Description

filemanagerDirectory

integer | string

Directory ID or hash.

Example Request

Example Response

Create

Create a physical directory and its metadata record.

Definition

POST /api/filemanager/directories

Request Keys

Key
Type
Default
Description

path*

string

-

Directory path. The backend normalizes leading and trailing slashes and derives parent_id and name.

parent_id

integer | null

Derived from path

Parent directory. When supplied, name is used to build path.

name

string

Derived from path

Directory name when parent_id is supplied.

user_ids

integer[] | string

[]

Users allowed to access the directory.

department_ids

integer[] | string

[]

Departments allowed to access the directory.

Keys with * are required unless parent_id and name provide the hierarchy.

Behavior

  • user_id is set to the authenticated user.

  • When parent_id is present, parent_id and name determine the hierarchy and take precedence over a conflicting path. A null parent creates a root directory.

  • When both assignment arrays are non-empty, user assignments take precedence and department assignments are cleared. When both are empty, the directory is public to users with Filemanager access.

Example Request

Example Response

Update

Rename or move a directory and optionally replace its assignments.

Definition

PUT /api/filemanager/directories/{filemanagerDirectory}

Route Parameters

Parameter
Type
Description

filemanagerDirectory

integer | string

Directory ID or hash.

Request Keys

Key
Type
Description

path

string

New normalized directory path.

parent_id

integer | null

New parent directory.

name

string

New directory name.

user_ids

integer[] | string | null

Replacement user assignments.

department_ids

integer[] | string | null

Replacement department assignments.

Behavior

  • user_id remains the authenticated user. Reserved directory paths cannot be moved or renamed.

  • When parent_id or name is present, those hierarchy fields take precedence over a conflicting path; omitted hierarchy fields retain their current values. A null parent moves the directory to the root.

  • A path change moves the directory, its descendants, and stored files. Assignment relations are synchronized only for keys present in the request.

Example Request

Example Response

Delete

Delete a directory, its storage content, and its descendant directory and file records.

Definition

DELETE /api/filemanager/directories/{filemanagerDirectory}

Route Parameters

Parameter
Type
Description

filemanagerDirectory

integer | string

Directory ID or hash.

Behavior

  • The root directory cannot be deleted.

Example Request

Example Response

Last updated