Table of contents
Sensor Data
Download API definition:
POST https://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 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 user has sent too many requests in a given amount of time.

json
{
    "error": {
        "code": "TooManyRequests",
        "message": "More requests were received than the subscription rate-limit allows."
    }
}

Response headers

Name
Description
retry-after

The number of requests exceeds the rate-limit for the client subscription.

IntegrationRequest

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

IntegrationResponse

Name
Type
Description
integration.node.props.SERIAL_NO
String
integration.node.props.CREATION_DATE
String
integration.node.props.INTEGRATION_ID
String
integration.node.props.PROJECT_ID
String
integration.node.props.NAME
String
integration.node.id
String
integration.node.type
String
integration.devices
Object[]

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?