Table of Contents |
---|
Related Documentation
- We can also manage this information using the Admin GUI.
- opCharts API for reading node data opCore API V2
Nodes API
We can also manage nodes using the API.
Operation | Method | URL | Response | Example | ||
---|---|---|---|---|---|---|
Get Nodes | GET | http://host/en/omk/admin/api/v2/nodes.json | http://uburnto.opmantek.net/en/omk/admin/api/v2/nodes.json?requestData=undefined&page=1&per_page=25&sort_by=name&order=asc | |||
Get Node | GET | http://host/en/omk/admin/api/v2/nodes/{node_uuid}.json | http://uburnto.opmantek.net/en/omk/admin/api/v2/nodes/86a82b4c-6ef6-4691-8c8c-1fc8da334d6f.json | |||
Create Node | POST | http://host/en/omk/admin/api/v2/nodes.json | The node in json from the recently node created, including the UUID | http://uburnto.opmantek.net/en/omk/admin/api/v2/nodes
| ||
Update Node | PUT | http://host/en/omk/admin/api/v2/nodes/{node_uuid}.json | http://uburnto.opmantek.net/en/omk/admin/api/v2/nodes/b56ba595-69e7-4702-9fe5-49512e1340b0
| |||
Delete Node | DELETE | http://host/en/omk/admin/api/v2/nodes/{node_uuid}.json | http://uburnto.opmantek.net/en/omk/admin/api/v2/nodes/b56ba595-69e7-4702-9fe5-49512e1340b0 |
Important: All this methods are authenticated.
Operation | Method | URL | Example | ||
---|---|---|---|---|---|
Authenticate | POST | http://host/en/omk/admin/login | http://uburnto.opmantek.net/en/omk/opHA/login
|
We should receive a 200 response and a cookie, that we can reuse for next API calls.
...
cluster_id
is the uuid of which opHA server the node belongs to.
E.x.
Create Remote | POST | http://host/en/omk/admin/api/v2/nodes.json | http://uburnto.opmantek.net/en/omk/admin/api/v2/nodes.json
|
It will return the same output as for a local node:
...
cluster_id
is the uuid of which opHA server the node belongs to.
E.x.
Create Remote | PUT | http://host/en/omk/admin/api/v2/nodes/node_uuid.json | http://volla.opmantek.net:6042/en/omk/admin/api/v2/nodes/6ce5fd5c-d703-4d03-b36c-b8e01439a9f2.json
|
It will return the json node, the same structure that the CREATE.
...
If we should want to edit the remote node locally for some reason, we should use opnodenode_admin cli tool.
Related Documentation
...