External applications can store and retrieve data in key-value pairs (in JSON format) to and from Avgidea KVS (*1), and API keys can be created in advance for use in applications and shell scripts.
% curl -X POST -H 'content-type: application/json' -d '{"accesskey":"<accesskey>", "secret":"secretkey", "component":"function", "action":"<action>" ... }' https://<endpoint url>
Parameters
accesskey : Access key
secet:Secret key
component : funciton
action : action to execute
endpoint url : URL to send API requests
% curl -X POST -d "{\"accesskey\":\"<accesskey>\", \"secret\":\"<secretkey>\", \"component\":\"function\", \"action\":\"<action>\" ...}" https://<endpoint url>
Note :
When using curl commands under Windows, use only double quotes and escape within JSON data, as in the example at left.
You can retrieve the list of stores created as KVS data sources from the console.
% curl -X POST -d '{"accesskey":"<accesskey>", "secret":"<secretkey>", "component":"kvs", "action":"stores"}' https://<endpoint url>
{
"data": [
{
"id": "default",
"registeredAt": "2026-01-27T00:23:03.565307Z"
},
{
"id": "kvs1",
"registeredAt": "2026-02-02T05:56:55.891977Z"
},
{
"id": "mystore",
"registeredAt": "2026-01-29T07:39:15.565111Z"
}
],
"status": "success"
}
Parameters
action : stores
Return value
data : list of stores
status : Operation status
You can add key-value pairs to the store.
% curl -X POST -d '{"accesskey":"<accesskey>", "secret":"<secretkey>", "component":"kvs", "action":"create","key":"key1","value":{"p1":"str","p2":1,"p3":true,"p4":2.0},"store":"kvs1"}' https://<endpoint url>
{"data":"key1","status":"success"}
Parameters
action : create
key : The key for the entry. If the key already exists, an error is returned.
value : Entry value (JSON format)
store : Store Name (Default 'default')
Return value
data : Entry key
status : Operation status
% curl -X POST -d '{"accesskey":"<accesskey>", "secret":"<secretkey>", "component":"kvs", "action":"put","key":"key1","value":{"p1":"str","p2":1,"p3":true,"p4":2.0},"store":"kvs1"}' https://<endpoint url>
{"data":"key1","status":"success"}
Parameters
action : put
key : The key for the entry. If the key already exists, the value will be overwritten.
value : Entry value (JSON format)
store : Store Name (Default 'default')
Return value
data : Entry key
status : Operation status
You can retrieve stored key-value pairs from the store.
% curl -X POST -d '{"accesskey":"<accesskey>", "secret":"<secretkey>", "component":"kvs", "action":"get","key":"key1",store":"kvs1"}' https://<endpoint url>
{
"data": {
"p1": "str",
"p2": 1,
"p3": true,
"p4": 2
},
"status": "success"
}
Parameters
action : get
key : Entry key
store : Store Name (Default 'default')
Return value
data : Entry value(*2)
status : Operation status
You can delete stored key-value pairs from the store.
% curl -X POST -d '{"accesskey":"<accesskey>", "secret":"<secretkey>", "component":"kvs", "action":"delete","key":"key1",store":"kvs1"}' https://<endpoint url>
{
"data": "Entry deleted",
"status": "success"
}
Parameters
action : delete
key : Entry key
store : Store Name (Default 'default')
Return value
data : Message
status : Opeation status
You can retrieve a list of stored keys.
% curl -X POST -d '{"accesskey":"<accesskey>", "secret":"<secretkey>", "component":"kvs", "action":"keys","filter":"key",store":"kvs1"}' https://<endpoint url>
{
"data": [
{
"id": "key1",
"registeredAt": "2026-01-29T07:39:51.000394Z",
"updatedAt": "2026-01-29T07:39:51.000394Z"
}
],
"status": "success"
}
Parameters
action : keys
store : Store Name (Default 'default')
filter : filtering keys (optional)
Return value
data : An array containing a list of keys
status : Opeation status
Note :
*1 Each CRUD operation on KVS consumes a KVS request as a quota.
*2 Floating-point numbers contained in values that can be represented as integers (such as 1.0 or 2.0) are automatically converted and stored as int type.