NetXMS Support Forum

English Support => General Support => Topic started by: lweidig on August 16, 2017, 05:30:21 AM

Title: Retrieve data FROM NetXMS
Post by: lweidig on August 16, 2017, 05:30:21 AM
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? 
Title: Re: Retrieve data FROM NetXMS
Post by: lweidig on August 19, 2017, 04:54:02 PM
So no easy way to get data from NetXMS???  Possible to just grab last poll information straight from database?  Are schemas available somewhere?
Title: Re: Retrieve data FROM NetXMS
Post by: Tatjana Dubrovica on August 31, 2017, 03:45:13 PM
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"
        }
    ]
}
Title: Re: Retrieve data FROM NetXMS
Post by: duanebutler on September 04, 2017, 10:20:54 AM
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
Title: Re: Retrieve data FROM NetXMS
Post by: amirher on October 04, 2017, 09:46:44 AM
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.
Title: Re: Retrieve data FROM NetXMS
Post by: Marshall Chen on June 29, 2020, 09:48:36 AM
Quick question is where to get the help content for REST APIs.  https://wiki.netxms.org/wiki/Web_service_API is too simple.
Title: Re: Retrieve data FROM NetXMS
Post by: Filipp Sudanov on July 01, 2020, 03:20:41 PM
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.