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:
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!
NetXMS actually has two web API options available:
- New Web API - Enabled by adding Module = webapi to your configuration. This is the modern API that we're actively developing and expanding. While it currently has limited functionality, it includes a dedicated Grafana endpoint that's specifically designed to work well with the Grafana Infinity plugin and requires less data parsing/modification on the Grafana side.
- Legacy Web API - The older netxms-websvc-VERSION.war service. This has more complete functionality currently but may require more data manipulation when using with Grafana plugins.
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:
Code Select
{
"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!