Zum Inhalt springen

REST-API: App API

Als Markdown ansehen

Erzeugt aus dem OpenAPI-Dokument des Daemons. Konventionen, Anmeldung, der CSRF-Header und der WebSocket stehen unter API.

The file of a file token from POST /api/app/files/url, with range requests, for 5 minutes; inline for images, audio, video and PDF, an attachment with download=true. Needs no session cookie and no Authorization header: the token is the query parameter pithyx-token.

Parameter

Name Ort Typ Pflicht Beschreibung
download query boolean nein

Antworten

  • 200

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Every group of the box but the built-in one. Needs the permission directory.read.

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Every active user of the box with its groups. Needs the permission directory.read.

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

The content of a file in a location, with range requests. A shared folder needs files.shares and files.read.

Parameter

Name Ort Typ Pflicht Beschreibung
share query string nein
storage query string nein
path query string nein

Antworten

  • 200

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Streams the body into the file at path (fs.entry.exists unless overwrite=true). A shared folder needs files.shares and files.write, a storage request a mapping for reading and writing; the user needs write access either way.

Parameter

Name Ort Typ Pflicht Beschreibung
share query string nein
storage query string nein
path query string nein
overwrite query boolean nein

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

A file or folder in a location, with whether the app may write it.

Parameter

Name Ort Typ Pflicht Beschreibung
share query string nein
storage query string nein
path query string nein

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Creates a folder in a location, with the same rules as writing a file.

Parameter

Name Ort Typ Pflicht Beschreibung
share query string nein
storage query string nein
path query string nein

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

The desktop tells the daemon that the user handed one file of a shared folder to this window (a pick, a save dialog or Open with). The window may then read it with files.read, or also write it with files.write, without files.shares; only this exact path, and the user’s own rights still apply. Only the desktop calls this, after a dialog the user answered.

Anfrage-Body: application/json: AppHandleRequest

Antworten

  • 204

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

One page of a folder in a shared folder (share, needs files.shares) or a storage request of the manifest (storage), as the user and with the user’s rights. Parameters as for GET /api/files/{shareId}/list.

Parameter

Name Ort Typ Pflicht Beschreibung
share query string nein
storage query string nein
path query string nein
sort query string nein
order query string nein
limit query integer (int32) nein
cursor query string nein

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

As POST /api/files/operations, with each place a shared folder (share, needs files.shares, files.read where entries are copied or moved from and files.write where anything changes) or a storage request (storage, needs a mapping for reading and writing where anything changes). Follow the job on jobs/.

Anfrage-Body: application/json: AppFileOperationRequest

Antworten

  • 202: application/json: Job

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Renames a file or folder within its folder; an existing name is never replaced. Needs the permissions of writing: files.shares and files.write for a shared folder.

Anfrage-Body: application/json: AppRenameRequest

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

The shared folders the user can use, without their place on the host. Needs the permission files.shares.

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

The recycle bin of a shared folder, as GET /api/files/{shareId}/trash. Needs files.shares and files.read.

Parameter

Name Ort Typ Pflicht Beschreibung
share query string nein
cursor query string nein
limit query integer (int32) nein

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Starts a job that deletes recycle bin items for good. Needs files.shares and files.write.

Anfrage-Body: application/json: AppTrashRequest

Antworten

  • 202: application/json: Job

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Starts a job that deletes everything in the recycle bin for good. Needs files.shares and files.write.

Anfrage-Body: application/json: AppTrashRequest

Antworten

  • 202: application/json: Job

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Starts a job that puts recycle bin items back. Needs files.shares and files.write.

Anfrage-Body: application/json: AppTrashRequest

Antworten

  • 202: application/json: Job

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

A URL that reads one file with range requests for 5 minutes, without the desktop session. Needs the permissions of reading the file.

Anfrage-Body: application/json: AppFileUrlRequest

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Earlier versions of a file or folder of a shared folder, as GET /api/files/{shareId}/versions. Needs files.shares and files.read.

Parameter

Name Ort Typ Pflicht Beschreibung
share query string nein
path query string nein

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Starts a job that copies a version back, as POST /api/files/{shareId}/versions/restore. Needs files.shares, files.read and files.write.

Anfrage-Body: application/json: AppVersionRestoreRequest

Antworten

  • 202: application/json: Job

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Cancels a job the token’s app started for the user; any other job is jobs.job.not_found.

Parameter

Name Ort Typ Pflicht Beschreibung
id path integer (int64) ja

Antworten

  • 204

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Stores log entries of the token’s app for its user, as source app/. Debug entries only while an administrator switched debug logging on for the app; at most 100 entries per request within the app’s rate limit.

Anfrage-Body: application/json: AppLogBatch

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

A notification of the token’s app for its user, with at most two buttons, data that comes back with a click and a tag that replaces the app’s earlier notification with the same tag. Needs the permission notifications.

Anfrage-Body: application/json: AppNotifyRequest

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

The keys the token’s app stored for its user.

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

A value the token’s app stored for its user under key, or null.

Parameter

Name Ort Typ Pflicht Beschreibung
key query string nein

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Stores a value of the token’s app for its user: keys of 1 to 128 characters, values of at most 64 KB of JSON, at most 1 MB per app and user (app.storage.too_large).

Parameter

Name Ort Typ Pflicht Beschreibung
key query string nein

Anfrage-Body: application/json: AppStorageValue

Antworten

  • 204

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Removes a value of the token’s app for its user; a missing one is no error.

Parameter

Name Ort Typ Pflicht Beschreibung
key query string nein

Antworten

  • 204

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

A one-time ticket for one WebSocket to an endpoint of the app’s backend (app.backend.endpoint_unknown for a name the manifest does not declare), valid 30 seconds, bound to what the host token is bound to.

Anfrage-Body: application/json: AppTicketRequest

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.