The "testOutput" is useful for testing a newly created or altered output. It tests if it can connect to the device based on an existing output's settings. It optionally returns device information and optionally pushes data to the device. To aid in troubleshooting, it returns the values pushed to the target system in the "sentValues" property.
If the action cannot connect to the device, it returns the device disconnected error to indicate the device is disconnected: "Cannot connect to device".
If "includeDeviceInformation":true, the action returns the "deviceInformation" property that describes the device, which helps a user confirm that they are connected to the correct device.
If "sendValues":true, the action sends values from the source record to the device.
- If the output's
"propertyMapList"property is omitted, the action does not send data and returns the error:"Cannot send a record to the device because you need to add tags to the output's propertyMapList property." - The
"sourceRecord"property specifies the record to send to the device. It defaults to"lastRecord". It may be set to the record's unique identifier, which is an integer number.- If the action cannot send records to the device because the specified ID is incorrect, it returns the error:
"Output AAA Cannot send a record to the device XXX because record ID YYY cannot be found at table ZZZ. Use a different record ID." - If the action cannot send the last record to the device because there are no records, it returns the error:
"Output AAA Cannot send the last record to the device XXX because no records have been collected for table YYY."
- If the action cannot send records to the device because the specified ID is incorrect, it returns the error:
Request examples
Connection-only test
This request only tests the output connection.
{
"api": "hub",
"action": "testOutput",
"params": {
"outputName": "someOutputName"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Include Device Information
This request returns device information after connecting to the device.
{
"api": "hub",
"action": "testOutput",
"params": {
"outputName": "someOutputName",
"includeDeviceInformation":true
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Push Last Record
This request returns device information after connecting to the device and pushes the last inserted record to the device.
{
"api": "hub",
"action": "testOutput",
"params": {
"outputName": "someOutputName",
"includeDeviceInformation":true,
"sendValues":true,
"sourceRecord": "lastRecord"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Push Record 3
This request pushes the record with ID 3 to the device.
{
"api": "hub",
"action": "testOutput",
"params": {
"outputName": "someOutputName",
"sendValues":true,
"sourceRecord": "3"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Response examples
Condensed
{
"result": {
"data": [
{
"outputName": "mod1",
"settings": {
"propertyMapList": [
{
"propertyPath": "t1"
},
{
"propertyPath": "t2"
}
]
},
"sentValues" : {
"create_ts": "2026-07-31T17:41:13.468000000Z",
"t1": 22,
"t2": 78
}
}
]
},
"authToken": "replaceWithAuthTokenFromCreateSession",
"errorCode": 0,
"errorMessage": ""
}
Maximal
{
"result": {
"data": [
{
"id": 2,
"outputName": "mod1",
"serviceName": "modbus",
"databaseName": "faircom",
"ownerName": "admin",
"tableName": "mod1",
"retentionPolicy": "autoPurge",
"retentionPeriod": 4,
"retentionUnit": "week",
"settings": {
"modbusProtocol": "TCP",
"modbusServer": "127.0.0.1",
"modbusServerPort": 502,
"dataCollectionIntervalMilliseconds": 5000,
"dataPersistenceStrategy": "onSchedule",
"immediatelyCollectDataOnStart": false,
"propertyMapList": [
{
"modbusDataAccess": "holdingregister",
"modbusDataAddress": "4003",
"modbusDataLen": null,
"modbusDataType": "int8Signed",
"modbusUnitId": "1",
"propertyPath": "t1"
},
{
"modbusDataAccess": "holdingregister",
"modbusDataAddress": "4005",
"modbusDataLen": null,
"modbusDataType": "int8Signed",
"modbusUnitId": "1",
"propertyPath": "t2"
}
]
}
"deviceInformation": {
"productUri": "",
"deviceType": "",
"manufacturerName": "",
"productName": "",
"model": "",
"serialNumber": "",
"softwareVersion": "",
"buildNumber": "",
"buildDate": "",
"userApplicationName": "",
"deviceState": "",
"heartbeatTime": "",
"assetId": ""
},
"sentValues" : {
"create_ts": "2026-07-31T17:41:13.468000000Z",
"t1": 22,
"t2": 78
}
}
]
},
"authToken": "replaceWithAuthTokenFromCreateSession",
"requestId": "00000004",
"errorCode": 0,
"errorMessage": ""
}
Properties
Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
id |
The "id" property specifies the unique identifier of an output connector. |
Conditional - Required if "outputName" property is omitted. - No default value
|
number or string |
1 to 9223372036854770000
|
includeDeviceInformation |
When true, the "includeDeviceInformation" property tests the connection to the object and returns its device information. |
false |
Boolean |
|
outputName |
The "outputName" property specifies the unique name of an output connector. |
Conditional - Required if "id" property is omitted. - No default value
|
string | 1 to 64 bytes |
sendValues |
When present and true, the "sendValues" property sends the specified source record to the device. |
false |
Boolean |
|
sourceRecord |
When present, the "sourceRecord" property specifies the record to use for the data being sent to the target device. It is either the record's ID value or the string "lastRecord". |
"lastRecord" |
string |
"lastRecord" or ID of the record |
Response properties ("result")
| Property | Description | Type | Limits (inclusive) |
|---|---|---|---|
data |
The |
array of objects | The action determines its contents. |
|
data .databaseName |
The
|
string | 1 to 64 bytes |
|
data .deviceInformation |
The "deviceInformation" property contains a standard set of properties that describe the device. |
object | No limits |
|
data .id |
The |
integer |
0 to 2147483647
|
|
data .outputName |
The "outputName" property specifies a unique name for mapping an integration table to an output plugin to an external system. |
string | 1 to 64 bytes |
|
data .ownerName |
The "ownerName" property identifies the user who owns an object (see Object owner). |
string | 0 to 64 bytes |
|
data .retentionPeriod |
The |
integer |
1 to 100
|
|
data .retentionPolicy |
The If not specified, the default found in the
retentionPolicy values:
|
string |
|
|
data .retentionUnit |
The If not specified, the default found in the
|
string |
|
|
data .sentValues |
The "sentValues" property contains the values sent to the connector for each property in the "propertyMapList". The type of value depends on the type of data sent to the device. |
JSON | No limits |
|
data .serviceName |
The See the The following services are available as of the V5 release:
|
string | A service name between 1 and 64 bytes. |
|
data .settings |
The |
object |
See these pages for connector specific properties: |
|
data settings .propertyMapList |
The "propertyMapList" property specifies which data the connector requests and where to put it in the generated JSON. |
array of objects |
See these pages for connector specific properties: |
|
data settings propertyMapList .propertyPath |
The "propertyPath" property specifies the JSON path in the JSON document where the connector puts the data it collects. It is mutually exclusive with the "tagName" and "tagId" properties. |
string | JSON path |
|
data .tableName |
The The table name must start with an upper or lowercase letter, must not contain special characters other than underscore |
string | 1 to 64 bytes |