For a dashboard, execute reports from a scheduled backend job or a controlled manual refresh and cache the completed result.
Dashboard loads should read that cache. See Refresh reports for a dashboard.
Prepare your connection
Have these values ready before sending requests:
The provider must grant report access and approve your account’s presence subscription to the report server.
Keep shared credentials and JWTs on your backend. All hosts, report names, and response values below are illustrative.
The request destination is always your Agent API host, even when the Reports JID points to another Neuron.
For example, the query URL is
https://neuron.example.com/Agent/Xmpp/InformationQuery.
The to field inside its JSON body selects the report server.
1. Sign in
Generate a fresh nonce from at least 32 cryptographically random bytes and encode it as Base64. Calculate the signature using the exact username, hostname, and nonce:https:// and paths. Include a non-default port if your provider uses one.
Use standard Base64 for the HMAC digest. Send the same nonce string that you signed.
Send POST https://neuron.example.com/Agent/Account/Login:
jwt and expiry in your backend session. Use that JWT in all remaining requests.
expires is a Unix timestamp in seconds; multiply by 1,000 before passing it to JavaScript’s Date constructor.
Replace the example Referer with your application’s HTTPS URL throughout this guide.
2. Resolve the report server
Send the provider’s bare Reports JID toPOST https://neuron.example.com/Agent/Xmpp/PresenceProbe:
jid. An illustrative response, with other fields omitted:
/current-resource, as to in subsequent queries. Do not invent the resource suffix.
If the response is unavailable or lacks a full JID, wait for the target to become available and resolve it again.
The suffix can change when the target reconnects. If your provider already supplied a current full JID, use it directly and skip the probe.
A probe can send a presence subscription request and return 403 until the target approves it.
Ask your provider to approve that request before retrying; a successful login does not grant presence access.
3. Discover report IDs
SendPOST https://neuron.example.com/Agent/Xmpp/InformationQuery with type: "get" and the getAllNodes XML command:
POST. The JSON type selects the query operation, and xml is a string containing one XML element.
Keep the namespace and source ID Reports exactly as shown.
Check both the HTTP status and ok in the response. A successful response can look like this:
Stanza.nodeInfos.nodeInfo, which can be one object, an array, or absent when there are no nodes.
To obtain the same report list as the Reports helper, keep nodes with a parentId and enabled hasCommands, excluding nodes with hasChildren enabled.
These flags can be JSON booleans or strings. Preserve each matching id exactly, including spaces and backslashes.
An empty list means no matching report nodes were returned. An HTTP error or ok: false means the query failed.
If the source is missing or hidden, use the source visibility check before continuing.
4. Fetch the selected report’s parameters
Call the same endpoint withgetCommandParameters, the discovered report ID, and command='Execute':
ok: true, read the form from Stanza.x. An illustrative response, with metadata omitted:
Month is an example; your report may have different fields or none. Preserve hidden fields and normalize a single field object to an array.
See parameter forms for multi-value fields and other types.
Use an XML builder or escape XML attributes when substituting report IDs. Then use a JSON serializer for the outer request.
In JSON, \\ represents one backslash; the report ID itself contains a single backslash.
5. Execute or end the session
You now have the JWT, full Reports JID, exact report ID, and parameter form needed to execute a report. Keep this session open and continue with Run a report over HTTP, which shows submission and result collection. If you are finished with discovery, sendPOST https://neuron.example.com/Agent/Account/Logout with an empty JSON object:
Optional Node.js sample
The discovery sample implements login, presence resolution, report listing, parameter retrieval, and logout. It requires Node.js 22 or later and does not execute reports. Save it asdiscover.mjs and create a private .env file beside it:
.env out of source control.