Decider Cluster REST Interface

Data

A decider node dictionary contains the following fields:

  • nodeid

    The node ID (IPv4 or IPv6 address).

  • status

    The current status of the decider node:

    • running: The node is enabled and running.
    • disabled: The node is disabled.
    • degraded: The node is enabled but unreachable for the cluster.
  • product

    The vWAF product version of the decider node.

  • system

    Information about the host system (operating system, version number).

  • min_cores

    The minimum number of cores that the decider node is configured to use.

  • max_cores

    The maximum number of cores that the decider node is configured to use. A value of zero means unlimited.

  • configured_cores

    The number of cores that are configured on the decider node itself.

  • used_cores

    The number of cores which are actually used due to the available licenses. This should be min(max_cores, configured_cores) but it can be lower if there aren’t enough cores licensed.

  • bound_master

    The administration node to which this decider node is bound.

  • forced_bound_master

    The preferred admin node which is to be used to bind this decider node.

The bound_master dict and the forced_bound_master dict have the following fields:

  • master_id: The internal master ID (this ID is unique in the whole cluster)
  • master_ip: The IP address of the administration node that’s seen by the decider node. This IP address may differ from the administration node IP address in the cluster.

For more information regarding cluster management, see Cluster Management.

The Administration Cluster REST Interfaceprovides similar functionality, for administration nodes (rather than decider nodes).

Getting a list of decider nodes

  • Request

    Method GET
    URL /cluster/deciders
    Arguments
  • Response

    Return code Arguments Meaning
    200 [ {decider1}, {decider2}, ... {deciderN} ] successfully returned a list containing all decider nodes
    401 - no login
    403 - not enough rights
    500 - internal server error
  • Example

    The following request retrieves a list of all decider nodes in the cluster. In this case, there is only one node, which is the node with the node ID "127.0.0.1:8086".

    $ curl -u admin:admin -H 'Content-Type: application/json' http://127.0.0.1:8087/api/af/2.0/cluster/deciders {    "__name": "deciders",    "__path": "/api/af/2.0/cluster/deciders/",    "__subnodes": [        "127.0.0.1:8086"    ],    "nodes": [        {            "bound_master": null,            "configured_cores": null,            "forced_bound_master": null,            "max_cores": 0,            "min_cores": 1,            "nodeid": "127.0.0.1:8086",            "product": null,            "status": "degraded",            "system": null,            "used_cores": 1,            "version": null        }    ] }

Getting the data of a decider node

  • Request

    Method GET
    URL /cluster/deciders/NODEID
    Arguments
  • Response

    Return code Arguments Meaning
    200 { nodedata } successfully returned a dictionary containing all information about the decider node
    401 - no login
    403 - not enough rights
    404 - decider node not found
    500 - internal server error
  • Example

    The following request retrieves the data of the decider node that has the node ID “127.0.0.1:8086”.

    $ curl -u admin:admin -H 'Content-Type: application/json' http://127.0.0.1:8087/api/af/2.0/cluster/deciders/127.0.0.1:8086 {    "__name": "127.0.0.1:8086",    "__path": "/api/af/2.0/cluster/deciders/127.0.0.1:8086/",    "__subnodes": [        "stats"    ],    "bound_master": null,    "configured_cores": null,    "forced_bound_master": null,    "max_cores": 0,    "min_cores": 1,    "nodeid": "127.0.0.1:8086",    "product": null,    "status": "degraded",    "system": null,    "used_cores": 1,    "version": null }

Adding a decider node

  • Request

    Method POST
    URL /cluster/deciders
    Arguments { 'nodeid': NODEID, ... }

    You can only set the status to enabled or disabled, but you can’t set it to degraded.

  • Response

    Return code Arguments Meaning
    200 - administration node successfully added
    401 - no login
    403 - not enough rights
    409 - node already exists or malformed node ID
    500 - internal server error

Changing a decider Node

  • Request

    Method PUT

    URL

    /cluster/deciders/NODEID

    Arguments

    { nodedata }

    You can only set the status to enabled or disabled, but you can’t set it to degraded.

  • Response

    Return code Arguments Meaning

    200

    -

    decider node successfully changed

    401

    -

    no login

    403

    -

    not enough rights

    404

    -

    decider node not found

    409

    -

    malformed, conflicting, or missing data

    500

    -

    internal server error

Deleting a decider node

  • Request

    Method DELETE

    URL

    /cluster/deciders/NODEID

    Arguments

    -

    You can only set the status to enabled or disabled, but you can’t set it to degraded.

  • Response

    Return code Arguments Meaning

    200

    -

    decider node successfully deleted

    401

    -

    no login

    403

    -

    not enough rights

    404

    -

    decider node not found

    500

    -

    internal server error