Skip to content

Topology

Retrieve information about all the nodes managed in WombatOAM.

GET /api/topo/node
curl -X GET "http://127.0.0.1:8080/api/topo/node" -u admin:PASSWORD
[
{
"id": "298548c9-f5f8-464d-9a2c-07d494c3ecd4",
"name": "wombat@127.0.0.1",
"node_family_id": "01a85d4a-7af3-43bd-b96e-21f0ffbc2e3b",
"host": "undefined",
"cookie": "wombat",
"domain_id": "undefined",
"state": "UP",
"deleted": false,
"plugins_opts": []
},
{...},
{...}
]

None.

An array of node objects.

Retrieve information about all the managed families of nodes in WombatOAM.

GET /api/topo/node-family
curl -X GET "http://127.0.0.1:8080/api/topo/node-family" -u admin:PASSWORD
[
{
"id": "823f293e-ba72-43b0-a4cf-e8be08d68f22",
"name": "OTP APN 181 01 R16B03-1",
"description": [],
"node_selection": "random",
"bootstrap_strategy": [
"wo_bootstrap_strategy",
"none",
[]
],
"bootstrap_strategy_opts": [],
"neighbors": [],
"nodes": [
"95b12f74-0c45-4b38-827f-59db5e88e56c",
"f3e198ae-aace-4755-a8c1-68dc9610a904",
"bf1641d1-b50c-4bb0-8c1e-387713b9323f",
"19c61bb9-9f32-4c29-9e87-cbbac74ba489"
],
"plugins_opts": [],
"deleted": false
},
{...},
{...}
]

None.

An array of node family objects.

GET /api/topo/node/NODE_ID
curl -X GET "http://127.0.0.1:8080/api/topo/node/298548c9-f5f8-464d-9a2c-07d494c3ecd4" -u admin:PASSWORD
{
"id": "298548c9-f5f8-464d-9a2c-07d494c3ecd4",
"name": "wombat@127.0.0.1",
"node_family_id": "01a85d4a-7af3-43bd-b96e-21f0ffbc2e3b",
"host": "undefined",
"cookie": "wombat",
"domain_id": "undefined",
"state": "UP",
"deleted": false,
"plugins_opts": []
}
Argument Description
node ID Required. The identifier of the node to be retrieved.

A node object if a valid identifier was provided. When requesting the identifier of a node that has been deleted, the “deleted” property will be true.

Retrieve details of a specified node family.

GET /api/topo/node-family/NODE_FAMILY_ID
curl -X GET "http://127.0.0.1:8080/api/topo/node-family/01a85d4a-7af3-43bd-b96e-21f0ffbc2e3b" -u admin:PASSWORD
{
"id": "01a85d4a-7af3-43bd-b96e-21f0ffbc2e3b",
"name": "wombat pre-0.9.0",
"description": [],
"node_selection": "random",
"bootstrap_strategy": [
"wo_bootstrap_strategy",
"none",
[]
],
"bootstrap_strategy_opts": [],
"neighbors": [],
"nodes": [
"298548c9-f5f8-464d-9a2c-07d494c3ecd4"
],
"plugins_opts": [],
"deleted": false
}
Argument Description
node family ID Required. The identifier of the node family to be retrieved.

A node family object. When requesting the identifier of a node family that has been deleted, the “deleted” property will be true.

Add a managed node.

POST /api/topo/action/add-node
{
"name": "NEW_NODE_NAME",
"cookie": "NEW_NODE_COOKIE"
}
curl -X POST "http://127.0.0.1:8080/api/topo/action/add-node" \
-H "Content-Type: application/json" \
-d "{\"name\":\"wo_test_1@127.0.0.1\", \"cookie\":\"cookietest\"}" \
-u admin:PASSWORD
{
"id": "c2d750f5-b4eb-40d6-b15c-9226577c0c4d",
"name": "wo_test_1@127.0.0.1",
"node_family_id": "823f293e-ba72-43b0-a4cf-e8be08d68f22",
"host": "undefined",
"cookie": "cookietest",
"domain_id": "undefined",
"state": "STOPPED",
"deleted": false,
"plugins_opts": []
}
Argument Description
name Required. The name of the node to be added.
cookie Required. The cookie for the node to be added.

