Skip to main content

"listInputs" (JSON Action)

JSON hub "listInputs" action obtains a list of names of previously created FairCom Edge inputs

The "listInputs" action obtains a list of names of previously created inputs. 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.

  • You can return a filtered list by specifying a partial name in the "partialName" property.

  • You can include additional items in the list by searching for words contained in the item's metadata.

  • To get detailed information about specific inputs, use "describeInputs".

Request examples

Minimal

{
  "api": "hub",
  "apiVersion": "1.0",
  "action": "listInputs",
  "requestId": "00000001",
  "params": {
  },
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
{
  "api": "hub",
  "apiVersion": "1.0",
  "action": "listInputs",
  "requestId": "00000001",
  "params": {
    "partialName": ""
  },
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
{
    "result": {
        "data": [
            "modbusTCP"
        ]
    },
    "requestId": "00000046",
    "errorCode": 0,
    "errorMessage": ""
}
{
    "result": {
       "data": [
            "modbusTCP"
        ]
    },
    "requestId": "00000047",
    "errorCode": 0,
    "errorMessage": ""
}

Use the listInputs JSON API action to obtain a list of names of previously created FairCom Edge inputs

API actionJSON hub APIJSON Actioninput actionslist inputlistInputs

The "params" property is an object that contains an action's request parameters as defined by a set of properties. Each action defines its own required and optional properties. See System limits for a comprehensive overview of property requirements and limitations.

Table 1. listInputs "params" property summaries

Property

Description

Default

Type

Limits (inclusive)

dataFormat

(optional) specifies the format of data being sent to the server.

"arrays"

string enum

"autoDetect"
"arrays"
"objects"

MaxRecords

(optional) specifies the maximum number of records to return from a method.

20

integer

-1 to 65535

partialName

(optional) filters the returned topics by applying partial matches to their names.

""

string

0 to 64 bytes

skipRecords

(optional) specifies the number of records to skip over in the results before returning records.

0

integer

0 to 9223372036854775807



The "maxRecords" is an optional integer from -1 to 65535 that sets the maximum number of records to return from an action. It is used in query actions to paginate the query results when returning records directly. The default for most actions is to return 20 records.

Important

-1 returns all records and should be used very carefully because a large query can return so many records that it eventually times out and wastes server and client resources.

  • When present, "maxRecords" works in conjunction with the "skipRecords" (and, when applicable, "reverseOrder") properties to paginate results.

  • "maxRecords" returns an error when "returnCursor" is true.

    Note

    This does not apply to the actions where "returnCursor" is not present.

  • When returning a cursor, retrieve records using the "getRecordsFromCursor" action.

  • A value of 0 for "maxRecords" is not useful because it causes the action to return no records.

  • "maxRecords" is ignored by the "getRecordsByIds" action.

The "partialName" property is an optional string that causes the server to include items in the result when the beginning of their names match the "partialName" value. It defaults to an empty string.

  • A zero-length string matches all names.

  • The "partialName" property is used to filter results in several actions used to return lists.

The "skipRecords" property is an optional integer from 0 to 9223372036854775807. It is used in query actions to paginate the query results when returning records directly. It defaults to 0.

  • It specifies the number of records to skip over in the results before returning records.

  • It works with "maxRecords" and "reverseOrder".

  • It is ignored when "returnCursor" is true.

    Note

    This does not apply to the actions where "returnCursor" is not present.

Table 2. listInputs "result" property summaries

Property

Description

Type

Contents

data

is an array of objects or arrays. Each item in the array describes a record. The array is empty if no results are available.

array

The action determines its contents.



The "data" property lists each input that matches the request parameters.

  "result": {
    "data": [
      "myInput",
      "modbusTCP"
    ]
  },