API

The communication between the user and the proxy server is done through this REST API. It is specified as follows :

EndpointRequest typeFields to supply (if any)DescriptionResponse type (see skeleton below)
/api/storageGETNoneReturns information about connected storage serversservers: String[], locations: String[], hosts: String[], pings: Number[]
/api/fileGETNoneReturns the list of currently protected files and a percentage of storage usefiles: File[], percentage: Number
/api/configurationGETNoneReturns a list of information about the configurationversion: String, limit: Number, max_file_size: Number
/api/file/protectPOST- threshold (number): number of parts
- file (file): the file to protect
Protects a filenull
/api/file/retrievePOST- name (string): the filenameRetrieves a fileFile data as a stream of bytes
/api/file/removePOST- name (string): the filenameRemoves a filenull
You need to specify X-Remote-User and X-Remote-Email headers in each request. It is what makes Qasmat aware of the user doing the information. See Authentication page for more details.

JSON response skeletons:

HTTP codes 2xx (except for /api/file/retrieve)
{
  "code": number,
  "status": "string",
  "data": any // depends on the request, see Response type in the tab
}
HTTP codes 3xx - 5xx
{
  "code": number,
  "status": "error",
  "message": string
}

File specification

In our API, a File is defined by these properties:

NameTypeDescription
date_of_protectionDateRepresents when the file was protected by the user.
expiredBooleanRepresents the expiration state of the shares in the databases.
filenameStringThe name of the file.
hashInt[]Represents the hash of the file, to verify its integrity.
kIntThe threshold the file is protected with.
last_renewalDateLast time the file got renewed in the databases.