# Stream Processing API's
Local Base URL: `http://localhost:4000`
## List Nodes
URL: `/stream_process/list_nodes`
HTTP method: `GET`
Response:
```json=
{
"nodes": [
"category": "action",
"display_name": "init",
"info": "Placeholder action from where the pipeline will start.",
"input_fields": {},
"input_port_present": false,
"multiple_in_ports": false,
"multiple_out_ports": false,
"output_port_present": true,
"type": "init"
},
{
"category": "action",
"display_name": "conditional",
"info": "Computes arbitrary javascript function to compute a predicate.",
"input_fields": {
"code": {
"display_name": "Code",
"field": "code",
"field_info": "",
"field_type": "javascript_code"
},
"name": {
"display_name": "Name",
"field": "name",
"field_info": "",
"field_type": "text"
}
},
"input_port_present": true,
"multiple_in_ports": false,
"multiple_out_ports": true,
"output_port_present": true,
"type": "condition"
},
{
"category": "action",
"display_name": "transform",
"info": "Computes arbitrary javascript function to transform the event.",
"input_fields": {
"code": {
"display_name": "Code",
"field": "code",
"field_info": "",
"field_type": "javascript_code"
},
"name": {
"display_name": "Name",
"field": "name",
"field_info": "",
"field_type": "text"
}
},
"input_port_present": true,
"multiple_in_ports": false,
"multiple_out_ports": false,
"output_port_present": true,
"type": "transform"
},
{
"category": "action",
"display_name": "write time series",
"info": " Write time series action allows pipeline to write information by 'keys' (that act like columns).",
"input_fields": {
"key": {
"display_name": "Key",
"field": "key",
"field_info": "",
"field_type": "text"
},
"name": {
"display_name": "Name",
"field": "name",
"field_info": "",
"field_type": "text"
},
"value": {
"display_name": "Read Path",
"field": "read_path",
"field_info": "",
"field_type": "text"
}
},
"input_port_present": true,
"multiple_in_ports": false,
"multiple_out_ports": false,
"output_port_present": false,
"type": "write_ts"
},
{
"category": "action",
"display_name": "read time series",
"info": "Fetch previous values that were written using write-ts action.",
"input_fields": {
"default": {
"display_name": "Default",
"field": "default",
"field_info": "",
"field_type": "text"
},
"destination": {
"display_name": "Destination",
"field": "destination",
"field_info": "",
"field_type": "text"
},
"key": {
"display_name": "Key",
"field": "key",
"field_info": "",
"field_type": "text"
},
"name": {
"display_name": "Name",
"field": "name",
"field_info": "",
"field_type": "text"
},
"number": {
"display_name": "Number",
"field": "number",
"field_info": "",
"field_type": "number"
},
"operator": {
"display_name": "Operator",
"field": "operator",
"field_info": "",
"field_type": "dropdown",
"options": [
{
"name": "Last",
"value": ""
},
{
"name": "Latest",
"value": "latest"
}
]
}
},
"input_port_present": true,
"multiple_in_ports": false,
"multiple_out_ports": false,
"output_port_present": true,
"type": "read_ts"
},
{
"category": "action",
"display_name": "invoke webhook",
"info": "Make an HTTP call to an external service. The HTTP response is saved at destination of the event.",
"input_fields": {
"body": {
"display_name": "Body",
"field": "body",
"field_info": "",
"field_type": "text"
},
"destination": {
"display_name": "Destination",
"field": "destinaton",
"field_info": "",
"field_type": "text"
},
"headers": {
"display_name": "Headers",
"field": "headers",
"field_info": "",
"field_type": "json_text"
},
"method": {
"display_name": "HTTP Method",
"field": "method",
"field_info": "",
"field_type": "dropdown",
"options": [
{
"name": "PUT",
"value": "put"
},
{
"name": "POST",
"value": "post"
},
{
"name": "PATCH",
"value": "patch"
},
{
"name": "GET",
"value": "get"
}
]
},
"name": {
"display_name": "Name",
"field": "name",
"field_info": "",
"field_type": "text"
},
"url": {
"display_name": "URL",
"field": "url",
"field_info": "",
"field_type": "text"
}
},
"input_port_present": true,
"multiple_in_ports": false,
"multiple_out_ports": false,
"output_port_present": true,
"type": "webhook"
},
{
"category": "action",
"display_name": "save",
"info": "Saves the event to default storage",
"input_fields": {
"name": {
"display_name": "Name",
"field": "name",
"field_info": "",
"field_type": "text"
}
},
"input_port_present": true,
"multiple_in_ports": false,
"multiple_out_ports": false,
"output_port_present": false,
"type": "save"
},
{
"category": "action",
"display_name": "switch",
"info": "Allows multiple branching predicates on the event.",
"input_fields": {
"match_all": {
"display_name": "Match All",
"field": "match_all",
"field_info": "",
"field_type": "toggle"
},
"name": {
"display_name": "Name",
"field": "name",
"field_info": "",
"field_type": "text"
},
"predicates": {
"display_name": "Predicates",
"field": "predicates",
"field_info": "",
"field_type": "list",
"properties": {
"entity_ids": {
"display_name": "Entity Ids",
"field": "entity_ids",
"field_info": "",
"field_type": "list"
},
"name": {
"display_name": "Entity Name",
"field": "name",
"field_info": "",
"field_type": "text"
},
"entity_type": {
"display_name": "Entity Type",
"field": "entity_type",
"field_info": "",
"field_type": "radio_button",
"options": [
{
"name": "Gatweway",
"value": "gateway"
},
{
"name": "Asset",
"value": "asset"
}
]
}
}
}
},
"input_port_present": true,
"multiple_in_ports": false,
"multiple_out_ports": true,
"output_port_present": true,
"type": "switch"
},
{
"category": "action",
"display_name": "orignator metadata",
"info": "Fetches full metadata of originator.",
"input_fields": {
"destination": {
"display_name": "Destination",
"field": "destination",
"field_info": "",
"field_type": "text"
},
"name": {
"display_name": "Name",
"field": "name",
"field_info": "",
"field_type": "text"
}
},
"input_port_present": true,
"multiple_in_ports": false,
"multiple_out_ports": false,
"output_port_present": true,
"type": "originator_metadata"
},
{
"category": "action",
"display_name": "read previous event",
"info": "Fetch previous event of the 'current' originator.",
"input_fields": {
"destination": {
"display_name": "Destination",
"field": "destination",
"field_info": "",
"field_type": "text"
},
"name": {
"display_name": "Name",
"field": "name",
"field_info": "",
"field_type": "text"
}
},
"input_port_present": true,
"multiple_in_ports": false,
"multiple_out_ports": false,
"output_port_present": true,
"type": "read_previous_event"
}
]
}
```
----
## Create Pipeline
URL: `/stream_process/:project_id/pipelines`
HTTP method: `POST`
Request Payload:
```json=
{
"name": "Simple Pipeline",
"description": "Simple Pipeline",
"actions": {
"0": {
"type": "init",
"name": "Init",
"config": {},
"layout": {},
"out_links": [
{
"from": 0,
"to": 1,
"label": "",
"layout": {}
}
]
},
"1": {
"type": "save",
"name": "Save",
"config": {},
"layout": {},
"out_links": []
}
}
}
```
Response Payload:
```json=
{
"actions": [
{
"config": {},
"id": "a4126960-8b76-4519-9c77-1608eab7b090",
"name": "Init",
"out_links": [
{
"from_id": "a4126960-8b76-4519-9c77-1608eab7b090",
"label": null,
"layout": {},
"name": null,
"to_id": "646427e5-d2a8-48c8-b3f9-11e2a61634d1"
}
],
"type": "init"
},
{
"config": {},
"id": "646427e5-d2a8-48c8-b3f9-11e2a61634d1",
"name": "Save",
"out_links": [],
"type": "save"
}
],
"description": "Simple Pipeline",
"id": "21c3c197-f043-42c9-8751-687517792975",
"name": "Simple Pipeline"
}
```
Errors Response on Pipeline Create
```json=
{
"pipeline": {
"actions": [
{},
{
"config": [
"is invalid"
],
"type": [
"is invalid"
]
}
],
"name": [
"can't be blank"
]
}
}
```
-------
## Update Pipeline
URL: `/stream_process/:project_id/pipelines/:pipeline_id`
HTTP method: `PATCH`
Request Paylaod
```json
{
"name": "Updated Linear Pipeline",
"description": "Updated Linear Pipeline",
"id": "07f6d39e-9838-4f85-81a9-12c38a1609b5",
"actions": {
"0": {
"id": "7773e766-3c7e-44f4-909a-52ffca0ab158",
"type": "init",
"name": "Updated Init action",
"config": {},
"layout": {},
"out_links": [
{
"from": 0,
"to": 1,
"label": "",
"layout": {}
},
{
"from": 0,
"to": 2,
"label": "",
"layout": {}
}
]
},
"1": {
"id": "8143dd16-43ef-4836-bd11-3ff6cba857b5",
"type": "save",
"name": "Save Action",
"config": {},
"layout": {},
"out_links": []
},
"2": {
"id": "a960f676-ba4c-40a6-b4bf-b5a6c64d44f3",
"type": "write_ts",
"name": "Write time series",
"config": {
"key": "voltage_sensor",
"read_path": "data.voltage"
},
"layout": {},
"out_links": []
}
}
}
```
Response Payload
```json
{
"actions": [
{
"config": {},
"id": "7773e766-3c7e-44f4-909a-52ffca0ab158",
"name": "Updated Init action",
"out_links": [
{
"from_id": "7773e766-3c7e-44f4-909a-52ffca0ab158",
"label": null,
"layout": {},
"name": null,
"to_id": "8143dd16-43ef-4836-bd11-3ff6cba857b5"
},
{
"from_id": "7773e766-3c7e-44f4-909a-52ffca0ab158",
"label": null,
"layout": {},
"name": null,
"to_id": "a960f676-ba4c-40a6-b4bf-b5a6c64d44f3"
}
],
"type": "init"
},
{
"config": {},
"id": "8143dd16-43ef-4836-bd11-3ff6cba857b5",
"name": "Save Action",
"out_links": [],
"type": "save"
},
{
"config": {
"key": "voltage_sensor",
"read_path": "data.voltage"
},
"id": "a960f676-ba4c-40a6-b4bf-b5a6c64d44f3",
"name": "Write time series",
"out_links": [],
"type": "write_ts"
}
],
"description": "Updated Linear Pipeline",
"id": "07f6d39e-9838-4f85-81a9-12c38a1609b5",
"name": "Updated Linear Pipeline"
}
```
Sample Error Response for Update
```json
{
"pipeline": {
"actions": [
{
"has_errors": false,
"node_id": "0"
},
{
"has_errors": true,
"node_id": "1",
"type": [
"is invalid"
]
},
{
"config": {
"read_path": [
"can't be blank"
]
},
"has_errors": true,
"node_id": "2"
}
],
"name": [
"can't be blank"
]
}
}
```
-------
## Get Pipeline
URL: `/stream_process/:project_id/pipelines/:pipeline_id`
HTTP method: `GET`
API Response Payload
```json=
{
"actions": [
{
"config": {},
"id": "646427e5-d2a8-48c8-b3f9-11e2a61634d1",
"name": "Save",
"out_links": [],
"type": "save"
},
{
"config": {},
"id": "a4126960-8b76-4519-9c77-1608eab7b090",
"name": "Init",
"out_links": [
{
"from_id": "a4126960-8b76-4519-9c77-1608eab7b090",
"label": null,
"layout": {},
"name": null,
"to_id": "646427e5-d2a8-48c8-b3f9-11e2a61634d1"
}
],
"type": "init"
}
],
"description": "Simple Pipeline",
"id": "21c3c197-f043-42c9-8751-687517792975",
"name": "Simple Pipeline"
}
```
API Response payload when pipeline not found
```json=
{
"detail": "Either pipeline with this ID doesn't exists or you don't have access to it.",
"source": null,
"status_code": 404,
"title": "Invalid pipeline ID"
}
```
----
## List all pipelines of project
URL: `/stream_process/:project_id/pipelines/?page_number=1&page_size=10`
HTTP method: `GET`
API Response Payload
```json=
{
"page_number": 1,
"page_size": 10,
"pipelines": [
{
"description": "Simple Pipeline",
"id": "21c3c197-f043-42c9-8751-687517792975",
"name": "Simple Pipeline"
}
],
"total_entries": 1,
"total_pages": 1
}
```
----
## Delete Pipeline
URL: `/stream_process/:project_id/pipelines/:pipeline_id`
HTTP method: `DELETE`
On successful delete of pipeline we ge no response payload and response HTTP status code is 204
API Response when pipeline not found
```json=
{
"detail": "Either pipeline with this ID doesn't exists or you don't have access to it.",
"source": null,
"status_code": 404,
"title": "Invalid pipeline ID"
}
```
## List Gateways
URL: `/stream_process/:project_id/gateways?page_number=1&page_size=25`
HTTP method: `GET`
API Response
```json=
{
"gateways": [
{
"channel": "http",
"id": 1,
"name": "Stream Processing Gateway"
}
],
"page_number": 1,
"page_size": 25,
"total_entries": 1,
"total_pages": 1
}
```
## List Assets
URL: `/stream_process/:project_id/assets`
HTTP method: `GET`
API Response
```json=
{
"entities": [
{
"archived": false,
"description": null,
"entities": [
{
"asset_type": {
"description": "This is seeded asset type",
"id": 1,
"metadata": [],
"name": "Asset Type",
"org_id": 1,
"parameters": [],
"project_id": 1,
"sensor_type_present": false,
"sensor_type_uuid": null,
"slug": "Asset-Type",
"uuid": "3a1a894c687511eca5788c47be40470d"
},
"asset_type_id": 1,
"creator_id": 1,
"description": null,
"entities": [
{
"asset_type": {
"description": "This is seeded asset type",
"id": 1,
"metadata": [],
"name": "Asset Type",
"org_id": 1,
"parameters": [],
"project_id": 1,
"sensor_type_present": false,
"sensor_type_uuid": null,
"slug": "Asset-Type",
"uuid": "3a1a894c687511eca5788c47be40470d"
},
"asset_type_id": 1,
"creator_id": 1,
"description": null,
"entities": [
{
"entities": [
{
"data_type": "string",
"id": "7a76c5e9-75b3-4388-9470-573340e604d2",
"name": "Voltage",
"type": "SensorParameter",
"unit": null,
"uuid": "3a37cb9c687511ec8b3e8c47be40470d"
},
{
"data_type": "string",
"id": "1205aebd-f5fd-480b-8f8b-1447132fc622",
"name": "Current",
"type": "SensorParameter",
"unit": null,
"uuid": "3a37d92a687511ecb7ab8c47be40470d"
},
{
"data_type": "string",
"id": "4e3b161f-3853-42ad-ba22-3f2cbc5c4de5",
"name": "Power",
"type": "SensorParameter",
"unit": null,
"uuid": "3a37e488687511eca4dc8c47be40470d"
},
{
"data_type": "string",
"id": "bad271ac-08bc-4751-8cde-f9e4ec60f7b1",
"name": "Energy",
"type": "SensorParameter",
"unit": null,
"uuid": "3a37f126687511ecae718c47be40470d"
}
],
"id": 1,
"metadata": [],
"name": "Energy Meter",
"parent_id": 2,
"parent_type": "Asset",
"sensor_type": {
"description": null,
"generated_by": "user",
"id": 1,
"metadata": [],
"name": "Sensor Type 0",
"org_id": 1,
"parameters": [
{
"data_type": "string",
"id": "7a76c5e9-75b3-4388-9470-573340e604d2",
"name": "Voltage",
"unit": null,
"uuid": "3a37cb9c687511ec8b3e8c47be40470d"
},
{
"data_type": "string",
"id": "1205aebd-f5fd-480b-8f8b-1447132fc622",
"name": "Current",
"unit": null,
"uuid": "3a37d92a687511ecb7ab8c47be40470d"
},
{
"data_type": "string",
"id": "4e3b161f-3853-42ad-ba22-3f2cbc5c4de5",
"name": "Power",
"unit": null,
"uuid": "3a37e488687511eca4dc8c47be40470d"
},
{
"data_type": "string",
"id": "bad271ac-08bc-4751-8cde-f9e4ec60f7b1",
"name": "Energy",
"unit": null,
"uuid": "3a37f126687511ecae718c47be40470d"
}
],
"project_id": 1,
"slug": "uvLuXSu-llwg",
"uuid": "3a37ff72687511ec9a168c47be40470d"
},
"sensor_type_id": 1,
"type": "Sensor"
},
{
"entities": [
{
"data_type": "string",
"id": "95026027-4afd-4cbe-a6c7-63b184503c79",
"name": "x_axis vel",
"type": "SensorParameter",
"unit": null,
"uuid": "3a406194687511ecae728c47be40470d"
},
{
"data_type": "string",
"id": "12224da8-ad71-4dca-a5d7-176f986103a9",
"name": "z_axis vel",
"type": "SensorParameter",
"unit": null,
"uuid": "3a406ff4687511ec95b48c47be40470d"
},
{
"data_type": "string",
"id": "bbdab0fc-97c4-459d-8995-fe6854e70568",
"name": "x_axis acc",
"type": "SensorParameter",
"unit": null,
"uuid": "3a407ee0687511ec99c18c47be40470d"
},
{
"data_type": "string",
"id": "c0901536-a9f5-4d0f-b006-9c90a0bd3ec2",
"name": "z_axis acc",
"type": "SensorParameter",
"unit": null,
"uuid": "3a408d0e687511ec9fca8c47be40470d"
}
],
"id": 7,
"metadata": [],
"name": "Vibration Sensor",
"parent_id": 2,
"parent_type": "Asset",
"sensor_type": {
"description": null,
"generated_by": "user",
"id": 7,
"metadata": [],
"name": "Sensor Type 6",
"org_id": 1,
"parameters": [
{
"data_type": "string",
"id": "95026027-4afd-4cbe-a6c7-63b184503c79",
"name": "x_axis vel",
"unit": null,
"uuid": "3a406194687511ecae728c47be40470d"
},
{
"data_type": "string",
"id": "12224da8-ad71-4dca-a5d7-176f986103a9",
"name": "z_axis vel",
"unit": null,
"uuid": "3a406ff4687511ec95b48c47be40470d"
},
{
"data_type": "string",
"id": "bbdab0fc-97c4-459d-8995-fe6854e70568",
"name": "x_axis acc",
"unit": null,
"uuid": "3a407ee0687511ec99c18c47be40470d"
},
{
"data_type": "string",
"id": "c0901536-a9f5-4d0f-b006-9c90a0bd3ec2",
"name": "z_axis acc",
"unit": null,
"uuid": "3a408d0e687511ec9fca8c47be40470d"
}
],
"project_id": 1,
"slug": "ATLTrE0tc-e",
"uuid": "3a409c5e687511ec82328c47be40470d"
},
"sensor_type_id": 7,
"type": "Sensor"
}
],
"id": 2,
"mapped_parameters": [
{
"name": "Voltage",
"parameter_uuid": "3a37cb9c687511ec8b3e8c47be40470d",
"sensor_type_uuid": "3a37ff72687511ec9a168c47be40470d",
"sensor_uuid": "3a39ee7c687511ecb6a88c47be40470d"
},
{
"name": "Current",
"parameter_uuid": "3a37d92a687511ecb7ab8c47be40470d",
"sensor_type_uuid": "3a37ff72687511ec9a168c47be40470d",
"sensor_uuid": "3a39ee7c687511ecb6a88c47be40470d"
},
{
"name": "Power",
"parameter_uuid": "3a37e488687511eca4dc8c47be40470d",
"sensor_type_uuid": "3a37ff72687511ec9a168c47be40470d",
"sensor_uuid": "3a39ee7c687511ecb6a88c47be40470d"
},
{
"name": "Energy",
"parameter_uuid": "3a37f126687511ecae718c47be40470d",
"sensor_type_uuid": "3a37ff72687511ec9a168c47be40470d",
"sensor_uuid": "3a39ee7c687511ecb6a88c47be40470d"
},
{
"name": "x_axis vel",
"parameter_uuid": "3a406194687511ecae728c47be40470d",
"sensor_type_uuid": "3a409c5e687511ec82328c47be40470d",
"sensor_uuid": "3a410054687511ecb7b48c47be40470d"
},
{
"name": "z_axis vel",
"parameter_uuid": "3a406ff4687511ec95b48c47be40470d",
"sensor_type_uuid": "3a409c5e687511ec82328c47be40470d",
"sensor_uuid": "3a410054687511ecb7b48c47be40470d"
},
{
"name": "x_axis acc",
"parameter_uuid": "3a407ee0687511ec99c18c47be40470d",
"sensor_type_uuid": "3a409c5e687511ec82328c47be40470d",
"sensor_uuid": "3a410054687511ecb7b48c47be40470d"
},
{
"name": "z_axis acc",
"parameter_uuid": "3a408d0e687511ec9fca8c47be40470d",
"sensor_type_uuid": "3a409c5e687511ec82328c47be40470d",
"sensor_uuid": "3a410054687511ecb7b48c47be40470d"
}
],
"metadata": [],
"name": "Wet Process",
"parent_id": 1,
"properties": [
"voltage",
"current",
"power",
"x_axis_vel",
"z_axis_vel",
"x_axis_acc"
],
"type": "Asset"
},
{
"asset_type": {
"description": "This is seeded asset type",
"id": 1,
"metadata": [],
"name": "Asset Type",
"org_id": 1,
"parameters": [],
"project_id": 1,
"sensor_type_present": false,
"sensor_type_uuid": null,
"slug": "Asset-Type",
"uuid": "3a1a894c687511eca5788c47be40470d"
},
"asset_type_id": 1,
"creator_id": 1,
"description": null,
"entities": [
{
"entities": [
{
"data_type": "string",
"id": "e6c857af-a4aa-4eb2-a1e9-91f34c12e7c1",
"name": "Temperature",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3a8198687511ec866e8c47be40470d"
}
],
"id": 2,
"metadata": [],
"name": "Temperature Sensor",
"parent_id": 3,
"parent_type": "Asset",
"sensor_type": {
"description": null,
"generated_by": "user",
"id": 2,
"metadata": [],
"name": "Sensor Type 1",
"org_id": 1,
"parameters": [
{
"data_type": "string",
"id": "e6c857af-a4aa-4eb2-a1e9-91f34c12e7c1",
"name": "Temperature",
"unit": null,
"uuid": "3a3a8198687511ec866e8c47be40470d"
}
],
"project_id": 1,
"slug": "xerUBECsoLwE",
"uuid": "3a3a8e68687511eca0fa8c47be40470d"
},
"sensor_type_id": 2,
"type": "Sensor"
}
],
"id": 3,
"mapped_parameters": [
{
"name": "Temperature",
"parameter_uuid": "3a3a8198687511ec866e8c47be40470d",
"sensor_type_uuid": "3a3a8e68687511eca0fa8c47be40470d",
"sensor_uuid": "3a3af862687511eca62f8c47be40470d"
}
],
"metadata": [],
"name": "Dry Process",
"parent_id": 1,
"properties": [
"temperature"
],
"type": "Asset"
}
],
"id": 1,
"mapped_parameters": [],
"metadata": [],
"name": "Bintan Factory",
"parent_id": null,
"properties": [],
"type": "Asset"
},
{
"asset_type": {
"description": "This is seeded asset type",
"id": 1,
"metadata": [],
"name": "Asset Type",
"org_id": 1,
"parameters": [],
"project_id": 1,
"sensor_type_present": false,
"sensor_type_uuid": null,
"slug": "Asset-Type",
"uuid": "3a1a894c687511eca5788c47be40470d"
},
"asset_type_id": 1,
"creator_id": 1,
"description": null,
"entities": [
{
"asset_type": {
"description": "This is seeded asset type",
"id": 1,
"metadata": [],
"name": "Asset Type",
"org_id": 1,
"parameters": [],
"project_id": 1,
"sensor_type_present": false,
"sensor_type_uuid": null,
"slug": "Asset-Type",
"uuid": "3a1a894c687511eca5788c47be40470d"
},
"asset_type_id": 1,
"creator_id": 1,
"description": null,
"entities": [
{
"entities": [
{
"data_type": "string",
"id": "59d91841-a16b-413b-9c8c-030918658f34",
"name": "Air Temperature",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3b70bc687511eca1178c47be40470d"
},
{
"data_type": "string",
"id": "6a130251-a300-4153-a793-5a1b739544ec",
"name": "O2 Level",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3b7b16687511ec84268c47be40470d"
},
{
"data_type": "string",
"id": "f9002465-77a3-4e82-99af-c13e90eb5f4d",
"name": "CO2 Level",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3b8638687511ec93eb8c47be40470d"
},
{
"data_type": "string",
"id": "8305fe44-f6ed-4a2e-a0ca-cc755dbf7f43",
"name": "CO Level",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3b9074687511ecbaba8c47be40470d"
},
{
"data_type": "string",
"id": "37b71090-8a09-4887-88c4-9b768e524981",
"name": "NH3 Level",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3b9dbc687511ec8ba48c47be40470d"
}
],
"id": 3,
"metadata": [],
"name": "Occupancy Sensor",
"parent_id": 5,
"parent_type": "Asset",
"sensor_type": {
"description": null,
"generated_by": "user",
"id": 3,
"metadata": [],
"name": "Sensor Type 2",
"org_id": 1,
"parameters": [
{
"data_type": "string",
"id": "59d91841-a16b-413b-9c8c-030918658f34",
"name": "Air Temperature",
"unit": null,
"uuid": "3a3b70bc687511eca1178c47be40470d"
},
{
"data_type": "string",
"id": "6a130251-a300-4153-a793-5a1b739544ec",
"name": "O2 Level",
"unit": null,
"uuid": "3a3b7b16687511ec84268c47be40470d"
},
{
"data_type": "string",
"id": "f9002465-77a3-4e82-99af-c13e90eb5f4d",
"name": "CO2 Level",
"unit": null,
"uuid": "3a3b8638687511ec93eb8c47be40470d"
},
{
"data_type": "string",
"id": "8305fe44-f6ed-4a2e-a0ca-cc755dbf7f43",
"name": "CO Level",
"unit": null,
"uuid": "3a3b9074687511ecbaba8c47be40470d"
},
{
"data_type": "string",
"id": "37b71090-8a09-4887-88c4-9b768e524981",
"name": "NH3 Level",
"unit": null,
"uuid": "3a3b9dbc687511ec8ba48c47be40470d"
}
],
"project_id": 1,
"slug": "4DhT-aTOm0at",
"uuid": "3a3bac6c687511ecb6788c47be40470d"
},
"sensor_type_id": 3,
"type": "Sensor"
}
],
"id": 5,
"mapped_parameters": [
{
"name": "Air Temperature",
"parameter_uuid": "3a3b70bc687511eca1178c47be40470d",
"sensor_type_uuid": "3a3bac6c687511ecb6788c47be40470d",
"sensor_uuid": "3a3c5202687511ec82278c47be40470d"
},
{
"name": "O2 Level",
"parameter_uuid": "3a3b7b16687511ec84268c47be40470d",
"sensor_type_uuid": "3a3bac6c687511ecb6788c47be40470d",
"sensor_uuid": "3a3c5202687511ec82278c47be40470d"
},
{
"name": "CO2 Level",
"parameter_uuid": "3a3b8638687511ec93eb8c47be40470d",
"sensor_type_uuid": "3a3bac6c687511ecb6788c47be40470d",
"sensor_uuid": "3a3c5202687511ec82278c47be40470d"
},
{
"name": "CO Level",
"parameter_uuid": "3a3b9074687511ecbaba8c47be40470d",
"sensor_type_uuid": "3a3bac6c687511ecb6788c47be40470d",
"sensor_uuid": "3a3c5202687511ec82278c47be40470d"
},
{
"name": "NH3 Level",
"parameter_uuid": "3a3b9dbc687511ec8ba48c47be40470d",
"sensor_type_uuid": "3a3bac6c687511ecb6788c47be40470d",
"sensor_uuid": "3a3c5202687511ec82278c47be40470d"
}
],
"metadata": [],
"name": "Common Space",
"parent_id": 4,
"properties": [
"occupancy"
],
"type": "Asset"
},
{
"asset_type": {
"description": "This is seeded asset type",
"id": 1,
"metadata": [],
"name": "Asset Type",
"org_id": 1,
"parameters": [],
"project_id": 1,
"sensor_type_present": false,
"sensor_type_uuid": null,
"slug": "Asset-Type",
"uuid": "3a1a894c687511eca5788c47be40470d"
},
"asset_type_id": 1,
"creator_id": 1,
"description": null,
"entities": [
{
"entities": [
{
"data_type": "string",
"id": "e312b695-3124-467f-918a-41542df0b9a0",
"name": "Air Temperature",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3e2a50687511ec92668c47be40470d"
},
{
"data_type": "string",
"id": "71f48dd4-be7d-4353-9775-55c611833ce9",
"name": "O2 Level",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3e36e4687511ecb2688c47be40470d"
},
{
"data_type": "string",
"id": "380dd5a7-9564-40a9-a2ca-73343e00a9e1",
"name": "CO2 Level",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3e4242687511ec9f588c47be40470d"
},
{
"data_type": "string",
"id": "6228c7f1-7dd2-4671-a547-7d14f04e74d8",
"name": "CO Level",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3e4b84687511ec87698c47be40470d"
},
{
"data_type": "string",
"id": "ad9b70e5-6cc2-4598-90db-6da3f15b6a1a",
"name": "NH3 Level",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3e5458687511ec9bd78c47be40470d"
}
],
"id": 5,
"metadata": [],
"name": "Occupancy Sensor",
"parent_id": 6,
"parent_type": "Asset",
"sensor_type": {
"description": null,
"generated_by": "user",
"id": 5,
"metadata": [],
"name": "Sensor Type 4",
"org_id": 1,
"parameters": [
{
"data_type": "string",
"id": "e312b695-3124-467f-918a-41542df0b9a0",
"name": "Air Temperature",
"unit": null,
"uuid": "3a3e2a50687511ec92668c47be40470d"
},
{
"data_type": "string",
"id": "71f48dd4-be7d-4353-9775-55c611833ce9",
"name": "O2 Level",
"unit": null,
"uuid": "3a3e36e4687511ecb2688c47be40470d"
},
{
"data_type": "string",
"id": "380dd5a7-9564-40a9-a2ca-73343e00a9e1",
"name": "CO2 Level",
"unit": null,
"uuid": "3a3e4242687511ec9f588c47be40470d"
},
{
"data_type": "string",
"id": "6228c7f1-7dd2-4671-a547-7d14f04e74d8",
"name": "CO Level",
"unit": null,
"uuid": "3a3e4b84687511ec87698c47be40470d"
},
{
"data_type": "string",
"id": "ad9b70e5-6cc2-4598-90db-6da3f15b6a1a",
"name": "NH3 Level",
"unit": null,
"uuid": "3a3e5458687511ec9bd78c47be40470d"
}
],
"project_id": 1,
"slug": "q-dV-wOSSnIh",
"uuid": "3a3e5d7c687511ec84bb8c47be40470d"
},
"sensor_type_id": 5,
"type": "Sensor"
}
],
"id": 6,
"mapped_parameters": [
{
"name": "Air Temperature",
"parameter_uuid": "3a3e2a50687511ec92668c47be40470d",
"sensor_type_uuid": "3a3e5d7c687511ec84bb8c47be40470d",
"sensor_uuid": "3a3ef6c4687511eca1088c47be40470d"
},
{
"name": "O2 Level",
"parameter_uuid": "3a3e36e4687511ecb2688c47be40470d",
"sensor_type_uuid": "3a3e5d7c687511ec84bb8c47be40470d",
"sensor_uuid": "3a3ef6c4687511eca1088c47be40470d"
},
{
"name": "CO2 Level",
"parameter_uuid": "3a3e4242687511ec9f588c47be40470d",
"sensor_type_uuid": "3a3e5d7c687511ec84bb8c47be40470d",
"sensor_uuid": "3a3ef6c4687511eca1088c47be40470d"
},
{
"name": "CO Level",
"parameter_uuid": "3a3e4b84687511ec87698c47be40470d",
"sensor_type_uuid": "3a3e5d7c687511ec84bb8c47be40470d",
"sensor_uuid": "3a3ef6c4687511eca1088c47be40470d"
},
{
"name": "NH3 Level",
"parameter_uuid": "3a3e5458687511ec9bd78c47be40470d",
"sensor_type_uuid": "3a3e5d7c687511ec84bb8c47be40470d",
"sensor_uuid": "3a3ef6c4687511eca1088c47be40470d"
}
],
"metadata": [],
"name": "Executive Space",
"parent_id": 4,
"properties": [
"occupancy"
],
"type": "Asset"
},
{
"entities": [
{
"data_type": "string",
"id": "102839f6-31f4-48b7-95c5-5a20061f125a",
"name": "Voltage",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3cd998687511eca06f8c47be40470d"
},
{
"data_type": "string",
"id": "97ead862-57e8-44dc-b84b-02530496c43d",
"name": "Current",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3ce8b6687511ec8fea8c47be40470d"
},
{
"data_type": "string",
"id": "617d72ac-f31d-4008-aa0f-079e244012d9",
"name": "Power",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3cf2de687511ec83c88c47be40470d"
},
{
"data_type": "string",
"id": "e6857332-b9c8-4b35-b6cd-0cd7b6ebd93f",
"name": "Energy",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3cfca2687511eca0218c47be40470d"
}
],
"id": 4,
"metadata": [],
"name": "Energy Meter",
"parent_id": 4,
"parent_type": "Asset",
"sensor_type": {
"description": null,
"generated_by": "user",
"id": 4,
"metadata": [],
"name": "Sensor Type 3",
"org_id": 1,
"parameters": [
{
"data_type": "string",
"id": "102839f6-31f4-48b7-95c5-5a20061f125a",
"name": "Voltage",
"unit": null,
"uuid": "3a3cd998687511eca06f8c47be40470d"
},
{
"data_type": "string",
"id": "97ead862-57e8-44dc-b84b-02530496c43d",
"name": "Current",
"unit": null,
"uuid": "3a3ce8b6687511ec8fea8c47be40470d"
},
{
"data_type": "string",
"id": "617d72ac-f31d-4008-aa0f-079e244012d9",
"name": "Power",
"unit": null,
"uuid": "3a3cf2de687511ec83c88c47be40470d"
},
{
"data_type": "string",
"id": "e6857332-b9c8-4b35-b6cd-0cd7b6ebd93f",
"name": "Energy",
"unit": null,
"uuid": "3a3cfca2687511eca0218c47be40470d"
}
],
"project_id": 1,
"slug": "KL-AcucF3265",
"uuid": "3a3d0710687511ec969c8c47be40470d"
},
"sensor_type_id": 4,
"type": "Sensor"
}
],
"id": 4,
"mapped_parameters": [
{
"name": "Voltage",
"parameter_uuid": "3a3cd998687511eca06f8c47be40470d",
"sensor_type_uuid": "3a3d0710687511ec969c8c47be40470d",
"sensor_uuid": "3a3da44a687511ecb6d48c47be40470d"
},
{
"name": "Current",
"parameter_uuid": "3a3ce8b6687511ec8fea8c47be40470d",
"sensor_type_uuid": "3a3d0710687511ec969c8c47be40470d",
"sensor_uuid": "3a3da44a687511ecb6d48c47be40470d"
},
{
"name": "Power",
"parameter_uuid": "3a3cf2de687511ec83c88c47be40470d",
"sensor_type_uuid": "3a3d0710687511ec969c8c47be40470d",
"sensor_uuid": "3a3da44a687511ecb6d48c47be40470d"
},
{
"name": "Energy",
"parameter_uuid": "3a3cfca2687511eca0218c47be40470d",
"sensor_type_uuid": "3a3d0710687511ec969c8c47be40470d",
"sensor_uuid": "3a3da44a687511ecb6d48c47be40470d"
}
],
"metadata": [],
"name": "Singapore Office",
"parent_id": null,
"properties": [
"voltage",
"current",
"power"
],
"type": "Asset"
},
{
"asset_type": {
"description": "This is seeded asset type",
"id": 1,
"metadata": [],
"name": "Asset Type",
"org_id": 1,
"parameters": [],
"project_id": 1,
"sensor_type_present": false,
"sensor_type_uuid": null,
"slug": "Asset-Type",
"uuid": "3a1a894c687511eca5788c47be40470d"
},
"asset_type_id": 1,
"creator_id": 1,
"description": null,
"entities": [
{
"entities": [
{
"data_type": "string",
"id": "fe3a4b8d-60bb-4d67-a3ae-883a8134b21d",
"name": "Air Temperature",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3f6b18687511ec86f78c47be40470d"
},
{
"data_type": "string",
"id": "c912a9b4-15c0-46d8-882b-169475ac1ba3",
"name": "O2 Level",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3f78c4687511eca3fd8c47be40470d"
},
{
"data_type": "string",
"id": "7e96e179-6a57-4c90-a5dc-faa905e03e2c",
"name": "CO2 Level",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3f8300687511ecb60e8c47be40470d"
},
{
"data_type": "string",
"id": "3bd57591-3752-4943-9d5a-4d6576480539",
"name": "CO Level",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3f8d0a687511ecb84e8c47be40470d"
},
{
"data_type": "string",
"id": "79d8ec1d-6ce7-4fe7-9d20-6b1896e7046d",
"name": "NH3 Level",
"type": "SensorParameter",
"unit": null,
"uuid": "3a3f9660687511ec81b08c47be40470d"
}
],
"id": 6,
"metadata": [],
"name": "Air Quality Sensor",
"parent_id": 7,
"parent_type": "Asset",
"sensor_type": {
"description": null,
"generated_by": "user",
"id": 6,
"metadata": [],
"name": "Sensor Type 5",
"org_id": 1,
"parameters": [
{
"data_type": "string",
"id": "fe3a4b8d-60bb-4d67-a3ae-883a8134b21d",
"name": "Air Temperature",
"unit": null,
"uuid": "3a3f6b18687511ec86f78c47be40470d"
},
{
"data_type": "string",
"id": "c912a9b4-15c0-46d8-882b-169475ac1ba3",
"name": "O2 Level",
"unit": null,
"uuid": "3a3f78c4687511eca3fd8c47be40470d"
},
{
"data_type": "string",
"id": "7e96e179-6a57-4c90-a5dc-faa905e03e2c",
"name": "CO2 Level",
"unit": null,
"uuid": "3a3f8300687511ecb60e8c47be40470d"
},
{
"data_type": "string",
"id": "3bd57591-3752-4943-9d5a-4d6576480539",
"name": "CO Level",
"unit": null,
"uuid": "3a3f8d0a687511ecb84e8c47be40470d"
},
{
"data_type": "string",
"id": "79d8ec1d-6ce7-4fe7-9d20-6b1896e7046d",
"name": "NH3 Level",
"unit": null,
"uuid": "3a3f9660687511ec81b08c47be40470d"
}
],
"project_id": 1,
"slug": "W4DS1-b7ivw5",
"uuid": "3a3fa088687511eca99d8c47be40470d"
},
"sensor_type_id": 6,
"type": "Sensor"
},
{
"entities": [
{
"data_type": "string",
"id": "996a3c4c-ebd1-4845-87cf-b1a5ef05a582",
"name": "Soil Humidity",
"type": "SensorParameter",
"unit": null,
"uuid": "3a4146a4687511ec90488c47be40470d"
},
{
"data_type": "string",
"id": "02f998e5-d8d2-49ad-89b2-cee560fb4610",
"name": "N Level",
"type": "SensorParameter",
"unit": null,
"uuid": "3a41541e687511ec839d8c47be40470d"
},
{
"data_type": "string",
"id": "23761fb2-ef7e-4166-b284-8abda3b1ee78",
"name": "P Level",
"type": "SensorParameter",
"unit": null,
"uuid": "3a415e32687511ecbf958c47be40470d"
},
{
"data_type": "string",
"id": "47c8b861-d316-4881-a82e-e10546dbb283",
"name": "K Level",
"type": "SensorParameter",
"unit": null,
"uuid": "3a4167ce687511ec9bbb8c47be40470d"
}
],
"id": 8,
"metadata": [],
"name": "Soil Moisture Sensor",
"parent_id": 7,
"parent_type": "Asset",
"sensor_type": {
"description": null,
"generated_by": "user",
"id": 8,
"metadata": [],
"name": "Sensor Type 7",
"org_id": 1,
"parameters": [
{
"data_type": "string",
"id": "996a3c4c-ebd1-4845-87cf-b1a5ef05a582",
"name": "Soil Humidity",
"unit": null,
"uuid": "3a4146a4687511ec90488c47be40470d"
},
{
"data_type": "string",
"id": "02f998e5-d8d2-49ad-89b2-cee560fb4610",
"name": "N Level",
"unit": null,
"uuid": "3a41541e687511ec839d8c47be40470d"
},
{
"data_type": "string",
"id": "23761fb2-ef7e-4166-b284-8abda3b1ee78",
"name": "P Level",
"unit": null,
"uuid": "3a415e32687511ecbf958c47be40470d"
},
{
"data_type": "string",
"id": "47c8b861-d316-4881-a82e-e10546dbb283",
"name": "K Level",
"unit": null,
"uuid": "3a4167ce687511ec9bbb8c47be40470d"
}
],
"project_id": 1,
"slug": "HhtmFbbhhf3u",
"uuid": "3a41749e687511eca7af8c47be40470d"
},
"sensor_type_id": 8,
"type": "Sensor"
}
],
"id": 7,
"mapped_parameters": [
{
"name": "Air Temperature",
"parameter_uuid": "3a3f6b18687511ec86f78c47be40470d",
"sensor_type_uuid": "3a3fa088687511eca99d8c47be40470d",
"sensor_uuid": "3a401536687511ec945b8c47be40470d"
},
{
"name": "O2 Level",
"parameter_uuid": "3a3f78c4687511eca3fd8c47be40470d",
"sensor_type_uuid": "3a3fa088687511eca99d8c47be40470d",
"sensor_uuid": "3a401536687511ec945b8c47be40470d"
},
{
"name": "CO2 Level",
"parameter_uuid": "3a3f8300687511ecb60e8c47be40470d",
"sensor_type_uuid": "3a3fa088687511eca99d8c47be40470d",
"sensor_uuid": "3a401536687511ec945b8c47be40470d"
},
{
"name": "CO Level",
"parameter_uuid": "3a3f8d0a687511ecb84e8c47be40470d",
"sensor_type_uuid": "3a3fa088687511eca99d8c47be40470d",
"sensor_uuid": "3a401536687511ec945b8c47be40470d"
},
{
"name": "NH3 Level",
"parameter_uuid": "3a3f9660687511ec81b08c47be40470d",
"sensor_type_uuid": "3a3fa088687511eca99d8c47be40470d",
"sensor_uuid": "3a401536687511ec945b8c47be40470d"
},
{
"name": "Soil Humidity",
"parameter_uuid": "3a4146a4687511ec90488c47be40470d",
"sensor_type_uuid": "3a41749e687511eca7af8c47be40470d",
"sensor_uuid": "3a41d8ee687511ec92138c47be40470d"
},
{
"name": "N Level",
"parameter_uuid": "3a41541e687511ec839d8c47be40470d",
"sensor_type_uuid": "3a41749e687511eca7af8c47be40470d",
"sensor_uuid": "3a41d8ee687511ec92138c47be40470d"
},
{
"name": "P Level",
"parameter_uuid": "3a415e32687511ecbf958c47be40470d",
"sensor_type_uuid": "3a41749e687511eca7af8c47be40470d",
"sensor_uuid": "3a41d8ee687511ec92138c47be40470d"
},
{
"name": "K Level",
"parameter_uuid": "3a4167ce687511ec9bbb8c47be40470d",
"sensor_type_uuid": "3a41749e687511eca7af8c47be40470d",
"sensor_uuid": "3a41d8ee687511ec92138c47be40470d"
}
],
"metadata": [],
"name": "Ipoh Factory",
"parent_id": null,
"properties": [
"air_temperature",
"o2_level",
"co2_level",
"co_level",
"soil_humidity",
"n_level",
"p_level"
],
"type": "Asset"
}
],
"id": 1,
"name": "Demo Project",
"slug": "l9KolBIu4Vcb",
"type": "Project",
"version": "1.0"
}
],
"id": 1,
"name": "DataKrew",
"type": "Organisation"
}
```