description |
---|
The Lucid API is the logical interface used to interact with a node. By default, your node's server listens on port 7021. |
{% api-method method="put" host="https://localhost:7021" path="/api/kv/:key" %} {% api-method-summary %} Store Data (Create & Update) {% endapi-method-summary %}
{% api-method-description %} This endpoint allows you store data at a specific key. If the key is not used yet, it will be created. {% endapi-method-description %}
{% api-method-spec %} {% api-method-request %} {% api-method-path-parameters %} {% api-method-parameter name="key" type="string" %} Key of the value to store {% endapi-method-parameter %} {% endapi-method-path-parameters %}
{% api-method-headers %} {% api-method-parameter name="Authorization" type="string" required=true %} API authentification JSON Web Token {% endapi-method-parameter %} {% endapi-method-headers %}
{% api-method-body-parameters %} {% api-method-parameter name="Raw Body" type="string" required=true %} Raw body (Plain text, JSON, ...) or raw binary content {% endapi-method-parameter %} {% endapi-method-body-parameters %} {% endapi-method-request %}
{% api-method-response %} {% api-method-response-example httpCode=200 %} {% api-method-response-example-description %} Data was successfully updated. {% endapi-method-response-example-description %}
{
"message": "The specified key was successfully updated."
}
{% endapi-method-response-example %}
{% api-method-response-example httpCode=201 %} {% api-method-response-example-description %} Data was successfully created. {% endapi-method-response-example-description %}
{
"message": "The specified key was successfully created."
}
{% endapi-method-response-example %}
{% api-method-response-example httpCode=401 %} {% api-method-response-example-description %}
{% endapi-method-response-example-description %}
{
"message": "You are not allowed to perform this action."
}
{% endapi-method-response-example %}
{% api-method-response-example httpCode=409 %} {% api-method-response-example-description %}
{% endapi-method-response-example-description %}
{
"message": "The specified key cannot be updated."
}
{% endapi-method-response-example %} {% endapi-method-response %} {% endapi-method-spec %} {% endapi-method %}
{% api-method method="get" host="https://localhost:7021" path="/api/kv/:key" %} {% api-method-summary %} Get Data {% endapi-method-summary %}
{% api-method-description %} This endpoint allows you to get data associated with a key. {% endapi-method-description %}
{% api-method-spec %} {% api-method-request %} {% api-method-path-parameters %} {% api-method-parameter name="key" type="string" required=true %} Key of the data to get {% endapi-method-parameter %} {% endapi-method-path-parameters %}
{% api-method-headers %} {% api-method-parameter name="Authorization" type="string" required=true %} API authentification JSON Web Token {% endapi-method-parameter %} {% endapi-method-headers %} {% endapi-method-request %}
{% api-method-response %} {% api-method-response-example httpCode=200 %} {% api-method-response-example-description %}
{% endapi-method-response-example-description %}
hello world
{% endapi-method-response-example %}
{% api-method-response-example httpCode=404 %} {% api-method-response-example-description %}
{% endapi-method-response-example-description %}
{
"message": "The specified key does not exists."
}
{% endapi-method-response-example %} {% endapi-method-response %} {% endapi-method-spec %} {% endapi-method %}
{% api-method method="delete" host="https://localhost:7021" path="/api/kv/:key" %} {% api-method-summary %} Delete Data {% endapi-method-summary %}
{% api-method-description %} This endpoint allows you to delete an existing key with its associated data. {% endapi-method-description %}
{% api-method-spec %} {% api-method-request %} {% api-method-path-parameters %} {% api-method-parameter name="key" type="string" required=true %} Key of the data to remove {% endapi-method-parameter %} {% endapi-method-path-parameters %}
{% api-method-headers %} {% api-method-parameter name="Authorization" type="string" required=true %} API authentification JSON Web Token {% endapi-method-parameter %} {% endapi-method-headers %} {% endapi-method-request %}
{% api-method-response %} {% api-method-response-example httpCode=200 %} {% api-method-response-example-description %}
{% endapi-method-response-example-description %}
{
"message": "The specified key and its data was successfully deleted."
}
{% endapi-method-response-example %}
{% api-method-response-example httpCode=401 %} {% api-method-response-example-description %}
{% endapi-method-response-example-description %}
{
"message": "You are not allowed to perform this action."
}
{% endapi-method-response-example %}
{% api-method-response-example httpCode=404 %} {% api-method-response-example-description %}
{% endapi-method-response-example-description %}
{
"message": "The specified key does not exists."
}
{% endapi-method-response-example %} {% endapi-method-response %} {% endapi-method-spec %} {% endapi-method %}
{% api-method method="head" host="https://localhost:7021" path="/api/kv/:key" %} {% api-method-summary %} Check key initialization {% endapi-method-summary %}
{% api-method-description %} Check if a key was initialized in the Lucid node. {% endapi-method-description %}
{% api-method-spec %} {% api-method-request %} {% api-method-path-parameters %} {% api-method-parameter name="key" type="string" required=true %} Key of the data to check {% endapi-method-parameter %} {% endapi-method-path-parameters %}
{% api-method-headers %} {% api-method-parameter name="Authorization" type="string" required=false %} API authentification JSON Web Token {% endapi-method-parameter %} {% endapi-method-headers %} {% endapi-method-request %}
{% api-method-response %} {% api-method-response-example httpCode=200 %} {% api-method-response-example-description %} The specified key is initialized. {% endapi-method-response-example-description %}
{
"message": "The specified key is initialized."
}
{% endapi-method-response-example %}
{% api-method-response-example httpCode=401 %} {% api-method-response-example-description %}
{% endapi-method-response-example-description %}
{
"message": "You are not allowed to perform this action."
}
{% endapi-method-response-example %}
{% api-method-response-example httpCode=404 %} {% api-method-response-example-description %}
{% endapi-method-response-example-description %}
{
"message": "The specified key does not exists."
}
{% endapi-method-response-example %} {% endapi-method-response %} {% endapi-method-spec %} {% endapi-method %}
{% api-method method="patch" host="https://localhost:7021" path="/api/kv/:key" %} {% api-method-summary %} Execute a Specific Operation {% endapi-method-summary %}
{% api-method-description %} Execute some operation like lock/unlock or other. {% endapi-method-description %}
{% api-method-spec %} {% api-method-request %} {% api-method-path-parameters %} {% api-method-parameter name="key" type="string" required=true %} Key of the data to operate {% endapi-method-parameter %} {% endapi-method-path-parameters %}
{% api-method-headers %} {% api-method-parameter name="Authorization" type="string" required=true %} API authentification JSON Web Token {% endapi-method-parameter %} {% endapi-method-headers %}
{% api-method-body-parameters %} {% api-method-parameter name="operation" type="string" required=false %} Operation to perform (lock, unlock etc) {% endapi-method-parameter %} {% endapi-method-body-parameters %} {% endapi-method-request %}
{% api-method-response %} {% api-method-response-example httpCode=200 %} {% api-method-response-example-description %}
{% endapi-method-response-example-description %}
{% endapi-method-response-example %} {% endapi-method-response %} {% endapi-method-spec %} {% endapi-method %}