List scans
GET
/v2/scansGet a list of scans
Request
Page number. Default: 1
Number of records per page. Default: 10. Max: 100
Search by [:name, :uuid, :organization_id]. Usage q[column]='word'
Start date for date range filter. Format: YYYY-MM-DD hh:mm:ss
End date for date range filter. Default: current time. Format: YYYY-MM-DD hh:mm:ss
Relative date range filter.
Available units: (s)econds, (m)inutes, (h)ours, (d)ays, (M)onths, (y)ears. (q)uarter
Example: Get the results for the last 10 days - 10d.
Get the results from the first quarter at 2020 - 1q2020
Sort by [:creation_time, :modification_time, :end_time, :run_status, :schedule_next_time, :name]. Usage: column_name_desc or column_name_asc
Include extended data. This will include schedule, config, scanner, last_report and other data
Filter by scheduled scans
Array of statuses to filter scans (["delete_requested", "done", "new", "requested", "running", "stop_requested", "stop_waiting", "stopped", "internal_error", "delete_ultimate_requested", "stop_requested_giveup", "delete_waiting", "delete_ultimate_waiting", "queued"])
Request samples
Responses
Scans list
{
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"type": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string",
"description": "Name of the scan"
},
"comment": {
"type": "string",
"description": "Comment about the scan"
},
"creation_time": {
"type": "string",
"format": "date-time"
},
"modification_time": {
"type": "string",
"format": "date-time"
},
"status": {
"type": "string",
"description": "Status of the scan"
},
"schedule_next_time": {
"type": "string",
"description": "Next time the scan will run",
"nullable": true
},
"target": {
"type": "object",
"description": "Target of the scan",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
}
}
}
}
}
}
}
},
"meta": {
"$ref": "spec/requests/v2/schemas/json/metadata.json"
}
}
}
}
}
}