Governate
Sign in Start a trial

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

RequestPurpose
GET /api/v1/healthIs the server up. No sign-in.
GET /api/v1/deploymentAddress, installation ID and public keys. No sign-in.
GET /api/v1/meThe signed-in account.
GET /api/v1/settingsThe installation's settings.

Files

RequestPurpose
POST /api/v1/filesRegister 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/filesFiles 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/sharedFiles shared with you.
GET /api/v1/files/{id}/contentDownload the .gvf.
GET /api/v1/files/{id}/originalDownload the original, decrypted.
GET /api/v1/files/{id}/stand-inDownload a stand-in: a file of the same type holding only a link. Needs the setting to be on.
POST /api/v1/files/{id}/keyRelease the file key, wrapped to a key you send.
POST /api/v1/files/{id}/viewStart a viewing session.
POST /api/v1/files/{id}/revokeRevoke.

Sharing and permissions

RequestPurpose
GET /api/v1/files/{id}/grantsWho the file is shared with.
PUT /api/v1/files/{id}/grantsShare with {"email": "..."}.
DELETE /api/v1/files/{id}/grantsStop sharing with {"email": "..."}.
GET /api/v1/files/{id}/policyThe file's permissions and limits.
PUT /api/v1/files/{id}/policyReplace them.
POST /api/v1/files/{id}/ownerTransfer ownership to {"email": "..."}.
GET /api/v1/files/{id}/eventsThe 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.

RequestPurpose
GET /api/v1/admin/usersList accounts.
POST /api/v1/admin/usersAdd: {"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/licenseLicence status and seats in use.
POST /api/v1/admin/licenseImport: {"license": "..."}.
PUT /api/v1/admin/settingsChange settings.
GET /api/v1/admin/eventsAll activity.
GET /api/v1/admin/postureThe compliance page's lines, worked out from the current settings.
GET /api/v1/admin/infrastructureWhat the installation runs on. No secret is included.
PUT /api/v1/admin/infrastructure/storageTry a file store and switch to it.
POST /api/v1/admin/infrastructure/storage/testTry a file store without switching.
PUT /api/v1/admin/infrastructure/sign-inTurn a sign-in provider on, change it, or turn it off.
PUT /api/v1/admin/infrastructure/activity-exportWhere the activity record is copied to.
POST /api/v1/admin/infrastructure/activity-export/testSend one test event.
PUT /api/v1/admin/infrastructure/bootAddresses, root key and connection policy. The server restarts.

Status codes

StatusMeaning
401Not signed in, or the sign-in has ended.
402No valid licence, or every seat is in use.
403Signed in, but not allowed.
404No such thing, or not shared with you. The two are not distinguished.
410The file has been revoked.

Stability

The API is versioned in its path. Within v1, fields may be added; existing ones will not change meaning.