Difference between revisions of "Web service API"

693 bytes added ,  18:14, 13 September 2022
m
Text replacement - "^" to "{{deprecated}}"
m (Text replacement - "^" to "{{deprecated}}")
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
Web service API provides access to NetXMS via HTTP/HTTPS. API calls are REST-like (although not purely RESTful) and uses JSON for data exchange.
{{deprecated}}Web service API provides access to NetXMS via HTTP/HTTPS. API calls are REST-like (although not purely RESTful) and uses JSON for data exchange.


= Session Management =
= Session Management =
Line 43: Line 43:
Get all nodes and containers:
Get all nodes and containers:
  GET /objects?class=container,node
  GET /objects?class=container,node
Get DCI Summary adHoc
POST /summaryTable/adHoc
Post payload:
<pre>
{
    "baseObject":"ContainerName",
    "multiInstance":false,
    "columns": [
        {
        "columnName":"Free form name that will be used in return table for this column",
        "dciName":"Name of DCI, that will be used for filtering"
        },
        {
        "columnName":"Name2",
        "dciName":"DCIName2"
        }
    ]
}</pre>


== Get Specific Object ==
== Get Specific Object ==
'''GET''' /objects/''id''
'''GET''' /objects/''id''


== Get Last Values for Object ==
'''GET''' objects/''id''/lastvalues


== CURL Test ==
== CURL Test ==
Line 81: Line 103:
.. prints some data ..
.. prints some data ..
</pre>
</pre>
= Java 10 =
If curl test works but grafana returns "Internal error" ({"description":"Internal error","error":46}")<br>
Add "--add-modules java.xml.bind" to JAVA_OPTS in /etc/default/tomcat8