The "describeValues" action takes one or more keys and retrieves their previously stored values. The server looks up each key you specify. A key is case sensitive and must exactly match the key you used to store the value.
The response includes matching key-value pairs in the "keyValuePairs" property. It includes keys it could not find in the "unmatchedKeys" property. It does not return an error. Each key-value pair also includes the following information: the key without its hierarchy, its creation date, last modified date, and the username of the account that last modified it.
This action returns the "keyWithoutHierarchy" property, which contains the leaf part of a hierarchical key. For example, given the key "myApp/queries/My Favorite" and a hierarchical delimiter of "/", the leaf part of the key is "My Favorite". This action uses the "hierarchyDelimiter" property to define the hierarchical delimiter so it can populate the "keyWithoutHierarchy" property.
How to use "describeValues"
Use the "keyStore" property to specify the keystore from which keys are returned. In the "keys" property, include one or more key strings.
When using the "role" keystore, you must set the "roleName" property to the name of the role that owns the key-value pair. The action returns an error when the current user does not have the specified role. An administrator account may set and get values for any role.
When using the "user" keystore, the action automatically uses the session's username to identify the user's keys. When an administrator account runs the action, it can optionally use the "username" property to specify the user that owns the keys. This allows an elevated account to retrieve keys for other accounts.
If the response contains "errorCode": 0, then the request succeeded. The "keyValuePairs" property in the response contains an array of key-value pair objects: one for each matching key. The "unmatchedKeys" property in the response contains an array of key strings: one for each unmatched key.
No additional information is included in the response to optimize network communication speed. If there is an error, the "errorMessage" property describes the problem.
Use the optional "hierarchyDelimiter" property to define a string, such as the forward slash character /, to delimit hierarchical levels in the key. It defaults to the empty string "", which causes the API to put no value in the "keyWithoutHierarchy" property. If you set it to a string, the action populates the "keyWithoutHierarchy" property, which contains the key's text following the last occurrence of the hierarchy delimiter. For example, given the key, "myApp/queries/My Favorite", the "keyWithoutHierarchy" property contains "My Favorite".
A key without its hierarchy is useful when an application lets users save items with user-defined names. The application can use the key-value API to store these items. To organize these items, the application typically creates a key like "myApp/queries/My Favorite". It uses a fixed hierarchical value at the beginning of the key, such as "myApp/queries/" and assigns the remainder of the key to the user-defined name for the item, such as "My Favorite". The "keyWithoutHierarchy" property contains the user-defined name.
Request examples
Global keystore
{
"api": "db",
"action": "describeValues",
"params": {
"keyStore": "global",
"keys": [
"myKey",
"myApp/queries/My Favorite"
],
"hierarchyDelimiter": "/"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}Role keystore
The action uses the specified role and returns an error if the current session's account does not have that role. An administrator account may describe key-value pairs for any role.
{
"api": "db",
"action": "describeValues",
"params": {
"keyStore": "role",
"roleName": "operator",
"keys": [
"myKey"
],
"hierarchyDelimiter": "/"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
User keystore
The action automatically uses the session's username.
{
"api": "db",
"action": "describeValues",
"params": {
"keyStore": "user",
"keys": [
"nonExistentKey"
],
"hierarchyDelimiter": "/"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
User keystore using elevated privileges
When an administrator account runs the action, it can optionally use the "username" property to specify the account of the key-value pair. This allows an elevated account to retrieve key-value pairs for other accounts.
{
"api": "db",
"action": "describeValues",
"params": {
"keyStore": "user",
"username": "someone_else",
"keys": [
"myKey"
],
"hierarchyDelimiter": "/"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Response examples
Global keystore
{
"result": {
"keyStore": "global",
"hierarchyDelimiter": "/",
"keyValuePairDetails": [
{
"key": "myKey",
"value": {"my": "value"},
"keyWithoutHierarchy": "myKey",
"username": "some_user",
"createdTimestamp": "2025-09-04T15:35:21.014",
"updatedTimestamp": "2025-09-04T15:35:21.014"
},
{
"key": "myApp/queries/My Favorite",
"value": {"savedQuery": "favorite = 1"},
"keyWithoutHierarchy": "My Favorite",
"username": "some_user",
"createdTimestamp": "2025-09-04T15:35:21.014",
"updatedTimestamp": "2025-09-04T15:35:21.014"
}
],
"unmatchedKeys": []
},
"authToken": "replaceWithAuthTokenFromCreateSession",
"errorCode": 0,
"errorMessage": ""
}Role keystore
{
"result": {
"keyStore": "role",
"roleName": "operator",
"username": "me",
"hierarchyDelimiter": "/",
"keyValuePairDetails": [
{
"key": "myKey",
"value": 1,
"keyWithoutHierarchy": "myKey",
"username": "some_user",
"createdTimestamp": "2025-09-04T15:35:21.014",
"updatedTimestamp": "2025-09-04T15:35:21.014"
}
],
"unmatchedKeys": []
},
"authToken": "replaceWithAuthTokenFromCreateSession",
"errorCode": 0,
"errorMessage": ""
}User keystore
When the requested key does not exist, "keyValuePairDetails" is empty, but "unmatchedKeys" contains it.
{
"result": {
"keyStore": "user",
"username": "me",
"hierarchyDelimiter": "/",
"keyValuePairDetails": [],
"unmatchedKeys": [
"nonExistentKey"
]
},
"authToken": "replaceWithAuthTokenFromCreateSession",
"errorCode": 0,
"errorMessage": ""
}
User keystore using elevated privileges
{
"result": {
"keyStore": "user",
"username": "someone_else",
"keyValuePairs": [
{
"key": "myKey",
"value": "someone_else_value"
"keyWithoutHierarchy": "myKey",
"username": "someone_else",
"createdTimestamp": "2025-09-04T15:35:21.014",
"updatedTimestamp": "2025-09-04T15:35:21.014"
}
],
"unmatchedKeys": []
},
"authToken": "replaceWithAuthTokenFromCreateSession",
"errorCode": 0,
"errorMessage": ""
}
Properties
Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
hierarchyDelimiter |
The
The
|
Optional with default of ""
|
string | 1 byte |
keys |
The "keys" property contains an array of keys for an action to work on and return, such as [ "key1", "key2" ]. |
Required - No default value | array of strings | one or more key strings |
keyStore |
The
|
Required - No default value | string enum |
|
roleName |
The
|
Required when "keystore": "role"
|
string | 1 to 64 bytes |
username |
The
In
In Key-Value actions, the
|
Required - No default value
Optional with default of the account name of the currently logged-in user for Key-Value actions
|
string | 1 to 64 bytes |
Response properties ("result")
| Property | Description | Type | Limits (inclusive) |
|---|---|---|---|
hierarchyDelimiter |
The
The
|
string | 1 byte |
keyStore |
The
|
string enum |
|
keyValuePairDetails |
The
|
array of objects | |
|
keyValuePairDetails .createdTimestamp |
The "createdTimestamp" property is the date and time when something, such as a thing or key, was originally created in ISO 8601 format, such as "2025-08-28T10:47:13.041". It is never null. |
timestamp | An ISO 8601 timestamp |
|
keyValuePairDetails .key |
The "key" property is part of an optional key-value object that is defined in an array in the "userProperties" property. It is a user-defined string value. |
string | 1 to 128 bytes |
|
keyValuePairDetails .keyWithoutHierarchy |
The
|
string | 1 to 128 bytes |
|
keyValuePairDetails .updatedTimestamp |
The "updatedTimestamp" property is the date and time when the thing was last updated. It is the same as the "createdTimestamp" property when the thing has never been updated. It is returned in ISO 8601 format, such as "2025-08-28T10:47:13.041". |
timestamp | ISO 8601 timestamp |
|
keyValuePairDetails .username |
The It is required by the All API actions are performed in the context of the account identified by In JSON DB API and JSON Hub API, use the Unlike other property names, such as A zero-length username is invalid.
In Key-Value actions, the
|
string
|
1 to 64 bytes |
|
keyValuePairDetails .value |
The
When you use the
In Key-Value actions, the |
JSON | 0 to 65,500 bytes |
keyValuePairs |
The "keyValuePairs" property contains an array of objects. Each object represents a key-value pair and contains "key" and "value" properties, such as { "key": "k1", "value": 1 }. |
array of key-value objects | |
|
keyValuePairs .createdTimestamp |
The "createdTimestamp" property is the date and time when something, such as a thing or key, was originally created in ISO 8601 format, such as "2025-08-28T10:47:13.041". It is never null. |
timestamp | An ISO 8601 timestamp |
|
keyValuePairs .key |
The "key" property is part of an optional key-value object that is defined in an array in the "userProperties" property. It is a user-defined string value. |
string | 1 to 128 bytes |
|
keyValuePairs .keyWithoutHierarchy |
The
|
string | 1 to 128 bytes |
|
keyValuePairs .updatedTimestamp |
The "updatedTimestamp" property is the date and time when the thing was last updated. It is the same as the "createdTimestamp" property when the thing has never been updated. It is returned in ISO 8601 format, such as "2025-08-28T10:47:13.041". |
timestamp | ISO 8601 timestamp |
|
keyValuePairs .username |
The It is required by the All API actions are performed in the context of the account identified by In JSON DB API and JSON Hub API, use the Unlike other property names, such as A zero-length username is invalid.
In Key-Value actions, the
|
string
|
1 to 64 bytes |
|
keyValuePairs .value |
The
When you use the
In Key-Value actions, the |
JSON | 0 to 65,500 bytes |
roleName |
The
|
string | 1 to 64 bytes |
unmatchedKeys |
The
|
array of strings | zero or more key strings |
username |
The It is required by the All API actions are performed in the context of the account identified by In JSON DB API and JSON Hub API, use the Unlike other property names, such as A zero-length username is invalid.
In Key-Value actions, the
|
string
|
1 to 64 bytes |