↑↓ to navigate ↵ to open Esc to close Search by Algolia

You are reading the documentation of FileRun 2026.4.0, which is not released yet. It is subject to change, so do not use it for planning. Go to the documentation of FileRun 2026.3.0

API: Managing shared drives

Available since FileRun 2026.4.0.

All the endpoints below require the admin scope, take POST requests and answer with JSON.

A shared drive is a folder that belongs to no user account. Its members work in it with the role their membership gives them, and reach it at the path /ROOT/DRIVES/{id}, where {id} is the id of the drive.

Action Target URL
Get shared drive information /api.php/Drive/!admin/shared_drives/info
Create a shared drive /api.php/Drive/!admin/shared_drives/create
Update a shared drive /api.php/Drive/!admin/shared_drives/update
Delete a shared drive /api.php/Drive/!admin/shared_drives/delete
List the members /api.php/Drive/!admin/shared_drives/members/list
Add a member /api.php/Drive/!admin/shared_drives/members/add
Change the role of a member /api.php/Drive/!admin/shared_drives/members/update
Remove a member /api.php/Drive/!admin/shared_drives/members/remove

Who can manage shared drives

  • The superuser administers every shared drive, and is the only one who can set the path of the folder of a drive.
  • An independent administrator, and a simple administrator with the admin_shared_drives permission, can create shared drives and administer the drives they are the admin of. The admin of a drive is the administrator named by admin_uid, by default the one who created it.
  • A member with the drive_manager role can change the name, the description and the read_only, sharing_out and links settings of the drive, and add, change and remove its members. They can change and remove their own membership, but not that of another member with the drive_manager role, user or group ("Only the admin of the shared drive can change or remove another manager!"). A guest never has the powers of a manager, whatever its role.
  • Getting the information of a drive, listing its members and deleting it are left to the admin of the drive and the superuser.

The admin scope is given only to the accounts of administrators, so a manager who is not an administrator cannot use these endpoints.

An administrator without the permission is refused with "You are not allowed to administer shared drives!", and one who is not the admin of the drive with "You are not the admin of this shared drive!". A manager of the drive is not refused by the update endpoint and the three endpoints that change the members. On those four, an administrator without the permission who is not a manager of the drive is refused with "You are not allowed to change the settings of this shared drive!" instead. A drive id that does not exist is refused with "The shared drive was not found!".

The roles of the members

A member has one of the roles of a share, uploader, viewer, commenter, distributor, editor, contributor or manager (see Sharing files and folders), or drive_manager. The drive_manager role has every right of manager, and also changes the settings and the members of the drive. What a role gives a guest account is limited by the Guest role, as it is for a share.

The settings of the drive limit every member, whatever the role: in a read-only drive nobody uploads, edits, renames, moves or deletes, without sharing_out nobody shares its content, and without links nobody creates web links to it.

Getting shared drive information

Parameter Type Required Description
id string Yes The id of the shared drive

The response carries the drive in data: id, name, description, created (the date and time it was created), enabled, admin (the id and the name of its admin), quota (in MB, 0 for no quota), read_only, sharing_out and links. For the superuser, it also carries path, the folder of the drive on the server.

Creating a shared drive

Parameter Type Required Description
name string Yes At most 100 characters
description string No At most 255 characters
quota integer No In MB. 0 for no quota, the default.
read_only boolean (1/0) No 1 makes the drive read-only: its members cannot upload, edit, rename, move or delete files, or change metadata. Default 0.
sharing_out boolean (1/0) No Whether the members can share the content of the drive with other users. Default 1.
links boolean (1/0) No Whether the members can create web links to the content of the drive. Default 1.
enabled boolean (1/0) No Default 1. The members cannot open a disabled drive.
admin_uid integer No The user id of the admin of the drive. Left out, the administrator making the request.
path string No Superuser only. The folder of the drive. An absolute server path. Always use forward slashes as separators.

The response carries the id of the new drive as data.id.

The admin named by admin_uid has to be an account that can administer shared drives: the superuser, an independent administrator, or a simple administrator with the admin_shared_drives permission. Otherwise the request is refused with "... cannot be the admin of a shared drive!".

Without path, the folder of the drive is made inside the folder of the shared drives, which the superuser sets under Files → Settings → General in the control panel. While that is not set, the request is refused with "The folder of the shared drives is not set!", so only the superuser can create a drive, with a path. A path sent by another administrator is refused. The folder is created when it does not exist.

Updating a shared drive

Parameter Type Required Description
id string Yes The id of the shared drive
name string No
description string No
read_only boolean (1/0) No
sharing_out boolean (1/0) No
links boolean (1/0) No
quota integer No Admin of the drive only.
enabled boolean (1/0) No Admin of the drive only.
admin_uid integer No Admin of the drive only.
path string No Superuser only.

The parameters are those of the create endpoint. Only the values sent are changed. A parameter left out leaves the drive as it is. A manager who sends quota, enabled or admin_uid is refused.

A new path dissolves the drive: its memberships and the shares made from it are removed, along with the web links, the stars and the notification rules the members made in it. The folder at the new path is created when it does not exist, and nothing is moved from the old one.

Deleting a shared drive

Parameter Type Required Description
id string Yes The id of the shared drive
delete_folder boolean (1/0) No 1 to delete the folder of the drive from the disk as well. Default 0.

Deleting a drive removes its memberships and the shares made from it, and empties its trash. Without delete_folder, the folder stays on the disk. With it, the request is refused when the home folder of a user account is inside the folder of the drive.

Listing the members

Parameter Type Required Description
id string Yes The id of the shared drive

The response carries the members in the data array, oldest first. Each has id (the id of the membership, which the role change and the removal take as member_id), type (user or group), role, added (the date and time it was added) and added_by (the id and the name of the account that added it). A user also has uid, public_id, name and guest (true for a guest account). A group also has gid and name.

Adding a member

Parameter Type Required Description
id string Yes The id of the shared drive
role string Yes One of the roles listed above
uid integer Yes, if no gid or email The user id of the account to add
gid integer Yes, if no uid or email The id of the group to add. Its users are members through the group.
email string Yes, if no uid or gid The e-mail address of a guest account to create and add

Exactly one of uid, gid and email is sent. The response carries the id of the membership as data.id.

The admin of the drive can add the user accounts they are allowed to manage and the groups they manage. A manager can add the user accounts and the groups their users_may_see permission lets them see.

A guest account is created only when guest invitations are enabled and no other account uses the e-mail address. A manager who is not the admin of the drive also needs the permission to share with guests.

A user or a group which is already a member is refused. Its role is changed with the endpoint below. The visitor, the system account and the shared drives themselves cannot be members ("This account cannot be a member of a shared drive!").

A guest account among the new members gets an invitation by e-mail. The endpoint sends no e-mail to the other users.

Changing the role of a member

Parameter Type Required Description
id string Yes The id of the shared drive
member_id integer Yes The id of the membership, from the list above
role string Yes One of the roles listed above

The request is refused if the member already has the role ("The selected role is the same as the current one!"). The membership keeps its id, so the web links, the stars and the notification rules the member made in the drive are kept.

Removing a member

Parameter Type Required Description
id string Yes The id of the shared drive
member_id integer Yes The id of the membership, from the list above

Removing a member also removes the web links, the stars and the notification rules the member made in the drive. A guest account left with nothing shared with it is deleted.

A membership which is not one of the drive is refused with "The member was not found!".