Skip to content

Get Key Names


This operation retrieves key names from a specific store type. Key names are retrieved with paging, the default page size is 10,000 items. The operation supports filtering, where the returned key names match the specified pattern.


Backendless.Hive(hiveName).StoreType().keys(name, filterPattern, cursor, pageSize);


Argument                Description
hiveName Name of a hive where the operation is performed. String value.
StoreType This placeholder must be substituted with one of the following stores types: KeyValueStore, ListStore, MapStore, SetStore, SortedSetStore.

Return Value

An object with the following structure:

  "keys": [  
  "cursor": "182"  

The cursor value of "0" in the response indicates that you have reached the end of the store and there are no keys left to return. In some cases you can get more keys than specified in the pageSize parameter.


The example below may return up to six key names from the key-value store, since the pageSize parameter is set to 6.

Backendless.Hive("groceryStore").KeyValueStore().keys( "*", "0", 6 );


Argument                Description
"groceryStore" Name of a hive where the operation is performed.


    "keys": [  
    "cursor": "185"  

Codeless Reference



Argument                Description
hive name Name of a hive where the operation is performed.
type Storage type, can be one of the following: Key / Value, Sorted Set, Set, Map, List.
filter pattern A pattern to filter the keys with. Only the keys matching the pattern will be returned by the operation
page size Identifies the number of keys to return in the response. Operation may return up to the specified number of key names. Refer to the section above for more information.
cursor A value received in the response of a prior call of the same block. Refer to the section above for more information.

Returns an object containing key names and the cursor position.

Consider the following Key Value storage:


The example below retrieves the key names from the key-value storage:

The output will look as shown below after the Codeless logic runs.