Skip to main content

"describeInputs"

The JSON Edge API "describeInputs" action returns all available information about each specified FairCom Edge input

Abstract

The "describeInputs" action returns all available information about each specified input. Inputs collect tags from a data source and insert them into an integration table.

The "describeInputs" action returns all available information about each specified input. Inputs collect tags from a data source and insert them into an integration table.

Note

A tag is a piece of named data with an associated value. For example, the tag temperature 70 includes both the named data temperature and the value 70. In JSON, a tag is a JSON property, such as "temperature": 70. In a SQL table, a tag is a data field, such as a field named temperature with a value of 70.

Request examples

Minimal request example

{
    "api": "hub",
    "apiVersion": "1.0",
    "requestId": "00000027",
    "authToken": "F59Y2O7c4YBfuHDIamLJJnULdWFauXxRwMMTwBOHffAECs6gLSotW8dcdewTid2E",
    "action": "describeInputs",
    "params": {
        "inputNames": [
            "modbusTCP"
        ]
    }
}

Response examples

{
    "result": {
        "data": [
            {
                "inputName": "modbusTCP",
                "serviceName": "modbus",
                "settings": {
                    "modbusProtocol": "TCP",
                    "modbusServer": "127.0.0.1",
                    "modbusServerPort": 1505,
                    "modbusDataCollectionIntervalMilliseconds": 15000,
                    "propertyMapList": [
                        {
                            "propertyPath": "temperature",
                            "modbusDataAddress": 1199,
                            "modbusDataAccess": "register",
                            "modbusSlave": 5,
                            "modbusDataLen": 1
                        },
                        {
                            "propertyPath": "volume",
                            "modbusDataAddress": 1299,
                            "modbusDataAccess": "register",
                            "modbusSlave": 5,
                            "modbusByteOrder": "ABCD",
                            "modbusDataLen": 2
                        },
                        {
                            "propertyPath": "status",
                            "modbusDataAddress": 1199,
                            "modbusDataAccess": "coil",
                            "modbusSlave": 5,
                            "modbusDataLen": 1
                        }
                    ]
                },
                "databaseName": "ctreeSQL",
                "ownerName": "admin",
                "tableName": "modbustabletcp",
                "metadata": {},
                "retentionPolicy": "autoPurge",
                "retentionPeriod": 30,
                "retentionUnit": "day"
            }
        ]
    },
    "requestId": "00000027",
    "errorCode": 0,
    "errorMessage": ""
}

"params"

The "params" property is an object that contains an action's parameters. Each action defines its own required and optional properties.

Properties summary

Table 1. "params" properties summary

Property

Description

Default

Type

Limits (inclusive)

inputNames

contains "inputName" strings

[]

array



"result"

Properties summary

Table 2. "result" properties summary

Property

Description

Type

Limits (inclusive)

data

specifies an array or object that the server returns, such as records returned by a query

Note

It is an empty array when there are no results available.

array

Its contents are determined by the action