Skip to main content

KV_CONTAINS

Check if a key exists.

ParamTypeMeaningRequired
keysarrayKey to checkY
{
"KV_CONTAINS":
{
"keys":["user", "access", "IDontExist"]
}
}

Response

KV_CONTAINS_RSP

ParamTypeMeaning
stunsigned intStatus
containsarrayArray of key names that do exist

If a key does not exist, it is not present in contains.


Possible status values:

  • Ok
  • ParamMissing
  • ValueTypeInvalid

See the response status page for status values.

Only user and access exist
{
"KV_CONTAINS":
{
"keys":["user", "access", "nothere"]
}
}
Key nothere does not exist
{
"KV_CONTAINS_RSP":
{
"st": 1,
"contains":["user", "access"]
}
}