Lucid ᵏᵛ
  • About Lucid ᵏᵛ
  • Getting Started
  • Changelog
  • Documentation
    • API Documentation
    • Production Deployment
  • Other Resources
    • Lucid KV Website
    • Github Repository
Powered by GitBook
On this page
  • Store Data (Create & Update)
  • Get Data
  • Delete Data
  • Check key initialization
  • Execute a Specific Operation

Was this helpful?

  1. Documentation

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.

Store Data (Create & Update)

PUT 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.

Path Parameters

Name
Type
Description

key

string

Key of the value to store

Headers

Name
Type
Description

Authorization

string

API authentification JSON Web Token

Request Body

Name
Type
Description

Raw Body

string

Raw body (Plain text, JSON, ...) or raw binary content

{
  "message": "The specified key was successfully updated."
}
{
  "message": "The specified key was successfully created."
}
{
  "message": "You are not allowed to perform this action."
}
{
  "message": "The specified key cannot be updated."
}

Get Data

GET https://localhost:7021/api/kv/:key

This endpoint allows you to get data associated with a key.

Path Parameters

Name
Type
Description

key

string

Key of the data to get

Headers

Name
Type
Description

Authorization

string

API authentification JSON Web Token

hello world
{
  "message": "The specified key does not exists."
}

Delete Data

DELETE https://localhost:7021/api/kv/:key

This endpoint allows you to delete an existing key with its associated data.

Path Parameters

Name
Type
Description

key

string

Key of the data to remove

Headers

Name
Type
Description

Authorization

string

API authentification JSON Web Token

{
  "message": "The specified key and its data was successfully deleted."
}
{
  "message": "You are not allowed to perform this action."
}
{
  "message": "The specified key does not exists."
}

Check key initialization

HEAD https://localhost:7021/api/kv/:key

Check if a key was initialized in the Lucid node.

Path Parameters

Name
Type
Description

key

string

Key of the data to check

Headers

Name
Type
Description

Authorization

string

API authentification JSON Web Token

{
  "message": "The specified key is initialized."
}
{
  "message": "You are not allowed to perform this action."
}
{
  "message": "The specified key does not exists."
}

Execute a Specific Operation

PATCH https://localhost:7021/api/kv/:key

Execute some operation like lock/unlock or other.

Path Parameters

Name
Type
Description

key

string

Key of the data to operate

Headers

Name
Type
Description

Authorization

string

API authentification JSON Web Token

Request Body

Name
Type
Description

operation

string

Operation to perform (lock, unlock etc)

PreviousChangelogNextProduction Deployment

Last updated 5 years ago

Was this helpful?