Skip to main content

API Overview

The NeXuS API Gateway runs on port 4000 and serves as the central REST API for the platform. It provides Docker container statistics, health monitoring, Cloudflare DNS management, and system overview data.

Base URL

https://api.sebhosting.com

Authentication

Most API endpoints require a valid JWT access token passed via the Authorization header:

Authorization: Bearer <access_token>

Access tokens are obtained from the Auth Service and expire after 15 minutes. Use the refresh endpoint to obtain new tokens.

Common Response Format

All services follow a consistent response pattern:

Health Check

{
"service": "backend",
"status": "healthy",
"port": 4000,
"uptime": 86400,
"timestamp": "2026-02-14T06:19:07.261Z"
}

Status

{
"service": "backend",
"version": "1.0.0",
"description": "API Gateway",
"status": "operational",
"timestamp": "2026-02-14T06:19:07.261Z"
}

Error

{
"error": "Not found",
"service": "backend"
}

Available Endpoints

MethodPathServiceDescription
GET/healthAPI GatewayHealth check
GET/statusAPI GatewayService version and status
GET/statsAPI GatewayDocker container stats + host metrics
GET/stats/logs/:nameAPI GatewayContainer logs
POST/auth/registerAuthCreate account
POST/auth/loginAuthLogin, get JWT
POST/auth/refreshAuthRefresh access token
GET/auth/meAuthGet current user
POST/auth/logoutAuthLogout, revoke tokens
GET/dns/zonesAPI GatewayList Cloudflare zones
GET/dns/zones/:id/recordsAPI GatewayList DNS records
POST/dns/zones/:id/recordsAPI GatewayCreate DNS record
PUT/dns/zones/:id/records/:ridAPI GatewayUpdate DNS record
DELETE/dns/zones/:id/records/:ridAPI GatewayDelete DNS record

Service Health Endpoints

Every service exposes /health and /status endpoints:

curl https://auth.sebhosting.com/health
curl https://cms.sebhosting.com/health
curl https://cdn.sebhosting.com/health
curl https://cache.sebhosting.com/health
curl https://waf.sebhosting.com/health
curl https://ai-gateway.sebhosting.com/health
curl https://mcp.sebhosting.com/health