API Documentation

The Lucid API is the logical interface used to interact with a node. By default, your node's server listens on port 7021.

put
Store Data (Create & Update)

https://localhost:7021/api/kv/:key
This endpoint allows you store data at a specific key. If the key is not used yet, it will be created.
Request
Response
Request
Path Parameters
key
optional
string
Key of the value to store
Headers
Authorization
required
string
API authentification JSON Web Token
Body Parameters
Raw Body
required
string
Raw body (Plain text, JSON, ...) or raw binary content
Response
200: OK
Data was successfully updated.
{
"message": "The specified key was successfully updated."
}
201: Created
Data was successfully created.
{
"message": "The specified key was successfully created."
}
401: Unauthorized
{
"message": "You are not allowed to perform this action."
}
409: Conflict
{
"message": "The specified key cannot be updated."
}

get
Get Data

https://localhost:7021/api/kv/:key
This endpoint allows you to get data associated with a key.
Request
Response
Request
Path Parameters
key
required
string
Key of the data to get
Headers
Authorization
required
string
API authentification JSON Web Token
Response
200: OK
hello world
404: Not Found
{
"message": "The specified key does not exists."
}

delete
Delete Data

https://localhost:7021/api/kv/:key
This endpoint allows you to delete an existing key with its associated data.
Request
Response
Request
Path Parameters
key
required
string
Key of the data to remove
Headers
Authorization
required
string
API authentification JSON Web Token
Response
200: OK
{
"message": "The specified key and its data was successfully deleted."
}
401: Unauthorized
{
"message": "You are not allowed to perform this action."
}
404: Not Found
{
"message": "The specified key does not exists."
}

head
Check key initialization

https://localhost:7021/api/kv/:key
Check if a key was initialized in the Lucid node.
Request
Response
Request
Path Parameters
key
required
string
Key of the data to check
Headers
Authorization
optional
string
API authentification JSON Web Token
Response
200: OK
The specified key is initialized.
{
"message": "The specified key is initialized."
}
401: Unauthorized
{
"message": "You are not allowed to perform this action."
}
404: Not Found
{
"message": "The specified key does not exists."
}

patch
Execute a Specific Operation

https://localhost:7021/api/kv/:key
Execute some operation like lock/unlock or other.
Request
Response
Request
Path Parameters
key
required
string
Key of the data to operate
Headers
Authorization
required
string
API authentification JSON Web Token
Body Parameters
operation
optional
string
Operation to perform (lock, unlock etc)
Response
200: OK