Union¶
Description¶
This operation creates a union of unique values from the specified sets. A union is a set made by combining unique elements of two or more sets.
Method¶
POST
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/action/union
where:
Argument | Description |
---|---|
[hive-name] |
Name of a hive where the operation is performed. |
Request Headers¶
Content-Type:application/json
where:
Argument | Description |
---|---|
Content-Type |
Must be set to application/json . This header is mandatory. |
Request Body¶
The request body must be a JSON array containing string values that identify the names of the specified sets:
["setname_1", "setname_2", ...]
Response Body¶
A JSON array of unique values found in specified sets. Every element can be of any JSON data type.
Example¶
The example below returns unique values found in the following sets: "cars"
and "cars_2"
.
curl --location --request POST "https://xxxx.backendless.app/api/hive/transport/set/action/union" \--header 'Content-Type: application/json' \--data-raw '["cars", "cars_2"]']
where:
Argument | Description |
---|---|
transport |
Name of a hive where the operation is performed. |
["cars", "cars_2"] |
An array of key names each identifying a set containing multiple values. |
Contents Of Specified Sets
Response
The output will look as shown below after this operation runs.
Codeless Reference¶
where:
Argument | Description |
---|---|
hive name |
Name of a hive where the operation is performed. |
key names |
A list containing key names identifying unique sets. |
Returns a list of identical values derived from multiple sets.
Consider the following Set storage:
The example below returns unique values found in the following sets: 'cars'
and 'cars_2'
.
The output will look as shown below after the Codeless logic runs.