API
Everything the website and the command-line tool do goes through this API. Requests and replies are JSON unless noted. Errors are {"error": "..."} with a matching status.
Signing in
POST /api/v1/login
{"email": "[email protected]", "password": "...", "client": "cli"}
With "client": "cli" the reply contains a token. Send it on later requests:
Authorization: Bearer <token>
Installation
| Request | Purpose |
|---|---|
GET /api/v1/health | Is the server up. No sign-in. |
GET /api/v1/deployment | Address, installation ID and public keys. No sign-in. |
GET /api/v1/me | The signed-in account. |
GET /api/v1/settings | The installation's settings. |
Files
| Request | Purpose |
|---|---|
POST /api/v1/files | Register a file protected on the device: send the header and wrapped key, and optionally its name; get the signature. |
PUT /api/v1/files/{id}/content?name= | Store the .gvf for a registered file. Body is the file. Allowed to the owner and to anyone the file is shared with; the content is checked against the file's key. |
POST /api/v1/protect?name= | Send a readable file to be encrypted on the server. Refused when settings require on-device encryption. |
GET /api/v1/files | Files you own. |
GET /api/v1/files/{id} | One file you own or that is shared with you: its name, and whether it is stored and can be viewed. |
GET /api/v1/shared | Files shared with you. |
GET /api/v1/files/{id}/content | Download the .gvf. |
GET /api/v1/files/{id}/original | Download the original, decrypted. |
GET /api/v1/files/{id}/stand-in | Download a stand-in: a file of the same type holding only a link. Needs the setting to be on. |
POST /api/v1/files/{id}/key | Release the file key, wrapped to a key you send. |
POST /api/v1/files/{id}/view | Start a viewing session. |
POST /api/v1/files/{id}/revoke | Revoke. |
Sharing and permissions
| Request | Purpose |
|---|---|
GET /api/v1/files/{id}/grants | Who the file is shared with. |
PUT /api/v1/files/{id}/grants | Share with {"email": "..."}. |
DELETE /api/v1/files/{id}/grants | Stop sharing with {"email": "..."}. |
GET /api/v1/files/{id}/policy | The file's permissions and limits. |
PUT /api/v1/files/{id}/policy | Replace them. |
POST /api/v1/files/{id}/owner | Transfer ownership to {"email": "..."}. |
GET /api/v1/files/{id}/events | The file's history. |
A permissions document:
{
"download_original": false,
"edit": false,
"copy_paste": false,
"print": false,
"screen_capture": false,
"share": false,
"screen_watermark": true,
"print_watermark": true,
"access_count": 0,
"access_from": null,
"access_until": "2027-06-30T00:00:00Z",
"allowed_domains": ["example.com"],
"message": ""
}
Administration
Administrators only.
| Request | Purpose |
|---|---|
GET /api/v1/admin/users | List accounts. |
POST /api/v1/admin/users | Add: {"email", "password", "kind": "member" or "guest", "is_admin"}. |
PATCH /api/v1/admin/users/{id} | Change kind, is_admin or password. |
POST /api/v1/admin/users/{id}/disabled | {"disabled": true} or false. |
DELETE /api/v1/admin/users/{id} | Remove. |
GET /api/v1/admin/license | Licence status and seats in use. |
POST /api/v1/admin/license | Import: {"license": "..."}. |
PUT /api/v1/admin/settings | Change settings. |
GET /api/v1/admin/events | All activity. |
GET /api/v1/admin/posture | The compliance page's lines, worked out from the current settings. |
GET /api/v1/admin/infrastructure | What the installation runs on. No secret is included. |
PUT /api/v1/admin/infrastructure/storage | Try a file store and switch to it. |
POST /api/v1/admin/infrastructure/storage/test | Try a file store without switching. |
PUT /api/v1/admin/infrastructure/sign-in | Turn a sign-in provider on, change it, or turn it off. |
PUT /api/v1/admin/infrastructure/activity-export | Where the activity record is copied to. |
POST /api/v1/admin/infrastructure/activity-export/test | Send one test event. |
PUT /api/v1/admin/infrastructure/boot | Addresses, root key and connection policy. The server restarts. |
Status codes
| Status | Meaning |
|---|---|
| 401 | Not signed in, or the sign-in has ended. |
| 402 | No valid licence, or every seat is in use. |
| 403 | Signed in, but not allowed. |
| 404 | No such thing, or not shared with you. The two are not distinguished. |
| 410 | The file has been revoked. |
Stability
The API is versioned in its path. Within v1, fields may be added; existing ones will not change meaning.