Skip to main content

"manageService" (JSON Action)

Configure settings for a FairCom Edge service

  • "manageService" can also send standard actions to the engine to pause, resume, restart, shutdown, and startup the service.

  • A service either collects data and stores it in an integration table or it takes data in an integration table and delivers it to an external system.

Links: Concepts | Tutorials | FAQs

Request examples

Minimal

{
    "api": "admin",
    "action": "manageService",
    "requestId": "00000012",
    "params": {
        "serviceName": "modbus"
    },
    "authToken": "replaceWithAuthTokenFromCreateSession"
}
{
  "api": "admin",
  "action": "manageService",
  "params": {
    "serviceName": "modbus",
    "authTokens": [
      "authToken1",
      "authToken2"
    ]
  },
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
{
  "api": "admin",
  "requestId": "3",
  "api": "admin",
  "action": "manageService",
  "params": {
    "serviceName": "modbus",
    "authTokens": [
      "authToken1",
      "authToken2"
    ]
  },
  "responseOptions": {
    "binaryFormat": "hex",
    "dataFormat": "objects",
    "numberFormat": "string"
  },
  "apiVersion": "1.0",
  "debug": "max",
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
{
    "authToken": "replaceWithAuthTokenFromCreateSession",
    "debugInfo": {
        "request": {
            "authToken": "replaceWithAuthTokenFromCreateSession",
            "api": "admin",
            "action": "manageService",
            "params": {
                "serviceName": "modbus",
                "command": "pause"
            },
            "responseOptions": {},
            "debug": "max"
        }
    },
    "errorCode": 0,
    "errorMessage": ""
}
{
  "requestId": "2",
  "result": {
  },
  "errorCode": -1,
  "errorMessage": "authToken invalid or expired.",
  "debugInfo": {
    "request": {
      "requestId": "2",
      "api": "admin",
      "action": "manageService",
      "params": {
        "authTokens": [
          "an AuthToken to be described"
        ]
      },
      "responseOptions": {
        "binaryFormat": "hex",
        "dataFormat": "objects",
        "numberFormat": "string",
        "includeFields": [
        ],
        "excludeFields": [
        ],
        "includePaths": [
        ],
        "excludePaths": [
        ]
      },
      "apiVersion": "1.0",
      "debug": "max",
      "authToken": "replaceWithAuthTokenFromCreateSession"
    },
    "serverSuppliedValues": {
    },
    "errorData": {
    },
    "warnings": [
      {
        "warningCode": 0,
        "warningMessage": "",
        "warningData": {
        }
      }
    ],
    "executionPlan": {
    }
  }
}

The "manageService" action configures settings for a FairCom Edge service. It can also send standard actions to the engine to pause, resume, restart, shut down, and start up the service. A service either collects data and stores it in an integration table or takes data from an integration table and delivers it to an external system.

API actionsJSON ADMIN APIJSON ActionmanageServicemanageServicesmanagesServicemanagesServicesmanage serviceservice configurationservice managementservice settingsconfigure servicecontrol servicesstart servicestop servicepause serviceresume servicerestart service

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. manageService "params" property summaries

Property

Description

Default

Type

Limits (inclusive)

authTokens

(optional) contains one or more authorization token strings.

[]

array

At least one "authToken"

serviceName

specifies a name for the web application. The FairCom server ignores this property.

Required - No default value

string

1 to 64 bytes



The "authTokens" property is an array that specifies which sessions the server should return in its response. At least one valid "authToken" must be specified in this property.

{
  "api": "admin",
  "requestId": "2",
  "action": "replaceWithCorrectAction",
  "params": {
    "authTokens": [
      "replaceWithAuthTokenFromCreateSession",
      "replaceWithAuthTokenFromCreateSession"
    ]
  },
  "authToken": "replaceWithAuthTokenFromCreateSession"
}

The "serviceName" property contains the name of a FairCom input or output service. This property is required.

See the "params" topic of each specific service for the requirements of this property.

The following services are available as of the V5 release:
  • "MODBUS"

  • "SIEMENSUDT2JSON"

  • "OPCUA"

Note

The SQL, JSON RPC, and REST services can automatically query any integration table in FairCom's servers without requiring configuration.

Note

MQTT always represents both input and output services. This is because once a topic is created and assigned to an integration table, any MQTT client can publish messages to it and subscribe to those messages.