NetXMS Support Forum

English Support => General Support => Topic started by: Manuel Schneider on December 23, 2025, 04:56:42 PM

Title: NetXMS REST-API
Post by: Manuel Schneider on December 23, 2025, 04:56:42 PM
Hi,

I'm trying to build dynamic Dashboards in Grafana using the integrated Web-API, but unfortunately with limited success...

First Question: Is the integrated Web-API complete with all NetXMS-API-Endpoints, or is the integrated one (enabled by including `Module = webapi` in netxmsd.conf) only a lighter version, in which case I should probably switch to the Full-API (netxms-websvc-VERSION.war)?

Second Question: Is there a Bug in the API with user-provided query values?
When querying the Endpoint '/v1/grafana/infinity/object-query' and providing query values, those user-provided query values are not used within object-query.
I've modified my Object-Query to output a debug-column with a serialization of the `$INPUT`-Hashmap, when querying via the NetXMS-Client, I see my Input, but when querying via the API, there is no Input to be seen (see Example in Attachments).

Best regards and Merry Christmas,
Manuel
Title: Re: NetXMS REST-API
Post by: Tatjana Dubrovica on January 05, 2026, 02:57:27 PM
Hi,

NetXMS actually has two web API options available:


Since you're using the Grafana Infinity plugin, which can work with any web API, you have flexibility here. You can use either the new API, the legacy API, or even both depending on which is easier for your specific use case.
For new integrations, I'd recommend trying the new Web API's Grafana endpoint first as it will provide the smoothest experience with the Infinity plugin. However, if you need functionality that isn't yet available in the new API, the legacy service is still a viable option.

Question 2 (inputFields Format):

You're right that the documentation needs correction - I apologize for the confusion. The inputFields parameter should be formatted as a JSON object with key-value pairs, not as an array.
Correct format:
{
   "rootObjectId": 2,
   "queryId": 1,
   "inputFields": {
       "name": "value",
        "anotherField": "anotherValue"
    }
}
The code extracts these fields as a StringMap and supports multiple data types:

Strings (used as-is)
Integers (converted to string representation)
Floating-point numbers (converted to string representation)
Booleans (converted to "true"/"false" strings)

I'll update the documentation to reflect the correct format. Thank you for catching this issue!

Title: Re: NetXMS REST-API
Post by: Manuel Schneider on January 08, 2026, 09:27:38 AM
Hi Tatjana,

many thanks for your explanation!
With your Info, I've got it working :-)

Best Wishes,
Manuel