NetBeez NextGen (Version 20.0+) provides a unified JSON:API HTTP interface for querying monitoring telemetry and automating configuration across Agents, Agent Groups, Targets, Scheduled Tests, Wi-Fi Profiles, Hopping Groups, Alerts, Incidents, Monitoring Conditions, and Reports. Every NextGen server also serves its complete OpenAPI 20.0 contract at GET /openapi.yaml, includes an in-app Code JSON:API and curl inspector on entity pages, and pairs with the MCP Server (/mcp) for AI-driven workflows.
In this article:
Overview & Key Conventions
All programmatic HTTP endpoints in NetBeez NextGen follow the JSON:API specification with consistent conventions across read and write operations:
UUID v4 Identifiers: Every resource primary key (
id) and relationship foreign key is a standard UUID v4 string (replacing legacy integer IDs).Slash-Namespaced Resource Types: JSON:API
typevalues and compound-documentincludepaths use forward-slash namespacing—for example,agent,agent/group,target,target/ping_template,scheduled/iperf_template,wifi/profile, andwifi/hopping_group.JSON Headers Required: Always send
Accept: application/json(andContent-Type: application/jsononPOSTandPUTrequests). Browser-orientedtext/htmlor Turbo Stream requests carrying anAuthorizationheader are rejected with403 Forbidden.
Authenticating with Bot Users
In Version 20.0+, dedicated Bot Users replace legacy Bearer API keys and JWT sessions. An Administrator can create Bot Users in Settings → Users & Access → Bot Users with either Read Only or Read Write permissions.
Include the Bot User's one-time generated password (as token) and system email (bot-<uuid>@netbeez.local, as email) in the HTTP Authorization header on every request:
Authorization: Token token=<bot_password>, email=<bot_email> Accept: application/json Content-Type: application/json Cache-Control: no-store
Role Enforcement:Read Only Bot Users can call
GETendpoints across the API;POST,PUT, andDELETEmutations require a Read Write Bot User. For least-privilege security, Bot Users cannot be assigned the Administrator role.MFA & License Rules: Bot Users are exempt from interactive Authenticator-app MFA challenges (whereas human local accounts cannot use HTTP token headers when MFA is enabled). If the server license expires (Settings → License), Bot User requests return
403 Forbidden(License is expired) until renewed.
Fetching the OpenAPI 20.0 Specification
Every NetBeez NextGen deployment serves its authoritative OpenAPI 3.0.3 YAML specification (version 20.0.0) directly from GET /openapi.yaml. This endpoint requires Bot User token authentication and never falls back to browser session cookies:
curl -sS "https://<your-netbeez-hostname>/openapi.yaml" \ -H "Authorization: Token token=<bot_password>, email=<bot_email>" \ -o netbeez-openapi-20.0.yaml
You can import netbeez-openapi-20.0.yaml directly into Postman, Insomnia, Bruno, or OpenAPI client generators to inspect every request body schema, enum, filter parameter, and response structure. Connected AI assistants using the NetBeez MCP Server can also retrieve this specification on demand via the get_openapi_spec tool.
In-App JSON:API & cURL Viewer
To inspect the live JSON:API representation of a specific monitoring resource without leaving the dashboard, open any Agent, Target, Wi-Fi Profile, or Scheduled Test detail page (or an individual test graph header) and click the Code button in the top-right header:
Copy Code: Copies the resource's serialized JSON:API payload to your clipboard as a template for automation scripts.
Copy as cURL: Copies a ready-to-run
curlcommand targeting that resource's exact UUID endpoint withBOT_USER_PASSWORDandBOT_USER_EMAILplaceholders.
Endpoint Groups & Query Parameters
Core JSON:API Endpoint Groups
Domain | Primary Endpoints | Supported Operations |
Agents & Agent Groups |
| List, get, update, soft-delete agents; CRUD agent groups; query availability and CPU/RAM/disk metrics |
Targets & Target Tests |
| CRUD targets with Ping, DNS, HTTP, Traceroute, and Path Analysis templates; pause/resume tests; query metrics and hop results |
Scheduled Tests |
| CRUD Iperf, Network Speed, VoIP, and Custom Command templates; inspect runs and metrics |
Wi-Fi Monitoring |
| CRUD Wi-Fi profiles and hopping groups; query signal/link metrics, access points, and connection timing statistics |
Alerts, Incidents & Conditions |
| Query open/closed alerts, alert detectors, correlated incidents, and monitoring conditions |
Reports & Schedules |
| List, generate, and delete reports; CRUD recurring report schedules |
Pagination, Filtering, Sorting & Includes
Pagination: Pass
page[page]=1(1-based) andpage[limit]=25(1to500, default25). Collection responses includemeta.page(page,limit,total) andlinks(self,next,prev).Filtering: Scope collections using
filter[<field>]parameters—for example,filter[ids][],filter[active]=true,filter[categories][]=network_agent,filter[groups][]=<group_uuid>,filter[names]=HQ-Core(prefix with!to negate), orfilter[names][regexp]=^branch-. Array filters accept repeatedfilter[field][]=a&filter[field][]=bkeys or comma-separated values.Time Windows: Metric, availability, alert, and hop-result endpoints accept
filter[time](5_min,15_min,1_hour,4_hour,12_hour,24_hour,7_day,yesterday,week,month, orcustomwithfilter[time_range][]).Sorting: Pass
order[attributes]=name(oroccurred_at,started_at,scheduled_at) andorder[direction]=ascordesc.Compound Documents (
include): Request related records in a single call using comma-separated whitelisted relationship paths, such asinclude=agent/network_interfaces,agent/groupson/agentsorinclude=test_templates,agents,agent_groupson/targets/{id}.
JSON:API Read & Write Examples
Example 1: List Active Network Agents with Interfaces and Groups
curl -sS "https://<your-netbeez-hostname>/agents?filter[categories][]=network_agent&filter[active]=true&include=agent/network_interfaces,agent/groups&page[limit]=10" \ -H "Authorization: Token token=<bot_password>, email=<bot_email>" \ -H "Accept: application/json"
Example 2: Create a Target with an ICMP Ping Template and Agent Group
Using a Read Write Bot User, send a JSON:API data payload to POST /targets. To detach an existing relationship on a later PUT /targets/{id} call, include "action": "remove" on that relationship identifier object:
curl -sS -X POST "https://<your-netbeez-hostname>/targets" \
-H "Authorization: Token token=<bot_password>, email=<bot_email>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"data": {
"type": "target",
"attributes": {
"name": "Core DNS Resolver",
"description": "Primary internal DNS health check",
"wired_test": true,
"wifi_test": true
},
"relationships": {
"test_templates": {
"data": [
{
"type": "target/ping_template",
"attributes": {
"destination": "1.1.1.1",
"ping_type": 2,
"interval": 5,
"timeout": 5,
"jitter_mos": true
}
}
]
},
"agent_groups": {
"data": [
{
"id": "00000000-0000-4000-8000-000000000001",
"type": "agent/group"
}
]
}
}
}
}'
Migrating from the Legacy 15.x API
Swagger & Legacy Routes Retired: Legacy Swagger UI (
/swagger/index.html), legacyv0/v1//nb_api/endpoints, JWT session endpoints, and integer resource IDs are retired in NextGen 20.0. FetchGET /openapi.yamlfor the current contract.API Keys Migrated to Bot Users: During a Legacy 15.6 to NextGen 20.0 server migration, existing API keys are converted into Bot Users. Update client scripts from
Authorization: Bearer <key>toAuthorization: Token token=<bot_password>, email=<bot_email>and replace deprecatedpage[offset]pagination withpage[page]andpage[limit].Developer Community: For integration patterns and community scripts, visit the NetBeez Community.


