Skip to content

Get All Key-Values

Description

This operation returns all key-value pairs 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]

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 object containing key-value pairs retrieved from the map.  If no items exist in the map, the returned JSON object is empty.

Example

The example below returns all key-value pairs from the shoppingCart map.

curl --location --request GET "https://xxxx.backendless.app/api/hive/marketplace/map/shoppingCart"

where:

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

Response Example

{  
    "t-shirt": 10.99,  
    "shoes": 45.99  
}

Codeless Reference

codeless-get-key-values

where:

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

Returns an object containing key-value pairs retrieved from the map.

Consider the following Map storage:
map_apI_example_map_store

The example below retrieves all key-value pairs from the "fruits" map.

map_api_example_get_all_key_values

The logic produces the following output:

get-all-keys-values-output