The node object. Note that, right after adding the node, the “state” may be STOPPED or DOWN. If an error occures (the node is not found), an error object is returned:

{"error":"ErrorStr","reason":"Reason","success": false}

Add a new managed node, and discover and automatically add other nodes connected to it.

POST /api/topo/action/add-node-and-disc
{
"name": "NEW_NODE_NAME",
"cookie": "NEW_NODE_COOKIE"
}
curl -X POST "http://127.0.0.1:8080/api/topo/action/add-node-and-disc" \
-H "Content-Type: application/json" \
-d "{\"name\": \"wo_test_1@127.0.0.1\", \"cookie\": \"cookietest\"}" \
-u admin:PASSWORD
[
{
"id": "a2df05ae-75ba-49aa-a993-b3cfcd63a120",
"name": "wo_test_3@127.0.0.1",
"node_family_id": "93be4f01-dae6-49b0-9608-4552f841a720",
"host": "undefined",
"cookie": "cookietest",
"domain_id": "undefined",
"state": "STOPPED",
"deleted": false,
"plugins_opts": []
},
{...},
{...}
]
Argument Description
name Required. The name of the node to be added.
cookie Required. The cookie for the node to be added.

The node objects for the discovered nodes. Note that, right after adding the nodes, the “state” may be STOPPED or DOWN. If an error occures (the node is not found), an error object is returned:

{"error":"ErrorStr","reason":"Reason","success": false}

Add a node family.

POST /api/topo/node-family
{
"name": "NEW_FAMILY_NAME",
"bootstrap_node_selection": "SELECTION",
"bootstrap_strategy": "STRATEGY",
"bootstrap_strategy_opts": [ ]
}
curl -X POST "http://127.0.0.1:8080/api/topo/node-family" \
-H "Content-Type: application/json" \
-d "{\"name\":\"new_family_name\", \"bootstrap_node_selection\":\"random\", \"bootstrap_strategy\":\"simple\", \"bootstrap_strategy_opts\":[]}" \
-u admin:PASSWORD
{
"id": "0db17632-5264-48e0-9282-7cb2db3983d6",
"name": "new_family_name",
"description": [],
"node_selection": "selection",
"bootstrap_strategy": "strategy",
"bootstrap_strategy_opts": [],
"neighbors": [],
"nodes": [],
"plugins_opts": [],
"deleted": false
}
Argument Description
name Required. A custom string with which to identify the node family.
bootstrap_node_selection Optional. Defines how another node is selected when a new node joins the cluster. Possible values: none, random, and {node, UUID} The default value is none.
bootstrap_strategy Optional. Determines what WombatOAM should do when it deploys a new node to the node family. The options are none, simple, and custom (you can specify a script to be executed in bootstrap_strategy_opts). The default value is custom.
bootstrap_strategy_opts Optional. A list containing details of what should happen when a new node is deployed into the node family, for example the execution of a specified script. The list may be empty.

A node family object.

Remove a specified node from being managed in WombatOAM.

DELETE /api/topo/node/NODE_ID
curl -X DELETE "http://127.0.0.1:8080/api/topo/node/a2df05ae-75ba-49aa-a993-b3cfcd63a12" \
-H "Content-Type: application/json" \
-u admin:PASSWORD

204 No Content

Argument Description
node family ID Required. The identifier of the node to be removed.

Only the HTTP response code.

Remove a specified node family from being managed in WombatOAM.

DELETE /api/topo/node-family/NODE_FAMILY_ID/force
curl -X DELETE "http://127.0.0.1:8080/api/topo/node-family/823f293e-ba72-43b0-a4cf-e8be08d68f22/force" \
-u admin:PASSWORD

204 No Content

Argument Description
node family ID Required. The identifier of the node family to be removed.

Only the HTTP response code.

Move a specified node to a specified node family.

