Creating properties

Properties are defined in the Mapping dashboard. A property consist of an editable name and a value that is defined using the Formula editor.

Properties in Request units

In Request units, you define properties for the following types of parameters:

  • header parameters: defines the metadata associated with the request

  • path parameters: defines parameters which are part of the path and before the ? question mark. They are set off by { } curly braces and are not optional. If path parameters have been defined when creating the endpoint, they will appear here.

  • query string parameters: defines the parameters appearing after the ? question mark. They are usually associated with a search request.

Properties in data source units

In data source units, the properties are defined in the Edit Data Source page for a data source and cannot be modified in the Mapping dashboard.

Properties in Flow units

In Flow units, properties are created either by using existing properties from a data source or by creating new properties.

Properties in Endpoint units

In Endpoint units, you define response properties for the following types of parameters:

  • body parameters: Defines the response body

  • header parameters: Define the metadata associated with the response

  • status parameters: Parameter that Indicates the status of the response

Nested properties (for example, objects in objects, arrays in arrays, objects in arrays) are allowed only in Flow and Endpoint units. Request units do not allow nesting.

Example

Let's say we want to create an array in the endpoint body called "sensor-data". We want this array to consists of its location, a data set and a timestamp. location is a string literal. timestamp is an array. dataset is an array containing a list of objects that consist of three properties each.

{
"sensor-data": [
{
"timestamp": [
"LocalDateTime",
1600786944630
],
"dataset": [
{
"id": 1,
"type": "belt sensor",
"value": 1231
},
{
"id": 2,
"type": "feed sensor",
"value": 1232
},
{
"id": 3,
"type": "camera sensor",
"value": 1233
}
],
"location": "A101-abcd"
}
]
}

The following guides you through the steps to create this in the Mapping dashboard.

Do not include the double-quotes shown in property names below.

Within the body object, create the "sensor-data" array:

  • Expand the body object.

  • Enter a name in the New Property field, then select a property type. In this case we select Array.

In the "sensor-data" array, create three items: "timestamp", "dataset" and "location".

"timestamp"

  1. Create the property "timestamp" and select Literal.

  2. Open the Formula editor and enter the Axel-f function NOW().

  3. Leave the data type as any.

timestamp property

"location"

  1. Create the property "location" and select Literal.

  2. Open the Formula editor and enter the value "A101-abcd".

  3. Change the data type to string.

location property

"dataset"

  1. Create the property "dataset" and select Array.

  2. Create three objects in this array called "object1", "object2", "object3".

  3. In each of the objects, create three properties:

    1. "id" and set the data type to integer.

    2. "type" and set the data type to string.

    3. "value" and set the value to number.

  4. For each of the properties, enter a value in the Formula editor as given in the code sample above.

dataset property

Remember to click Done to save your work. And that's it. We have created a set of properties for the response body in an Endpoint.

Completed properties