获取API密钥
要开始使用CFTQ Cloud API,您需要先获取API密钥。每个密钥都有每日请求限制,请合理使用。
POST /api/v1/auth/register
Content-Type: application/json
{
"email": "your@email.com",
"purpose": "您的使用目的"
}
Content-Type: application/json
{
"email": "your@email.com",
"purpose": "您的使用目的"
}
文件扫描API
上传文件到我们的云端进行安全扫描,获取详细的威胁分析报告。
POST /api/v1/scan/file
Content-Type: multipart/form-data
X-API-Key: your_api_key
{
"file": "file_to_scan",
"options": {
"deep_scan": true
}
}
Content-Type: multipart/form-data
X-API-Key: your_api_key
{
"file": "file_to_scan",
"options": {
"deep_scan": true
}
}
哈希值查询API
通过文件哈希值(MD5/SHA1/SHA256)快速查询我们的威胁数据库。
GET /api/v1/query/hash?hash=file_hash
X-API-Key: your_api_key
{
"hash": "d41d8cd98f00b204e9800998ecf8427e",
"type": "md5"
}
X-API-Key: your_api_key
{
"hash": "d41d8cd98f00b204e9800998ecf8427e",
"type": "md5"
}
统计信息API
获取您的API使用统计信息,包括请求次数、剩余配额等。
GET /api/v1/stats/usage
X-API-Key: your_api_key
{
"date_from": "2025-01-01",
"date_to": "2025-01-31"
}
X-API-Key: your_api_key
{
"date_from": "2025-01-01",
"date_to": "2025-01-31"
}
Webhook设置
配置Webhook接收实时扫描结果通知,无需轮询查询。
POST /api/v1/webhook/register
Content-Type: application/json
X-API-Key: your_api_key
{
"url": "https://yourdomain.com/webhook",
"events": ["scan_complete"]
}
Content-Type: application/json
X-API-Key: your_api_key
{
"url": "https://yourdomain.com/webhook",
"events": ["scan_complete"]
}
批量扫描API
一次性提交多个文件或哈希值进行批量扫描,提高效率。
POST /api/v1/scan/batch
Content-Type: application/json
X-API-Key: your_api_key
{
"files": ["file1", "file2"],
"hashes": ["hash1", "hash2"]
}
Content-Type: application/json
X-API-Key: your_api_key
{
"files": ["file1", "file2"],
"hashes": ["hash1", "hash2"]
}