API参考

RESTful API

通过我们全面的API将CyberSec Pro集成到您的工作流中。

119

Total Endpoints

v1 + v2

API Versions

JWT + OAuth

Auth Methods

60-300/min

Rate Limit

基础URL

https://api.cyber-sec-pro.com/v1

All endpoints use HTTPS. HTTP requests are redirected. TLS 1.3 required.

认证

Authorization: Bearer <your-jwt-token>

# Login → get token
POST /api/v1/auth/login
{ "email": "[email protected]", "password": "..." }
→ { "access_token": "eyJ...", "token_type": "Bearer" }

Error Codes

200OK — Request succeeded
201Created — Resource created
400Bad Request — Invalid parameters
401Unauthorized — Invalid or missing token
403Forbidden — Insufficient permissions
404Not Found — Resource doesn't exist
429Rate Limited — Too many requests
500Server Error — Internal failure

Rate Limiting

Trial
10 req/min|burst: 5
Starter
30 req/min|burst: 15
Professional
60 req/min|burst: 30
Enterprise
300 req/min|burst: 100

Headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

端点

119 endpoints across 13 groups. Click a group to expand.

POST/api/v1/auth/register
POST/api/v1/auth/login
PUBLIC
POST/api/v1/auth/refresh
PUBLIC
POST/api/v1/auth/logout
GET/api/v1/auth/me
PUT/api/v1/auth/profile
PUT/api/v1/auth/change-password
PUT/api/v1/auth/avatar
POST/api/v1/auth/mfa/setup
POST/api/v1/auth/mfa/verify-setup
POST/api/v1/auth/mfa/verify
GET/api/v1/auth/mfa/status
DELETE/api/v1/auth/mfa/disable
POST/api/v1/auth/mfa/regenerate-backup
POST/api/v1/auth/resend-verification
GET/api/v1/auth/verify-email
GET/api/v1/auth/github
GET/api/v1/auth/google

Request & Response Examples

POST /api/v1/scans/create

// Request
{
  "target": "example.com",
  "tool": "nmap",
  "parameters": {
    "scan_type": "-sV -sC -O",
    "ports": "1-10000",
    "timing": "-T4"
  },
  "scan_type": "custom",
  "notify": ["email"]
}

// Response 201
{
  "id": "scan_a1b2c3d4",
  "status": "created",
  "target": "example.com",
  "tool": "nmap",
  "created_at": "2026-01-15T14:30:00Z"
}

GET /api/v1/scan/:id/result

// Response 200
{
  "scan_id": "scan_a1b2c3d4",
  "status": "completed",
  "duration_ms": 124500,
  "findings": {
    "total": 12,
    "critical": 1,
    "high": 3,
    "medium": 5,
    "low": 2,
    "info": 1
  },
  "vulnerabilities": [
    {
      "id": "vuln_001",
      "title": "Apache Request Smuggling",
      "cve": "CVE-2023-25690",
      "cvss": 9.8,
      "severity": "critical",
      "evidence": "HTTP/1.1 smuggling...",
      "remediation": "Upgrade Apache to 2.4.58+"
    }
  ]
}

Pagination

GET /api/v1/scans?page=1&per_page=25&sort=created_at&order=desc

// Response includes:
{
  "data": [...],
  "pagination": {
    "page": 1,
    "per_page": 25,
    "total": 142,
    "total_pages": 6
  }
}

Webhook Events

// Webhook payload (POST to your URL)
{
  "event": "scan.completed",
  "timestamp": "2026-01-15T14:45:00Z",
  "data": {
    "scan_id": "scan_a1b2c3d4",
    "status": "completed",
    "findings_count": 12,
    "critical_count": 1
  }
}

// Events: scan.created, scan.started,
// scan.completed, scan.failed,
// report.generated, finding.critical