Endpoints used by the browser helpers
The helpers send requests tohttps://<NEURON_HOST>. These are the endpoints you should see in the browser’s network inspector:
ExecuteReport() manages registration and result assembly. Its event registration uses this JSON body, with the actual tab ID supplied by Events.js:
PopMessages; matching browser handlers divert progress from that queue.
Load the Neuron libraries
Read the JavaScript source served by the lab Neuron:- Agent.js — HTTP requests, authentication, and session handling.
- Agent.Things.js — concentrator queries, parameter submission, and asynchronous result assembly.
- Agent.Reports.js — the
GetReports,GetReportParameters, andExecuteReportmethods.
lab.tagroot.io. For your application, use the files served by your provider’s Neuron so they match its build.
In a browser integration, load these files from the same Neuron build:
userName and password are runtime inputs from your sign-in form. Clear the password input after login.
The helper generates the nonce and signature, calls /Agent/Account/Login, and stores the returned session JWT for subsequent calls.
The NEURON metadata tells Events.js where to receive events when your page uses another origin.
Your provider must allow your application’s origin for Agent API and Events access.
Use a browser referrer policy that sends the application origin so Agent API requests include the required Referer header.
An HTTPS page needs HTTPS scripts/API requests and WSS Events; Events.js selects ws:// when the page itself uses HTTP.
Events.js is needed for the execution helper to receive progress and settle its promise.
Discovery and parameter retrieval do not require asynchronous events.
List report IDs
The current helper expects the underlying node list to be an array. If the server returns a single node object,
the helper can return an empty list. The backend discovery sample normalizes both shapes.
Fetch a parameter form
Use a report ID from discovery:Stanza.x, or [] when no x element is returned.
Check for a valid form before execution. Normalize a single field object to an array when using the current execution helper.
See parameter forms.
Submit values and await completion
EachExecuteReport call starts report execution. For dashboards, use a shared backend job and cached results rather than calling it on every page load.
See dashboard refresh policies.
This example continues with the fetched form and an illustrative Month parameter:
HasErrors does not classify every message level.
The current helper serializes one nested string value per field (
field.value.value).
Use strings such as "0" and "false", not JavaScript numbers or booleans.
Multi-value fields require the HTTP submit form, which can contain repeated <value> elements.queryDone or queryAborted; an abort can resolve with HasErrors: true instead of rejecting.
Transport or command errors can reject the promise. Add an application deadline because missing events can leave it pending.
A local deadline does not cancel execution on the server.
See assembled results for the returned fields.
Method signatures
AgentAPI.Things.XmppHelper.GetFullJid(jid, false) and use the full JID for subsequent calls.
Resolve it again if the target reconnects. The helpers otherwise probe bare JIDs when needed.
When the user signs out, call await AgentAPI.Account.Logout() to end the session.