The "testInput" action is useful for testing a newly created or altered input to ensure it returns expected values. You can call this action any time to get a device's most recent values. It takes an existing input, tests if it can connect to the device, optionally collects device information, optionally collects its current values, and returns this information. It does not write data to the input's integration table. You can create an inactive input, test it, and if you are satisfied with the results, you can activate it.
If "includeDeviceInformation":true, the action returns the "deviceInformation" property if it successfully connects to the device. This information describes the device, which helps a user confirm that they are connected to the correct device.
If "collectValues":true, the action returns the "collectedValues" property if it successfully connects to the device. If the input's "propertyMapList" property is omitted, the "collectedValues" property is an empty array [].
If the action cannot connect to the device, it returns the device disconnected error to indicate the device is disconnected.
Request examples
S7 and OPC
These protocols do not need additional information to return connection status and device information.
The Siemens S7 protocol uses the
"rack"and"slot"properties to specify a specific child PLC module. These properties must be defined when creating the connector; thus, they are not required for the"testInput"and"testOutput"actions.The OPC UA and MTConnect protocols do not specify child devices.
{
"api": "hub",
"action": "testInput",
"params": {
"inputName": "someInputName",
"includeDeviceInformation": true,
"collectValues":true
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
EtherNet/IP
The EtherNet/IP protocol optionally allows a device to aggregate other EtherNet/IP devices. If this is the case, you can use the optional "eipTagPath" property to identify a specific device and return its connection status and device information.
{
"api": "hub",
"action": "testInput",
"params": {
"inputName": "someEtherNetIpInputName",
"includeDeviceInformation": true,
"collectValues":true,
"eipTagPath":"1,0"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Modbus
The Modbus protocol optionally allows a device to aggregate other Modbus devices. If this is the case, you can use the optional "modbusUnitId" property to identify a specific device and return its connection status and device information. If "modbusUnitId" is omitted, the action first tries using a value of 1. If that fails, it tries with a value of 255. If that fails, it returns the error indicating the device is disconnected.
{
"api": "hub",
"action": "testInput",
"params": {
"inputName": "someModbusInputName",
"includeDeviceInformation": true,
"collectValues":true,
"modbusUnitId": 1
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
MTConnect
The MTConnect aggregates one or more MTConnect devices. Use the required "mtconnectDeviceUuid" property to identify a specific device and return its connection status and device information.
{
"api": "hub",
"action": "testInput",
"params": {
"inputName": "someMTConnectInputName",
"includeDeviceInformation": true,
"collectValues":true,
"mtconnectDeviceUuid": "16ac1535-3574-509c-8fb2-c536984015fe"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Response examples
Condensed
{
"result": {
"data": [
{
"inputName": "someModbusInputName",
"settings": {
"propertyMapList": [
{
"propertyPath": "t1"
},
{
"propertyPath": "t2"
}
]
},
"collectedValues" : {
"create_ts": "2026-07-31T17:41:13.468000000Z",
"t1": 22,
"t2": 78
}
}
]
},
"authToken": "replaceWithAuthTokenFromCreateSession",
"errorCode": 0,
"errorMessage": ""
}
Maximal
{
"result": {
"data": [
{
"id": 1,
"inputName": "someModbusInputName",
"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": ""
},
"collectedValues" : {
"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) |
|---|---|---|---|---|
collectValues |
When true, the "collectValues" property causes the response to include "collectedValues". |
Optional with default of true
|
Boolean |
|
eipTagPath |
The
|
Optional, not used if not provided. | string | String with the format "p,s"
|
id |
The "id" property specifies the unique identifier of an input connector. |
Conditional - Required if "inputName" property is omitted. - No default value
|
number or string |
1 to 9223372036854770000
|
includeDeviceInformation |
When true, the "includeDeviceInformation" property tests the connections and returns device information. |
Optional with default of false
|
Boolean |
|
inputName |
The "inputName" property specifies he unique name of an input connector. |
Conditional - Required if "id" property is omitted. - No default value
|
string | 1 to 64 bytes |
modbusUnitId |
The The unit number uniquely identifies each of these devices. This property also applies to serial communications. For serial communication, the range is
|
Optional with default of 1
|
int16 |
0 to 255
|
mtconnectDeviceUuid |
The "mtconnectDeviceUuid" property specifies the identifier of the device. In an MTConnectStreams XML document, the device identifier is located in the uuid attribute of the <DeviceStream> element. |
Required if "includeDeviceInformation" is true. |
string | No limit |
Response properties ("result")
| Property | Description | Type | Limits (inclusive) |
|---|---|---|---|
data |
The |
array of objects | The action determines its contents. |
|
data .collectedValues |
The "collectedValues" property contains the values returned by the connector for the properties in the "propertyMapList". It is exactly the value that is normally saved in the source_payload field. |
object | No limits |
|
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 .inputName |
The "inputName" property specifies the unique name of an input. |
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 .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 |