Skip to content

API Reference

Status: Current

Last reviewed: 2026-05-10

This page reflects routes registered in nexus-backend/src/main.rs.

Base URLs

Default local endpoints:

text
REST:  http://localhost:8081/api
gRPC:  http://localhost:50051

The backend Docker Compose file currently maps gRPC port 50051. If REST is run only inside the backend container, expose 8081 explicitly or run the backend locally.

Authentication

Public:

MethodPathHandler
POST/api/auth/loginapi::auth::login

Protected routes require the backend auth middleware.

REST Routes

Auth

MethodPathHandler
GET/api/auth/usersapi::auth::list_users
POST/api/auth/usersapi::auth::create_user

Nodes

MethodPathHandler
GET/api/nodesapi::nodes::list_nodes
POST/api/nodesapi::nodes::create_node
GET/api/nodes/linksapi::nodes::list_node_links
GET/api/nodes/{id}api::nodes::get_node
PUT/api/nodes/{id}api::nodes::update_node
DELETE/api/nodes/{id}api::nodes::delete_node
POST/api/nodes/{name}/configapi::config_push::push_node_config

Routes

Legacy route APIs still exist for compatibility.

MethodPathHandler
GET/api/routesapi::routes::list_routes
POST/api/routesapi::routes::create_route
GET/api/routes/{id}api::routes::get_route
PUT/api/routes/{id}api::routes::update_route
DELETE/api/routes/{id}api::routes::delete_route
GET/api/routes/{id}/hopsapi::routes::get_route_hops

L4 Chains

L4 chains are the current primary gateway workflow.

MethodPathHandler
GET/api/l4-chainsapi::tunnel_chains::list_chains
POST/api/l4-chainsapi::tunnel_chains::create_chain
GET/api/l4-chains/{id}api::tunnel_chains::get_chain
PUT/api/l4-chains/{id}api::tunnel_chains::update_chain
DELETE/api/l4-chains/{id}api::tunnel_chains::delete_chain
POST/api/l4-chains/{id}/deployapi::tunnel_chains::deploy_chain_handler

L4 Upstreams

MethodPathHandler
GET/api/l4-upstreamsapi::upstreams::list_upstreams
POST/api/l4-upstreamsapi::upstreams::create_upstream
GET/api/l4-upstreams/{id}api::upstreams::get_upstream
PUT/api/l4-upstreams/{id}api::upstreams::update_upstream
DELETE/api/l4-upstreams/{id}api::upstreams::delete_upstream

TLS Certificates

MethodPathHandler
GET/api/certsapi::tls::list_certs
POST/api/certsapi::tls::create_cert
POST/api/certs/generateapi::tls::generate_cert
GET/api/certs/{id}api::tls::get_cert
DELETE/api/certs/{id}api::tls::delete_cert

Encryption Credentials

MethodPathHandler
GET/api/enc-keysapi::enc_keys::list_enc_keys
POST/api/enc-keysapi::enc_keys::create_enc_key
DELETE/api/enc-keys/{id}api::enc_keys::delete_enc_key

Credential types are unified under enc_keys.key_type and metadata:

  • udp_noise
  • tls_cert
  • reality

Audit

MethodPathHandler
GET/api/auditapi::audit::list_audit_logs
POST/api/audit/{id}/revertapi::audit::revert_audit_entry

Dashboard

MethodPathHandler
GET/api/dashboard/statsapi::dashboard::get_dashboard_stats

gRPC Services

Current agent service is defined in common/proto/agent.proto.

RPCDirectionPurpose
RegisterunaryAgent registration.
Heartbeatbidirectional streamKeepalive, health metrics, and commands.
StreamConfigserver streamBackend pushes config updates to an agent.
ReportMetricsunaryAgent reports metrics snapshots.

See Agent Control Protocol.

NexusNet documentation