Skip to main content
Version: 1.0.0

Reference

Relynk API (1.0)

Download OpenAPI specification:Download

Relynk API

Asset

Get all assets

Get all assets like rooms, floors, buildings etc.

Authorizations:
api_keybearer
query Parameters
asNestedObject
boolean
Default: true
assetType
string
Enum: "Building" "Floor" "Area" "Room" "Desk" "Facade"

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get all asset roots

Get all assets roots (i.e. the top level assets, usually buildings)

Authorizations:
api_keybearer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get asset by id

Get assed by id

Authorizations:
api_keybearer
path Parameters
assetId
required
string
query Parameters
include
Array of strings
Items Enum: "direct_children" "all_children" "sensor" "drawing_image" "drawing_elements" "drawing_layers" "parameters"
childrenAssetType
string
Enum: "Building" "Floor" "Area" "Room" "Desk" "Facade"
childrenAsNestedObject
boolean

Responses

Response samples

Content type
application/json
{
  • "id": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6",
  • "name": "sample_building_1",
  • "number": null,
  • "type": "Building",
  • "children": [ ],
  • "parent": { },
  • "asset_params": [ ],
  • "drawing_layers": [ ],
  • "drawing_image": { },
  • "sensors": [
    ]
}

Update asset

Update asset based on asset id

Authorizations:
api_keybearer
path Parameters
assetId
required
string
Request Body schema: application/json
name
string
number
string or null
type
string
Enum: "Building" "Floor" "Area" "Room" "Desk" "Facade"
Array of objects (AssetParam)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "number": "string",
  • "type": "Building",
  • "asset_params": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6",
  • "name": "sample_building_1",
  • "number": null,
  • "type": "Building",
  • "children": [ ],
  • "parent": { },
  • "asset_params": [ ],
  • "drawing_layers": [ ],
  • "drawing_image": { },
  • "sensors": [
    ]
}

Delete asset

Delete asset based on asset id

Authorizations:
api_keybearer
path Parameters
assetId
required
string

Responses

Create asset

Create asset

Authorizations:
api_keybearer
Request Body schema: application/json
parent_id
string
name
required
string
number
string or null
type
required
string
Enum: "Building" "Floor" "Area" "Room" "Desk" "Facade"
Array of objects (AssetParam)

Responses

Request samples

Content type
application/json
{
  • "parent_id": "string",
  • "name": "string",
  • "number": "string",
  • "type": "Building",
  • "asset_params": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6",
  • "name": "sample_building_1",
  • "number": null,
  • "type": "Building",
  • "children": [ ],
  • "parent": { },
  • "asset_params": [ ],
  • "drawing_layers": [ ],
  • "drawing_image": { },
  • "sensors": [
    ]
}

Add drawing image to asset

Add drawing image to asset based on asset id (this will override any existing drawing image). You still need to upload the image to AWS separately.

Authorizations:
api_keybearer
path Parameters
assetId
required
string
Request Body schema: application/json
name
required
string
type
required
string
Value: "Image"
key
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "type": "Image",
  • "key": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": "Image",
  • "key": "string"
}

Asset Param

Get All asset params

Get All assets parameters

Authorizations:
api_keybearer
query Parameters
asset_id
string
name
string
value
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Measurement Type

Get all measurement types

Get all measurement types

Authorizations:
api_keybearer

Responses

Response samples

Content type
application/json
{
  • "measurement_types": [
    ]
}

Webhooks

Get all webhook congigurations

Get all webhook congigurations

Authorizations:
api_keybearer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a webhook configuration

Create a webhook configuration

Authorizations:
api_keybearer
Request Body schema: application/json
id
string
name
string
endpoint
required
string
method
required
number
Enum: 0 1 2 3 4 5 6 7
required
Array of objects (RequestHeader)
customerId
string
time
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "endpoint": "string",
  • "method": [
    ],
  • "headers": [
    ],
  • "customerId": "string",
  • "time": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "endpoint": "string",
  • "method": [
    ],
  • "headers": [
    ],
  • "customerId": "string",
  • "time": "2019-08-24T14:15:22Z"
}

Edit a webhook configuration

Edit a webhook configuration

Authorizations:
api_keybearer
Request Body schema: application/json
id
required
string
name
string
endpoint
required
string
method
required
number
Enum: 0 1 2 3 4 5 6 7
required
Array of objects (RequestHeader)
customerId
required
string
time
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "endpoint": "string",
  • "method": [
    ],
  • "headers": [
    ],
  • "customerId": "string",
  • "time": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "endpoint": "string",
  • "method": [
    ],
  • "headers": [
    ],
  • "customerId": "string",
  • "time": "2019-08-24T14:15:22Z"
}

Delete a webhook configuration

Delete a webhook configuration

Authorizations:
api_keybearer
path Parameters
webhookConfigId
required
string

Responses

Response samples

Content type
application/json
true

Unit Type

Get all unit types

Get all unit types

Authorizations:
api_keybearer

Responses

Response samples

Content type
application/json
{
  • "unit_types": [
    ]
}

Query

Query for sensor data

Query for sensor data with filters

Authorizations:
api_keybearer
Request Body schema: application/json
required
Array of objects (QueryFilter)
group_on
string
Enum: "Desk" "Room" "Floor" "Area" "Building" "Facade" "Sensor" "None"
to
string <date-time>
from
string <date-time>
resolution
required
string
Enum: "raw" "30 minute" "1 hour" "1 day" "1 week" "1 month" "1 year"
is_timeseries
required
boolean
only_latest_value
required
boolean
limit
number
offset
number

Responses

Request samples

Content type
application/json
{
  • "filters": [
    ],
  • "group_on": "Building",
  • "to": "2020-01-01T00:00:00.000Z",
  • "from": "2020-01-02T00:00:00.000Z",
  • "resolution": "raw",
  • "is_timeseries": true,
  • "only_latest_value": true,
  • "limit": 0,
  • "offset": 0
}

Response samples

Content type
application/json
[
  • {
    }
]