Reference HTTP routes
HTTP routes
Under the
base of the handler, /api/files in these pages. Read from the comment at the top of packages/server/src/api.ts when this site is built, so it says what the code does. Bodies are JSON; a refusal is { error, message } with its status.On this page
Of someone signed in
Each asks identify who is asking and authorize whether they may.
| Route | What it does |
|---|---|
GET/entries?folder=… | what is in a folder (none: the top), and where it is |
GET/entries/:id | one entry, and where it is |
GET/recent | the files changed last |
GET/trash | what is in the trash |
GET/starred | what the one asking starred, the last starred first |
PUT/entries/:id/star | starred, by the one asking only |
DELETE/entries/:id/star | no longer |
GET/search?q=…&within=…&trashed=1 | found by name |
POST/folders | { name, parent } |
POST/uploads | { name, parent, type, size }, or { file, type, size } for a new version: where to send the parts; or { rendition: { file, version, size, width, height }, type, size }: a smaller picture of a version |
POST/uploads/finish | { token, parts: [{ number, etag }] }: the file, once its bytes are there |
POST/uploads/resume | { token }: an upload cut, gone on with: what arrived, and where to send the rest |
POST/uploads/abort | { token }: an upload given up, and what of it arrived taken away |
PATCH/entries/:id | { name }, { parent }, { color } or { fields }, with { ifTaken: 'keep-both' } to add "(2)" |
GET/fields?name=…&value=… | what has that field set to that value, of what one may read |
POST/entries/:id/copy | { parent }: a copy of a file, its bytes copied in the storage; beside it unless said, or at one's own top |
POST/entries/:id/trash | into the trash |
POST/entries/:id/restore | out of it |
DELETE/entries/:id | gone for good, from the trash |
POST/trash/empty | — |
GET/entries/:id/download?version=&inline=1&size= | an address to read it from, or to show it in the page; with size, a smaller picture when there is one |
POST/entries/:id/versions/:v/restore | — |
POST/zip | { ids }: what an archive of them holds, folders with what is in them, at their paths |
POST/urls | { ids, inline, size }: the addresses of many files at once, for a grid; until when each is good |
GET/info | where the bytes are, as a person reads it |
GET/usage | the bytes the one asking keeps, and how many they may |
GET/settings | the drive's settings, the one asking's own, and whether they may change the drive's |
GET/people?q= | who matches what is typed, to share with (with `people`) |
POST/people/names | { ids }: how each of them is called (with `people.names`) |
PUT/settings | the drive's, for whoever may 'configure' |
PUT/settings/mine | { language, theme }: one's own |
GET/entries/:id/activity?limit= | what was done to it, and in it of a folder, the newest first |
GET/search/text?q= | files by what is written in them, with a piece of it around what was found |
PUT/entries/:id/text | { version, text }: what is written in a file, as the page read it, to find it by |
PUT/entries/:id/placeholder | { version, placeholder }: the tiny picture shown blurred while a picture comes |
POST/duplicates | { hashes }: the files with those bytes already, of what one may read |
GET/shared | what others shared with the one asking |
GET/shared/new | how many of those are new since they last looked |
POST/shared/seen | they looked: none is new any more |
POST/entries/:id/shares | { with, role, days }: shared, or given another role; for that many days, for good with null, as before unless said |
DELETE/entries/:id/shares/:with | no longer shared with them |
POST/entries/:id/links | { days, password, once, viewOnly, watermark }: a link to read it without signing in, and its address |
GET/entries/:id/links/:link | the address of a link again |
DELETE/entries/:id/links/:link | taken back |
GET/entries/:id/comments | what is said of it, each thread with its replies under it |
POST/entries/:id/comments | { text, replyTo }: a comment, or a reply; those it names with @ told (onComment) |
PATCH/entries/:id/comments/:c | { text } by its author, or { resolved: true | false } |
DELETE/entries/:id/comments/:c | by its author, or by who may share the entry |
PUT/entries/:id/hold | { reason }: on hold, for who may 'configure': not to be trashed or deleted |
DELETE/entries/:id/hold | released |
GET/notifications | what the one asking was told (shared with them or a group of theirs, named in a comment), the newest first, and how many are new |
POST/notifications/seen | they looked: none is new any more |
GET/admin/usage | for who may 'configure': what each person keeps (files, folders, bytes), and the whole drive |
GET/admin/activity?limit= | for who may 'configure': what was done anywhere in the drive, the newest first |
GET/export?user=… | everything of a person (oneself, or anyone for who may 'configure'), for a .zip |
GET/events | what changes, as it happens (server-sent events): the folders and entries of each change one may see |
Through a link
They ask neither: the link is the permission. A link with a password asks for it at each.
| Route | What it does |
|---|---|
GET/links/:token?folder=… | what the link reads, or a folder inside it |
GET/links/:token/download?id=…&inline=1 | — |
GET/links/:token/zip?ids=… | what an archive of some of it (all, unless said) holds |
GET/links/:token/urls?ids=… | the addresses of some of its files |
POST/links/:token/uploads | { name, folder, type, size }, and /finish, /resume, /abort: a file put in it, of a link that lets files in ({ uploads }); X-Link-Name says who sends, X-Link-Item which document asked for it is, X-Link-Expires until when it is good (YYYY-MM-DD), of a document that asks it and X-Link-Answers what they wrote to its questions ({ id: text }, as JSON, encoded) |
DELETE/links/:token/sent/:receipt | a file just sent through it taken back, for ten minutes, by the receipt its upload gave |
PATCH/entries/:id/links/:link | { days, uploads, request, closed }: a link changed, closed or opened again |
PUT/entries/:id/review | { status: 'accepted' | 'rejected' | null, reason }: a file that came through a request, looked at |
GET/received | what came through the requests for files of the one asking, the newest first |
GET/requests | the requests for files of the one asking: each folder, its link, its token, what came |
GET/admin/requests | for who may 'configure': every request for files, with whom it was sent to and what is missing |
POST/entries/:id/links/:link/remind | whoever a request was sent to reminded now of what is missing (with `reminders`) |
GET/expiring?days= | files one may read whose field `expires` says they stop being good within so many days |