Skip to main content

KV_GET

Get one or multiple keys.

ParamTypeMeaningRequired
keysarrayArray of keys to retrieveY

Response

KV_GET_RSP

ParamTypeMeaning
keysobjectThe keys and values requested

If a key does not exist it is ignored and not present in the response.

Possible status values:

  • ParamMissing
  • ValueTypeInvalid

See the response status for status values.

Examples

Various Types

{
"KV_SET":
{
"keys":
{
"user_1_name":"John",
"user_1_dob":638236800000,
"user_1_access":
[
{
"location":"Secret Lab",
"lastEntry":1711275303000
},
{
"location":"Server Room",
"lastEntry":1711034103000
}
],
"user_1_account":
{
"enabled":true,
"creditBalance":34.50
}
}
}
}
Request string and array keys
{
"KV_GET":
{
"keys":["user_1_name", "user_1_access"]
}
}
Response
{
"KV_GET_RSP":
{
"st": 1,
"keys":
{
"user_1_name": "John",
"user_1_access":
[
{
"location": "Secret Lab",
"lastEntry": 1711275303000
},
{
"location": "Server Room",
"lastEntry": 1711034103000
}
]
}
}
}

Key Does Not Exist

key user_1_dontexist does not exist
{
"KV_GET":
{
"keys":["user_1_name", "user_1_dontexist"]
}
}
Only keys that exist are in the response
{
"KV_GET_RSP":
{
"keys":
{
"user_1_name": "John"
}
}
}