Farm topology members (GET)

Retrieves the list of members of the farm.

Roles

Users in the following roles are authorized to perform this operation:

  • worklightadmin
  • worklightdeployer
  • worklightmonitor
  • worklightoperator

Method

GET

Path

/management-apis/1.0/runtimes/runtime-name/farm

Example

https://www.example.com/worklightadmin/management-apis/1.0/runtimes/myruntime/farm?locale=de_DE

Path Parameters

runtime-name
The name of the runtime. This is the context root of the runtime web application, without the leading slash.

Query Parameters

Query parameters are optional.

locale
The locale used for error messages.

Produces

application/json, application/xml, text/xml

Response

The list of nodes registered in the current farm topology

JSON Example

{
  "nodes" : [
    {
      "adminUser" : "johndoe",
      "appServerType" : "LIBERTY",
      "heartbeatTime" : "2014-12-08T23:32:04.700Z",
      "host" : "192.168.0.4",
      "pk" : {
        "projectName" : "mytestproject",
        "serverId" : "Farm_Node_3",
      },
      "port" : "8686",
      "status" : "ALIVE",
      "tomcatPort" : "8989",
    },
    ...
  ],
  "numberOfNodes" : 3,
  "productVersion" : "7.0",
}

XML Example

<?xml version="1.0" encoding="UTF-8"?>
<farm-members
  numberOfNodes="3"
  productVersion="7.0">
  <nodes>
    <node
      adminUser="johndoe"
      appServerType="LIBERTY"
      heartbeatTime="2014-12-08T23:32:04.700Z"
      host="192.168.0.4"
      port="8686"
      status="ALIVE"
      tomcatPort="8989">
      <pk
        projectName="mytestproject"
        serverId="Farm_Node_3"/>
    </node>
    ...
  </nodes>
</farm-members>

Response Properties

The response has the following properties:

nodes
The array of farm nodes
numberOfNodes
The total number of nodes.
productVersion
The exact product version.

The farm node has the following properties:

adminUser
The user id to use for REST
appServerType
The server type of this node
heartbeatTime
The last heartbeat time
host
The hostname of this node
pk
The primary key of this node
port
The port to use for REST or RMI
status
The status of this node
tomcatPort
The port to use for RMI if behind a firewall

The farm node pk has the following properties:

projectName
The MobileFirst runtime related to this farm member
serverId
The server identifier of this farm member

Errors

403
The user is not authorized to call this service.
404
The corresponding runtime is not found.
500
An internal error occurred.