GraphML API
The /graphml endpoint stores and retrieves named GraphML graphs (used by the topology and graph features). It is mounted under /opennms/rest/graphml and produces/consumes application/xml (GraphML). The {graph-name} path element names the graph.
GETs (reading data)
| Resource | Description |
|---|---|
|
Retrieves the stored GraphML graph with the given name as GraphML XML. |
POSTs (Creating Data)
POST consumes application/xml (a GraphML document).
| Resource | Description |
|---|---|
|
Creates a new GraphML graph stored under the given name from the posted GraphML XML. Returns |
DELETEs (Removing Data)
| Resource | Description |
|---|---|
|
Deletes the stored GraphML graph with the given name. |
Examples using cURL
Create a graph from a GraphML file
curl -u admin:admin -H 'Content-Type: application/xml' \
--data-binary @my-graph.xml \
"http://127.0.0.1:8980/opennms/rest/graphml/my-graph"
Fetch a stored graph
curl -u admin:admin -H 'Accept: application/xml' \
"http://127.0.0.1:8980/opennms/rest/graphml/my-graph"
Delete a stored graph
curl -u admin:admin -X DELETE "http://127.0.0.1:8980/opennms/rest/graphml/my-graph"