-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference
dev-mondoshawan edited this page Jun 21, 2026
·
2 revisions
Base URL: http://localhost:8000 (self-hosted) or your deployed instance
All endpoints (except /health, /auth/register, /auth/login) require authentication.
POST /auth/register
Content-Type: application/json
{
"email": "user@example.com",
"password": "SecurePass123!",
"full_name": "Jane Doe",
"organization_name": "Acme Corp"
}POST /auth/login
Content-Type: application/x-www-form-urlencoded
username=user@example.com&password=SecurePass123!Response:
{
"access_token": "eyJ...",
"refresh_token": "eyJ...",
"token_type": "bearer"
}Access tokens expire in 30 minutes. Refresh tokens expire in 7 days.
GET /auth/me
Authorization: Bearer <access_token>PATCH /auth/me
Authorization: Bearer <access_token>
Content-Type: application/json
{
"full_name": "Jane Smith",
"email": "jane@example.com"
}PUT /auth/me/password
Authorization: Bearer <access_token>
Content-Type: application/json
{
"current_password": "OldPass123!",
"new_password": "NewPass456!"
}GET /auth/organization
Authorization: Bearer <access_token>PATCH /auth/organization
Authorization: Bearer <access_token>
Content-Type: application/json
{
"name": "Acme Corp",
"alert_email": "security@acme.com"
}Requires
adminrole.
POST /agents/
Authorization: Bearer <access_token>
Content-Type: application/json
{
"name": "My Laptop"
}Response includes api_key — shown only once, store it immediately.
GET /agents/
Authorization: Bearer <access_token>DELETE /agents/{agent_id}
Authorization: Bearer <access_token>POST /agents/heartbeat
X-API-Key: mcp_sk_<key>
Content-Type: application/json
{
"hostname": "laptop.local",
"os_type": "windows",
"username": "jane",
"agent_version": "0.1.2"
}POST /mcp/report
X-API-Key: mcp_sk_<key>
Content-Type: application/json
{
"servers": [
{
"server_name": "filesystem",
"server_type": "@modelcontextprotocol/server-filesystem",
"command": "npx @modelcontextprotocol/server-filesystem /home",
"scope": "/home",
"env_vars": ["PATH", "HOME"]
}
]
}GET /mcp/servers?risk_level=high&status=active&search=postgres&page=1&page_size=25
Authorization: Bearer <access_token>Query parameters:
| Param | Type | Description |
|---|---|---|
risk_level |
string | Filter: critical, high, medium, low
|
status |
string | Filter: active, dormant
|
agent_id |
uuid | Filter by specific agent |
search |
string | Search server names |
page |
int | Page number (default: 1) |
page_size |
int | Results per page (default: 25) |
GET /mcp/servers/{server_id}
Authorization: Bearer <access_token>PATCH /mcp/servers/{server_id}
Authorization: Bearer <access_token>
Content-Type: application/json
{
"is_verified": true
}GET /dashboard/stats
Authorization: Bearer <access_token>Response:
{
"total_servers": 47,
"critical_count": 2,
"high_count": 5,
"medium_count": 18,
"low_count": 22,
"active_agents": 12,
"unresolved_alerts": 3
}GET /dashboard/risk-distribution
Authorization: Bearer <access_token>GET /dashboard/top-risks?limit=5
Authorization: Bearer <access_token>GET /alerts/?dismissed=false&severity=critical
Authorization: Bearer <access_token>POST /alerts/{alert_id}/dismiss
Authorization: Bearer <access_token>POST /alerts/dismiss-all
Authorization: Bearer <access_token>GET /healthResponse:
{
"status": "healthy",
"version": "0.1.2",
"database": "connected"
}Getting Started
User Guide
Technical Reference