Crates.io | lockchain-http |
lib.rs | lockchain-http |
version | 0.4.0 |
source | src |
created_at | 2018-05-08 08:59:05.912869 |
updated_at | 2018-07-12 18:41:46.250324 |
description | Generic HTTP interface crate for the lockchain ecosystem. Can serve both encrypted and cleartext records |
homepage | https://github.com/spacekookie/lockchain/tree/master/lockchain-http |
repository | |
max_upload_size | |
id | 64266 |
size | 25,497 |
A plug and play http interface layer for various lockchain components.
This document will move.
All JSON payloads also include an error
field that is set in case of errors, if no other data is set.
{
"error": ["Prose error description", 5 /* error code*/ ],
"data": {
/* Whatever the data is – depending on endpoint */
}
}
Get information about this API endpoint. Information is received in JSON format and include the following fields.
verison
: The API versionproviders
: An array with type providers. This includes the Vault and Body implementation specifics.hostname
: Optional value which specifies the server namesupported
: A list of supported client/ API combinations, writtin in tuple form. These are auto-generated by the API providerGet a list of vaults known to this system, possibly only returning a single value
vaults
: List of vault names that are available to work withcount
: The number of vaults availableCreate a new vault. Payloads
name
: The name of the vaultlocation
: The location of a vault, left to the implementation specificsUpdate metadata about a vault that already exists. Will return an error if it doesn't
Delete a vault; a second transaction is required to confirm, after all users were logged-out
Get a specific record from a vault. Only available if authenticated
Add a new record to a vault. Only available if authenticated
Update data inside an existing record. Only available if authenticated
Delete a record. Only available if authenticated
Get a list of available users
Create a new user
Delete a user. Only available if authenticated as THAT user.
In the future, admin users (and priviledge hirarchies might be added)
Authenticate as a specific user
username
: The user to authenticate aspassword
: The user passphrase to use for authentication (different from the encryption passphrase)Called to end an active session.