REST API
Authentication, every endpoint and parameter of the AI data API at /api/ai/v1, the asset fact format and typical calls.
The REST API lets AI ops assistants, scheduled jobs and scripts read the portal's business entries and asset register and fill in details. Each endpoint matches an MCP tool.
Authentication
Every request carries an API token:
Authorization: Bearer rstnav_xxxxxxxxTokens are created under AI access > API tokens in the admin console, with read only (read) or read and write (enrich) permission and optional department and business zone limits. See API tokens and AI review. Requests and responses are JSON, and every call is recorded in the audit log.
Endpoints
The prefix is {base_url}/api/ai/v1.
| Method | Path | Permission | Description |
|---|---|---|---|
| GET | /context?include_facts=true | read | Overview of the business environment: business zones, departments, applications and their APIs, public entries. include_facts defaults to true and adds recent asset facts |
| GET | /links?q=&host=&app=&zone=&health=&limit= | read | Search public entries. q matches title, address, description, purpose and tags; app and zone are codes; health is up, down or unknown; limit defaults to 100, maximum 500 |
| GET | /resolve?endpoint=10.1.2.3:8443 | read | Resolve an IP address, domain, host:port or URL to its business context. host=&port= also works |
| GET | /apps | read | List applications |
| GET | /apps/{code} | read | Application details, APIs, linked entries and facts |
| GET | /endpoints/discovered?min_users=1&uncovered_only=true | read | Anonymous totals of endpoints bookmarked in staff personal navigation (scheme, host, port and number of people). uncovered_only=true returns only endpoints missing from public navigation |
| GET | /facts/conflicts | read | Fact conflicts. Each group has the subject, key, latest value per source and the suggested value. Enterprise |
| PUT | /apps/{code} | enrich | Create or fill in an application |
| POST | /apps/{code}/apis | enrich | Register application APIs. Body {"apis":[...]} |
| POST | /facts | enrich | Write asset facts. Body {"facts":[...]}. Enterprise |
| PATCH | /links/{id}/enrichment | enrich | Fill in entry context. Body {purpose?, link_type?, app_code?, zone_code?} |
All reads are limited by the token's read scope. Resolving an endpoint outside that scope returns known=false with no data.
Examples
# Resolve an endpoint
curl -H "Authorization: Bearer $TOKEN" \
"http://nav.corp.local:8080/api/ai/v1/resolve?endpoint=10.10.1.5:8080"
# Find public entries that are currently unreachable
curl -H "Authorization: Bearer $TOKEN" \
"http://nav.corp.local:8080/api/ai/v1/links?health=down"
# Fill in entry context (needs enrich)
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"purpose":"Production monitoring","link_type":"monitor","app_code":"zabbix"}' \
"http://nav.corp.local:8080/api/ai/v1/links/42/enrichment"Applications and APIs
Fields for PUT /apps/{code}: name (required when creating), description, business_domain, owner, criticality (low, medium, high, critical) and tags. Applications created by people only have their empty fields filled.
Fields for each API in POST /apps/{code}/apis: name (required), method, base_url, path, auth_type, doc_url and description. APIs are de-duplicated by method, base_url and path, and APIs maintained by people are not changed.
link_type in PATCH /links/{id}/enrichment takes web, admin, api, doc, monitor or other. Only empty fields, or fields previously written by AI, are written. skipped_human_fields in the response lists fields skipped because people maintain them. See Data ownership.
Asset facts
POST /facts is an Enterprise feature. It accepts up to 500 facts per call, validates each one, and returns inserted and errors[{index, error}].
{
"facts": [
{
"subject_type": "endpoint",
"endpoint": "10.10.1.5:8080",
"key": "zabbix.host",
"value": {"host": "zbx-server-01", "status": "monitored"},
"source": "zabbix",
"confidence": 0.95,
"observed_at": "2026-11-08T10:00:00+08:00"
}
]
}| Field | Description |
|---|---|
subject_type | link, app, zone or endpoint. Required |
endpoint / app_code / zone_code / subject_id | Used for endpoints, applications, zones and links respectively |
key | Fact key. Required. Name keys {platform}.{attribute}, such as zabbix.host, waf.policy or fw.allowed_sources |
value | A string or any JSON |
source | Source platform, such as zabbix, elastic, waf or firewall |
confidence | 0 to 1. Facts that disagree with another source or fall below 0.5 are marked high risk in AI review, so report confidence honestly |
observed_at | RFC 3339 observation time. Defaults to now |
When the token has facts-need-review on, each fact in the response has status pending; otherwise active.
To make the same kind of detail comparable across platforms, have them use the same key (for example all writing owner); differing values then show up as conflicts. To show values side by side without comparing them, use platform-prefixed keys and avoid false conflicts.
The portal's own availability checks write an endpoint fact with the source rstnav-probe and the key probe.status whenever a public entry changes state. You can compare it with monitoring alerts, for example when monitoring reports a host as healthy but the portal finds its web entry timing out.
Errors
Errors return {"error": "<message>"} with the matching HTTP status. Endpoints that need Enterprise also return "code": "license_required". See Error reference.
API tokens and AI review
Create API tokens for AI ops assistants, set permissions, limit read scope by department and business zone, require review for facts, rotate and revoke tokens, and work through the AI review queue.
MCP
How to connect RST Index to AI ops assistants over MCP, covering the endpoint and protocol versions, client configuration, the tool list, permissions and typical workflows.