API参考
RESTful API
通过我们全面的API将CyberSec Pro集成到您的工作流中。
121
Total Endpoints
/api/v1
Base Path
Token or API key
Auth
20-300/min
Rate Limit
基础URL
https://api.cyber-sec-pro.com/api/v1所有接口均使用 HTTPS,HTTP 请求会被重定向。需要 TLS 1.3。
认证
# Automation: an API key (Settings → API Keys)
Authorization: Bearer csp_... # or X-API-Key: csp_...
# Interactive: sign in for a 60-minute access token
POST /api/v1/auth/login
{ "email": "user@co.com", "password": "..." }
→ { "access_token": "eyJ...", "token_type": "Bearer", ... }
(refresh token: httpOnly cookie; with two-factor on,
→ { "mfa_required": true, "mfa_ticket": "..." })错误码
200OK — Request succeeded
201Created — Resource created
400Bad Request — Invalid parameters
401Unauthorized — Invalid or missing token
402Payment Required — Your plan does not include this
403Forbidden — Your role may not do this (see the code field)
404Not Found — Resource doesn't exist
429Rate Limited — Too many requests
500Server Error — Internal failure
速率限制
/api/v1/ai/, /api/v1/chatbot/20 req/min
/api/v1/scans/30 req/min
/api/v1/auth/60 req/min
Everything else300 req/min
限制按调用方计算,所有套餐相同。超出限制时,API 返回 429,并附带以秒为单位的 Retry-After 头。
端点
共 121 个端点,分为 12 组。点击分组即可展开。
POST
/api/v1/auth/registerPUBLIC
POST
/api/v1/auth/loginPUBLIC
POST
/api/v1/auth/mfa/challengePUBLIC
POST
/api/v1/auth/refreshPUBLIC
POST
/api/v1/auth/logoutPOST
/api/v1/auth/logout-allGET
/api/v1/auth/mePUT
/api/v1/auth/profilePOST
/api/v1/auth/change-passwordPOST
/api/v1/auth/forgot-passwordPUBLIC
POST
/api/v1/auth/reset-passwordPUBLIC
POST
/api/v1/auth/resend-verificationGET
/api/v1/auth/verify-emailPUBLIC
POST
/api/v1/auth/avatarGET
/api/v1/auth/avatar/:user_idPOST
/api/v1/auth/mfa/setupPOST
/api/v1/auth/mfa/verify-setupGET
/api/v1/auth/mfa/statusPOST
/api/v1/auth/mfa/disablePOST
/api/v1/auth/mfa/regenerate-backupPOST
/api/v1/auth/googlePUBLIC
POST
/api/v1/auth/githubPUBLIC
POST
/api/v1/auth/linkedinPUBLIC
GET
/api/v1/auth/sso/saml/initPUBLIC
GET
/api/v1/auth/sso/oidc/initPUBLIC
POST
/api/v1/auth/sso/ldapPUBLIC
请求与响应示例
POST /api/v1/scans
// Request
{
"tool": "nmap",
"target": "scanme.nmap.org",
"parameters": {
"scan_type": "-sT",
"timing": "-T4",
"port_spec": "--top-ports 1000",
"service_detection": true
}
}
// A target that is not a public practice host also needs
// "authorization": { "confirmed": true, "scope_statement": "..." }
// with the statement from POST /api/v1/authorizations/preview.
// Response 201
{
"success": true,
"message": "Scan started",
"scan_id": "4f9c…",
"status": "running",
"command": "nmap -sT -T4 --top-ports 1000 -sV scanme.nmap.org",
...
}GET /api/v1/scan/:id/result
// Response 200
{
"scan": {
"id": "4f9c…",
"status": "completed",
"tool_name": "nmap",
"target": "scanme.nmap.org",
"output": "Starting Nmap 7.99 ...",
"error_log": null,
...
},
"execution_result": {
"status": "completed",
"output": "...",
"findings": { ... }
}
}
// findings is stored in one of two shapes: the scan
// engine's { "services": [...], "vulnerabilities": [...] },
// or a list of scanner lines [{ "type": "finding",
// "value": "22/tcp open ssh" }, ...]. Handle both.分页
GET /api/v1/scans?page=1&per_page=25&status=completed
// per_page is at most 100. Response:
{
"scans": [...],
"total": 142,
"page": 1,
"per_page": 25
}Webhook 事件
// Webhook integration: POST to your URL
{
"event": "scan_completed",
"timestamp": "2026-10-02T14:45:00+00:00",
"source": "cybersec-pro",
"data": {
"scan_id": "4f9c…",
"tool": "nuclei",
"target": "staging.example.com",
"status": "completed",
"findings": { "total": 12, "critical": 1, "high": 3 }
}
}
// Events: scan_completed, scan_failed,
// vulnerability_critical, vulnerability_high.
// Each integration receives only the events you pick.