Table of contents
Sensor Data
Download API definition:
POST https://dev-api.bentley.com/sensor-data/integrations/integrate

Processes an integration.

Authentication

Requires Authorization header with valid Bearer token for scope itwin-platform.

For more documentation on authorization and how to get access token visit OAUTH2 Authorization page.

Request headers

Name
Required?
Description
Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.

Request body

IntegrationRequest

Name
Type
Required?
Description
integration.nodeId
String
No
integration.devices
Object[]
No

Example

json
{
    "integration": {
        "nodeId": "/api/95A09D/node",
        "devices": [{
            "changeState": "new",
            "refId": "RefId",
            "props": {
                "INTEGRATION_ID": "DEMO_DEVICE_SDE",
                "NAME": "Generic Device"
            },
            "sensors": [{
                    "changeState": "new",
                    "refId": "RefId1",
                    "props": {
                        "INTEGRATION_ID": "GENERIC_SENSOR_SDE",
                        "NAME": "Generic vibration sensor"
                    }
                },
                {
                    "changeState": "new",
                    "refId": "RefId2",
                    "props": {
                        "INTEGRATION_ID": "ACTIVITY_SDE",
                        "NAME": "Activity"
                    }
                },
                {
                    "changeState": "new",
                    "refId": "RefId3",
                    "props": {
                        "INTEGRATION_ID": "MOISTURE_SDE",
                        "NAME": "Moisture"
                    }
                },
                {
                    "changeState": "new",
                    "refId": "RefId4",
                    "props": {
                        "INTEGRATION_ID": "LIGHT_SDE",
                        "NAME": "Light"
                    }
                },
                {
                    "changeState": "new",
                    "refId": "RefId5",
                    "props": {
                        "INTEGRATION_ID": "ELECTRICITY_USAGE_SDE",
                        "NAME": "Electricity usage"
                    }
                },
                {
                    "changeState": "new",
                    "refId": "RefId6",
                    "props": {
                        "INTEGRATION_ID": "BATTERY_CHARGE_SDE",
                        "NAME": "Battery Charge Level"
                    }
                },
                {
                    "changeState": "new",
                    "refId": "RefId7",
                    "props": {
                        "INTEGRATION_ID": "SENSOR_SIGNAL_STRENGTH_SDE",
                        "NAME": "Sensor Signal Strength"
                    }
                }
            ]
        }]
    }
}

Response 200 OK

Integration processing successful.

json
{
    "integration": {
        "node": {
            "props": {
                "SERIAL_NO": "95A09D",
                "CREATION_DATE": "2024-02-06T05:26:29Z",
                "INTEGRATION_ID": "NODE_API_SDE",
                "PROJECT_ID": "6295B89C93266401FA614392",
                "NAME": "Data Source API Import 95A09D"
            },
            "id": "/api/95A09D/node",
            "type": "DYNAMIC"
        },
        "devices": [{
            "device": {
                "props": {
                    "SERIAL_NO": "9863fa9c-d111-4329-9ae3-d5ea8b64bcaf",
                    "SIZE": 7,
                    "CREATION_DATE": "2024-02-06T05:27:40Z",
                    "NODE_ID": "/api/95A09D/node",
                    "INTEGRATION_ID": "DEMO_DEVICE_SDE",
                    "PROJECT_ID": "6295B89C93266401FA614392",
                    "NAME": "Generic Device"
                },
                "id": "/api/95A09D/node/dynamic/756BDE/device",
                "type": "DYNAMIC"
            },
            "sensors": [{
                    "props": {
                        "SERIAL_NO": "4dd65699-8ffb-4855-a165-9547d501e049",
                        "CREATION_DATE": "2024-02-06T05:27:40Z",
                        "NODE_ID": "/api/95A09D/node",
                        "INTEGRATION_ID": "MOISTURE_SDE",
                        "PROJECT_ID": "6295B89C93266401FA614392",
                        "NAME": "Moisture"
                    },
                    "id": "/api/95A09D/node/dynamic/756BDE/device/404C27/sensor",
                    "observationType": "DYNAMIC",
                    "type": "DYNAMIC",
                    "device": "/api/95A09D/node/dynamic/756BDE/device"
                },
                {
                    "props": {
                        "SERIAL_NO": "d8583e25-ca01-4f75-b6da-681f2200eaeb",
                        "CREATION_DATE": "2024-02-06T05:27:40Z",
                        "NODE_ID": "/api/95A09D/node",
                        "INTEGRATION_ID": "GENERIC_SENSOR_SDE",
                        "PROJECT_ID": "6295B89C93266401FA614392",
                        "NAME": "Generic vibration sensor"
                    },
                    "id": "/api/95A09D/node/dynamic/756BDE/device/581565/sensor",
                    "observationType": "DYNAMIC",
                    "type": "DYNAMIC",
                    "device": "/api/95A09D/node/dynamic/756BDE/device"
                },
                {
                    "props": {
                        "SERIAL_NO": "92ecbce5-91dd-4640-a70a-6921442b9422",
                        "CREATION_DATE": "2024-02-06T05:27:40Z",
                        "NODE_ID": "/api/95A09D/node",
                        "INTEGRATION_ID": "SENSOR_SIGNAL_STRENGTH_SDE",
                        "PROJECT_ID": "6295B89C93266401FA614392",
                        "NAME": "Sensor Signal Strength"
                    },
                    "id": "/api/95A09D/node/dynamic/756BDE/device/373F53/sensor",
                    "observationType": "DYNAMIC",
                    "type": "DYNAMIC",
                    "device": "/api/95A09D/node/dynamic/756BDE/device"
                },
                {
                    "props": {
                        "SERIAL_NO": "c5d18efc-4d8d-4961-9bc2-ad50d2740b3c",
                        "CREATION_DATE": "2024-02-06T05:27:40Z",
                        "NODE_ID": "/api/95A09D/node",
                        "INTEGRATION_ID": "LIGHT_SDE",
                        "PROJECT_ID": "6295B89C93266401FA614392",
                        "NAME": "Light"
                    },
                    "id": "/api/95A09D/node/dynamic/756BDE/device/88CA0B/sensor",
                    "observationType": "DYNAMIC",
                    "type": "DYNAMIC",
                    "device": "/api/95A09D/node/dynamic/756BDE/device"
                },
                {
                    "props": {
                        "SERIAL_NO": "95c084c6-3158-401b-a01d-1b28841c927d",
                        "CREATION_DATE": "2024-02-06T05:27:40Z",
                        "NODE_ID": "/api/95A09D/node",
                        "INTEGRATION_ID": "ELECTRICITY_USAGE_SDE",
                        "PROJECT_ID": "6295B89C93266401FA614392",
                        "NAME": "Electricity usage"
                    },
                    "id": "/api/95A09D/node/dynamic/756BDE/device/0D7B39/sensor",
                    "observationType": "DYNAMIC",
                    "type": "DYNAMIC",
                    "device": "/api/95A09D/node/dynamic/756BDE/device"
                },
                {
                    "props": {
                        "SERIAL_NO": "88238aed-a1fc-4c63-899f-379e18495e76",
                        "CREATION_DATE": "2024-02-06T05:27:40Z",
                        "NODE_ID": "/api/95A09D/node",
                        "INTEGRATION_ID": "ACTIVITY_SDE",
                        "PROJECT_ID": "6295B89C93266401FA614392",
                        "NAME": "Activity"
                    },
                    "id": "/api/95A09D/node/dynamic/756BDE/device/6A84D1/sensor",
                    "observationType": "DYNAMIC",
                    "type": "DYNAMIC",
                    "device": "/api/95A09D/node/dynamic/756BDE/device"
                },
                {
                    "props": {
                        "SERIAL_NO": "332ddf52-4b16-4261-9a94-8a5cfeae9dbe",
                        "CREATION_DATE": "2024-02-06T05:27:40Z",
                        "NODE_ID": "/api/95A09D/node",
                        "INTEGRATION_ID": "BATTERY_CHARGE_SDE",
                        "PROJECT_ID": "6295B89C93266401FA614392",
                        "NAME": "Battery Charge Level"
                    },
                    "id": "/api/95A09D/node/dynamic/756BDE/device/324742/sensor",
                    "observationType": "DYNAMIC",
                    "type": "DYNAMIC",
                    "device": "/api/95A09D/node/dynamic/756BDE/device"
                }
            ]
        }]
    }
}

