Scan API
スキャンタスクの作成と管理
Scan API は、脅威スキャンタスクの作成・管理に使用します。
Create Scan
POST /v1/scans
Request Body
{
"domain": "example.com",
"type": "ct_log"
}Scan Types
| Type | 説明 |
|---|---|
ct_log | CT Log 証明書透明性スキャン |
dns | DNS 類似ドメインスキャン |
google_search | Google 検索スキャン |
Response Example
{
"data": {
"id": "scan_xxx",
"domain": "example.com",
"type": "ct_log",
"status": "pending",
"created_at": "2024-01-20T10:30:00Z"
}
}Get Scan Status
GET /v1/scans/:id
Response Example
{
"data": {
"id": "scan_xxx",
"domain": "example.com",
"type": "ct_log",
"status": "completed",
"progress": 100,
"result": {
"total_checked": 1250,
"threats_found": 3
},
"created_at": "2024-01-20T10:30:00Z",
"completed_at": "2024-01-20T10:35:00Z"
}
}Scan Status Values
| Status | 説明 |
|---|---|
pending | 実行待ち |
running | 実行中 |
completed | 完了 |
failed | 失敗 |
List Scans
GET /v1/scans
Query Parameters
| Parameter | Type | 説明 |
|---|---|---|
domain | string | ドメインで filter |
type | string | タイプで filter |
status | string | status で filter |
page | number | ページ番号 |
per_page | number | 1 ページあたりの件数 |
Cancel Scan
POST /v1/scans/:id/cancel
Response Example
{
"data": {
"id": "scan_xxx",
"status": "cancelled"
}
}status が pending または running のスキャンのみキャンセル可能です。