Skip to content

Get All Keys Names

Description

This operation returns all key names from a map.

Method

GET

Endpoint URL

Important

Make sure to replace xxxx in the domain name in the request specification below to the one assigned to your application.

https://xxxx.backendless.app/api/hive/[hive-name]/map/[key]/keys

where:

Argument                Description
[hive-name] Name of a hive where the operation is performed.
[key] Key name identifying a map.

Request Headers

None.

Request Body

None.

Response Body

A JSON array consisting of key names as string values. If the map does not contain any keys, then an empty array is returned.

Example

The example below returns all keys from fruits map.

curl --location --request GET "https://xxxx.backendless.app/api/hive/groceryStore/map/fruits/keys"

where:

Argument                Description
groceryStore Name of a hive where the operation is performed.
fruits Key name identifying a map.

Response Example

[  
    "Oranges",  
    "Apples",  
    "Grapes"  
]

Codeless Reference

map_api_get_all_keys

where:

Argument                Description
hive name Name of a hive where the operation is performed.
key name Key name identifying a map.

Returns a list consisting of key names as string values.

Consider the following Map storage:
map_apI_example_map_store

The example below gets all keys from the "fruits" map:

map_api_example_get_all_keys

The logic produces the following output:

get-key-names-response