POST /api/topo/action/move-node
curl -X POST "http://127.0.0.1:8080/api/topo/action/move-node" \
-H "Content-Type: application/json" \
-d "{\"node\":\"d1a4c84f-754a-4d44-9ba2-4932faf65004\", \"family\":\"33c14e1f-5e56-415f-9b2c-32ff9ed653ff\"}" \
-u admin:PASSWORD
{
"success": true
}
curl -X POST "http://127.0.0.1:8080/api/topo/action/move-node" \
-H "Content-Type: application/json" \
-d "{\"node\":\"d35345f-754a-4d44-9ba2-4932fgvi73y\", \"family\":\"334533f-5e56-415f-9b2c-32ff9vjhebff\"}" \
-u admin:PASSWORD
{
"success": false,
"reason": "node_or_family_not_found"
}
Argument Description
node ID Required. The identifier of the node.
node family ID Required. The identifier of the node family to move the node to.

returns an object showing the success or failure.

Rename a family.

POST /api/topo/node-family/:FamilyID/update
curl -X POST "http://127.0.0.1:8080/api/topo/node-family/:FamilyID/update" \
-H "Content-Type: application/json" \
-d "{\"name\":\"NewName\"}" \
-u admin:PASSWORD
{
"success": true
}
curl -X POST "http://127.0.0.1:8080/api/topo/node-family/:WrongFamilyID/update" \
-H "Content-Type: application/json" \
-d "{\"name\":\"NewName\"}" \
-u admin:PASSWORD
{
"error": "Family not found",
"success": false
}
Argument Description
Node family ID Required. The identifier of the node family.
New name Required. The new name of the family.

returns an object showing the success or failure.

Analyse the possibility of reaching the node via Distributed Erlang.

POST /api/topo/action/analyse-reachability
{
"name": "NODE_NAME"
}
curl -X POST "http://127.0.0.1:8080/api/topo/action/analyse-reachability" \
-H "Content-Type: application/json" \
-d "{\"name\":\"wo_test_1@127.0.0.1\"}" \
-u admin:PASSWORD
{
"reachability": "should be reachable",
"details": [
{
"checksPerformed": [
"check_node_format",
"check_name_type",
"check_host_resolution",
"check_epmd_port",
"check_node_in_epmd",
"check_node_dist_port"
]
}
],
"description": "",
"hints": [
"The Erlang node may have a different cookie from the one specified.",
"The Erlang node may have been registered addressing the host in a different way than specified."
]
}
curl -X POST "http://127.0.0.1:8080/api/topo/action/analyse-reachability" \
-H "Content-Type: application/json" \
-d "{\"name\":\"name@\"}" \
-u admin:PASSWORD
{
"reachability": "is not reachable",
"details": [
{
"reasonCode": "bad_node_format"
},
{
"reasonDetails": "[{node,name@}]"
}
],
"description": "The node name specified name@ does not comply with the name@host format.",
"hints": [
"Specify a node name compliant to the name@host format."
]
}
Argument Description
name Required. The name of the node to be analysed.

An object describing the reachability of the node, including the checks performed, the reason why the node might not be reachable, (if relevant), and steps the user could take (under “hints”) concerning the management of the node. The fields number_of_crashlogs_this_hour and number_of_new_alarms_raised_this_hour show the number updates on those counters between the beginning of the current hour and the current time.

Return statistical information about the entire cluster.

GET /api/topo/node-stat
curl -X GET "http://127.0.0.1:8080/api/topo/node-stat" -u admin:PASSWORD
{
"number_of_nodes": 2,
"number_of_up_nodes": 2,
"number_of_families": 1,
"number_of_crashlogs_this_hour": 22,
"number_of_new_alarms_raised_this_hour": 57,
"number_of_active_alarms": 0,
"family_stats": [
{
"id": "c0dce081-89ae-458d-8465-0533a29c4037",
"number_of_nodes": 2,
"number_of_up_nodes": 2
}
]
}
Argument Description

Returns information about the managed nodes, containing information about the number of nodes, running nodes, managed node families, number of alarms and number of crash logs in the last one hour.