API Overview
NetRecon exposes a REST API for integrating with external tools, building custom dashboards, and automating network security workflows. All microservices are accessible through a single API Gateway.
For a complete list of every endpoint grouped by category, see the Endpoint Reference.
Base URL
All API requests go through the API Gateway:
https://probe.netreconapp.com/api/
For self-hosted deployments, the base URL follows the pattern:
https://netrecon.yourcompany.com/api/
The gateway handles authentication, rate limiting, RBAC enforcement, and request routing to the appropriate backend service.
Authentication
All API endpoints (except /api/health and /health) require a JWT Bearer token.
Obtaining a Token
curl -X POST https://probe.netreconapp.com/api/auth/login \
-H "Content-Type: application/json" \
-d '{
"username": "admin",
"password": "your-password"
}'
Response:
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"token_type": "bearer",
"expires_in": 86400
}
Using the Token
Include the token in the Authorization header on every request:
curl https://probe.netreconapp.com/api/devices \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
Token Refresh
Tokens expire after 24 hours by default (configurable per deployment). Refresh before expiration:
curl -X POST https://probe.netreconapp.com/api/auth/refresh \
-H "Authorization: Bearer <current-token>"
API Keys
Service-to-service communication and automation scripts can use long-lived API keys as an alternative to JWT tokens. Keys use the format nr_live_ followed by 48 hex characters.
curl https://api.netreconapp.com/api/v1/devices \
-H "X-API-Key: nr_live_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6"
Each key has granular permission scopes. Configure them in the dashboard under Settings > API Keys. See Authentication for full details.
Rate Limiting
API requests are rate-limited per authentication token. The gateway returns X-RateLimit-Limit and X-RateLimit-Remaining response headers on every request.
| Tier | Requests per minute | Burst |
|---|---|---|
| Standard | 60 | 10 |
| Admin | 120 | 20 |
| Service (agent) | 300 | 50 |
When the limit is exceeded, the API returns HTTP 429 Too Many Requests with a Retry-After header indicating how many seconds to wait.
Request and Response Conventions
Content Type
All request and response bodies use application/json unless otherwise noted (e.g., CSV export endpoints return text/csv, file downloads return application/octet-stream).
Pagination
List endpoints are paginated with a default page size of 100 items. Control pagination with query parameters:
GET /api/devices?page=2&per_page=50