Response 401 Unauthorized

This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.

json
{
    "error": {
        "code": "HeaderNotFound",
        "message": "Header Authorization was not found in the request. Access denied."
    }
}

Response 403 Forbidden

The user has insufficient permissions for the requested operation.

json
{
    "error": {
        "code": "InsufficientPermissions",
        "message": "The user has insufficient permissions for the requested operation."
    }
}

Response 404 Not Found

This response indicates that the requested operation or resource could not be found.

json
{
    "error": {
        "code": "ResourceNotFound",
        "message": "The requested resource was not found. Verify the API URL and the Accept header.",
        "details": [{
            "code": "OperationNotFound",
            "message": "Unable to match incoming request to an operation."
        }]
    }
}

Response 422 Unprocessable Entity

Cannot process integration.

json
{
    "error": {
        "code": "InvalidProcessIntegrationRequest",
        "message": "Minimum request parameters not provided, new Devices and Sensors must have a valid `props.INTEGRATION_ID` set."
    }
}

Response 429 Too many requests

This response indicates that the client sent more requests than allowed by this API for the current tier of the client.

json
{
    "error": {
        "code": "RateLimitExceeded",
        "message": "The client sent more requests than allowed by this API for the current tier of the client."
    }
}

Response headers

Name
Description
retry-after

Number of seconds to wait until client is allowed to make more requests.

IntegrationRequest

Name
Type
Description
integration.nodeId
String
integration.devices
Object[]

DeviceProps

Name
Type
Description
SERIAL_NO
String
SIZE
Integer
CREATION_DATE
String
NODE_ID
String
INTEGRATION_ID
String
PROJECT_ID
String
NAME
String
LAST_MODIFIED_BY
String
LAST_MODIFIED_DATE
String

NodeProps

Name
Type
Description
SERIAL_NO
String
CREATION_DATE
String
INTEGRATION_ID
String
PROJECT_ID
String
NAME
String
LAST_MODIFIED_BY
String
LAST_MODIFIED_DATE
String
OBSERVATION_COUNT
Integer
EXTERNAL_ID
String

SensorProps

Name
Type
Description
SERIAL_NO
String
CREATION_DATE
String
NODE_ID
String
INTEGRATION_ID
String
PROJECT_ID
String
NAME
String
LAST_MODIFIED_BY
String
LAST_MODIFIED_DATE
String

Sensor

Name
Type
Description
id
String
observationType
String
type
String
device
String

Device

Name
Type
Description
device.props
device.id
String
device.type
String
sensors

IntegrationResponse

Name
Type
Description
integration.node.props
integration.node.id
String
integration.node.type
String
integration.devices

Error

Contains error information.

Name
Type
Description
code
String

One of a server-defined set of error codes.

message
String

A human-readable representation of the error.

target
String, null

The target of the error.

Error Response

Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.

Name
Type
Description
error

Error information.

Was this page helpful?