Skip to content

Ruza Drive / Guides

Permissions and restrictions

The 12 permissions of a Ruza'Gency API key, the endpoints each one opens, the key templates and the folder and IP address restrictions.

How it works

A key holds only the permissions you give it. Every endpoint requires exactly those its "Access" line states, and a write permission does not imply reading. Without the permission, the answer is 403 missing_permission, and details.missing names it.

Two permissions are sensitive and shown in red in your account: Delete permanently, irreversible, and Create and manage share links, because a public link takes files out of the account.

The 12 permissions

See the plan, the quota and the space used

drive.account:read

The account, its plan and quota, the space by type and by folder.

See files and folders

drive.files:read

Entries and their paths, folder contents, search, recent files, favourites, the list of versions, the change feed.

Download file contents

drive.files:download

The content of files and of their versions, ZIP archives.

Move to the trash and restore

drive.files:trash

Move to the trash, list the trash, restore from it.

Delete permanently

drive.files:deletesensitive

Permanently delete an item of the trash, empty it, delete an older version. Irreversible.

See who has access

drive.members:read

The people your files and folders are shared with.

Manage people's access

drive.members:write

Change a person's role, remove their access.

Browse and download what is shared with you

drive.shared:read

The shares you received, their content, downloads.

Key templates

When creating a key, a template ticks the permissions of a common use; you may then adjust them one by one.

TemplatePermissions
Read onlydrive.account:read, drive.files:read, drive.files:download, drive.share_links:read, drive.members:read, drive.shared:read
Backupdrive.account:read, drive.files:read, drive.files:write
Read and writedrive.account:read, drive.files:read, drive.files:download, drive.share_links:read, drive.members:read, drive.shared:read, drive.files:write, drive.files:trash, drive.shared:write
Full accessAll of them

Folder restriction

A key may see only one folder and its content. root then names that folder, and paths (path, GET /entries/by-path) start from it. An entry outside the folder answers 404, without telling whether it exists. If the folder goes to the trash or is deleted, the key answers 409 scope_unavailable until it is restored.

The endpoints that cover the whole account refuse a key restricted to a folder (403 folder_restricted):

IP address restriction

A key may be kept to 10 address ranges at most (CIDR, IPv4 and IPv6), those of your server for instance. The address taken is the one that reaches the server, never a header the caller sends. Outside the ranges: 403 ip_not_allowed.

Actions kept for the application

Some actions need a recent sign-in, which a key does not prove. Through the API they answer 403 web_only; do them in the Ruza Drive application:

  • inviting a person to a folder or a file;
  • transferring the ownership of a file to another account;
  • creating a link that accepts deposits (read_write), removing a link's password or reactivating a link;
  • restoring an item trashed long ago.

Keys themselves are created, restricted and revoked only in your Ruza'Gency account, never through the API.

Next guideKey security