Commit 26ae762e authored by Maarten de Waard's avatar Maarten de Waard 🤘🏻
Browse files

add some documentation on the possible API calls

parent 890ca070
API Documentation
Coming soon!
End points:
TODO: document post data
``GET /encryption``
Returns the status of the encryption (whether or not you have an encrypted
``POST /encryption/init``
Encrypts the disk with a password if there are no encrypted disks
Post data: ``{"password": password}``
``POST /encryption/unlock``
Decrypts the disk using a password and boots the machine
Post data: ``{"password": password}``
``POST /encryption/remove``
Brings the VPS in a state where the disk is not encrypted and booting does not
require a password (does not change the initrd to a "regular" initrd)
Post data: ``{"password": password}``
``POST /encryption/selfdestruct``
Removes the encryption master key, effectively deleting the encrypted data
Encryption keys
``GET /encryption/keys``
List luks password slots
``POST/PUT /encryption/keys/{slot}``
Add/change a luks slot to a new password. {slot} corresponds to a slot id
listed by ``GET /encryption/keys``.
Post data: ``{"password": password, "new-password": new-password}``
``DELETE /encryption/keys/{slot}``
Delete a password from a luks slot
SSH keys with access to the initrd:
``GET /ssh/keys``
List SSH keys in the ``/root/authorized_keys`` file
Add a key to the authorized_keys file
Post data: ``{"ssh-key": ssh-key}``
``PUT /ssh/keys/{id}``
Change a key in the authorized_keys file
Post data: ``{"ssh-key": ssh-key}``
``DELETE /ssh/keys/{key}``
Delete the key with id {key} from the autorized_keys file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment