KV_CONTAINS
Check if a key exists.
Param | Type | Meaning | Required |
---|---|---|---|
keys | array | Key to check | Y |
{
"KV_CONTAINS":
{
"keys":["user", "access", "IDontExist"]
}
}
Response
KV_CONTAINS_RSP
Param | Type | Meaning |
---|---|---|
st | unsigned int | Status |
contains | array | Array 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"]
}
}