Skip to content

Get Key Items

Description

This operation returns all values from the specified set.

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]/set/[key]

where:

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

Request Headers

None.

Request Body

None.

Response Body

A JSON array containing set's values. Each individual value is of a JSON data type. Otherwise, returns an empty response body if the specified key does not exist.

Example

The example below returns all values from the cars set.

curl --location --request GET "https://xxxx.backendless.app/api/hive/transport/set/cars"

where:

Argument                Description
transport Name of a hive where the operation is performed.
cars Key name identifying a set.

Codeless Reference
set_api_get_key_items

where:

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

Returns a list containing set's values.

Consider the following Set storage:
set_api_example_all_blocks

The example below retrieves all items from the "cars" set:

set_api_example_get_key_items

The logic produces the following output:

set_api_example_get_key_items_2