The "describeValuesFromHierarchy" action retrieves all key-value pairs located at the specified hierarchical level. It returns keys, values, metadata, and the key without its hierarchy.
Use the "getKeysFromHierarchy" action to return only keys and use "getValuesFromHierarchy" to return only key-value pairs.
This action is useful for retrieving user-defined keys. For example, your application may let users create, name, and save items in keystores. When your application needs these items, it can use this action to retrieve them.
This action returns the "keyWithoutHierarchy" property, which contains the part of the key following the "partialKey" value. This property contains the user-defined name of an item. For example, given a key of "myApp/queries/My Favorite" and a partial key of "myApp/queries/", the key without the hierarchy is "My Favorite".
How to use "describeValuesFromHierarchy"
Use the required "keyStore" property to specify the keystore from which keys are returned, and use the required "partialKey" property to define the hierarchical level of those keys. To ensure the action matches the hierarchical levels you want, include the hierarchical delimiter at the end of the partial key, such as "myApp/queries/". Use "partialKey": "" to return all keys in the store.
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 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.
Request examples
Global keystore
{
"api": "db",
"action": "describeValuesFromHierarchy",
"params": {
"keyStore": "global",
"partialKey": "myApp/queries/",
"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 get key-value pairs for any role.
{
"api": "db",
"action": "describeValuesFromHierarchy",
"params": {
"keyStore": "role",
"roleName": "operator",
"partialKey": "myApp/queries/",
"hierarchyDelimiter": "/"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
User keystore
The action automatically uses the session's username.
{
"api": "db",
"action": "describeValuesFromHierarchy",
"params": {
"keyStore": "user",
"partialKey": "nonexistent/hierarchy/",
"hierarchyDelimiter": "/"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
User keystore request 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 get key-value pairs for other accounts.
{
"api": "db",
"action": "describeValuesFromHierarchy",
"params": {
"keyStore": "user",
"username": "someone_else",
"partialKey": "myApp/queries/",
"hierarchyDelimiter": "/"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Response examples
Global keystore
{
"result": {
"keyStore": "global",
"hierarchyDelimiter": "/",
"partialKey": "myApp/queries/",
"keyValuePairDetails": [
{
"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"
},
{
"key": "myApp/queries/Find Errors",
"value": {"savedQuery": "error = 1"},
"keyWithoutHierarchy": "Find Errors",
"username": "some_user",
"createdTimestamp": "2025-09-04T15:35:21.014",
"updatedTimestamp": "2025-09-04T15:35:21.014"
}
]
},
"authToken": "replaceWithAuthTokenFromCreateSession",
"errorCode": 0,
"errorMessage": ""
}
Role keystore
{
"result": {
"keyStore": "role",
"roleName": "operator",
"partialKey": "myApp/queries/",
"hierarchyDelimiter": "/",
"keyValuePairDetails": [
{
"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"
}
]
},
"authToken": "replaceWithAuthTokenFromCreateSession",
"errorCode": 0,
"errorMessage": ""
}
User keystore
When the partial key has no matches, "keyValuePairDetails" is empty.
{
"result": {
"keyStore": "user",
"username": "me",
"partialKey": "nonexistent/hierarchy/",
"hierarchyDelimiter": "/",
"keyValuePairDetails": []
},
"authToken": "replaceWithAuthTokenFromCreateSession",
"errorCode": 0,
"errorMessage": ""
}
User keystore response using elevated privileges
{
"result": {
"keyStore": "user",
"username": "someone_else",
"partialKey": "myApp/queries/",
"hierarchyDelimiter": "/",
"keyValuePairDetails": [
{
"key": "myApp/queries/My Favorite",
"value": {"savedQuery": "favorite = 1"},
"keyWithoutHierarchy": "My Favorite",
"username": "someone_else",
"createdTimestamp": "2025-09-04T15:35:21.014",
"updatedTimestamp": "2025-09-04T15:35:21.014"
}
]
},
"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 |
keyStore |
The
|
Required - No default value | string enum |
|
partialKey |
The |
Optional with default of Required in the Key-Value API |
string or array |
1 or more strings/arrays 1 to 128 bytes in the Key-Value API |
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 |
partialKey |
The
String "partialKey": "Mi" Array (multi-field) "partialKey": [ "2023-01-01", true, "full string", -3.4, "TWk=" ] In the Key-Value API, the
|
string or array |
1 or more strings/arrays 1 to 128 bytes in the Key-Value API |
roleName |
The
|
string | 1 to 64 bytes |
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 |