Retrieve data FROM NetXMS

Started by lweidig, August 16, 2017, 05:30:21 AM

Previous topic - Next topic

lweidig

I am looking for a way to grab data FROM NetXMS that it has collected for display in a web application that is primarily Javascript based.  Installed the Web REST api and have it working to get node based information, but cannot figure out a way to get DCI information which is what I really want.

What suggestions do people have for polling data that NetXMS is storing? 

lweidig

So no easy way to get data from NetXMS???  Possible to just grab last poll information straight from database?  Are schemas available somewhere?

Tatjana Dubrovica

Hi,
It is possible to get last values for DCI using Rest API.
Rest API information: https://wiki.netxms.org/wiki/Web_service_API

URL for DCI last value history: /objects/{object-id}/datacollection/{dci-id}/values GET request with possible filters from=timeAsUnixTimestamp, to=timeAsUnixTimestamp,t imeInterval=time in seconsds, itemCount=numberOfItemsToReturn

Option to get last values for multiple nodes for the same DCI. AdHoc Table functionality through rest using custom defined table :
URL: http://10.5.3.4:8080/api/summaryTable/adHoc
POST request Json:
{
    "baseObject":"ContainerName",
    "columns": [
        {
        "columnName":"Name1",
        "dciName":"DCIName1"
        },
       {
        "columnName":"Name2",
        "dciName":"DCIName2"
        }
    ]
}

duanebutler

I don't know much about the API,

But I can with confidence say that grabbing the data straight from SQL works.

We have done so in the past, successfully grabbing entries from SQL to populate reports using our own reporting server.

Regards

amirher

Thanks Tatjana!

Now we could grab DCI values from the REST API. It saves a lot of effort comparing with using the Java API. Just hope the the wiki info could be more comprehensive.

Marshall Chen

Quick question is where to get the help content for REST APIs.  https://wiki.netxms.org/wiki/Web_service_API is too simple.

Filipp Sudanov

Some info is present in admin documentation https://www.netxms.org/documentation/adminguide/advanced.html#web-api-rest-api
REST API is work in progress and may change a lot in future, documenting of it waits until it get's more or less finalized. So currently the only way is to read source code.