Authorization: Bearer ********************x-api-key: ********************{
"scan": {
"name": "My Scan",
"comment": "My comment",
"run_now": true,
"target_id": "d3bcdc92-4191-401b-ad0c-42056c6efab9",
"schedule_id": "8929bb67-0da1-406c-99d2-5447376a4f58",
"config_id": "d1d31429-d888-4f1c-b9c1-4e842f9bce5b",
"scanner_id": "43593f58-da3f-45f0-a7bf-8763ef29bdf1"
}
}curl --location --request POST '/v2/scans' \
--header 'Authorization: Bearer <token>' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"scan": {
"name": "My Scan",
"comment": "My comment",
"run_now": true,
"target_id": "d3bcdc92-4191-401b-ad0c-42056c6efab9",
"schedule_id": "8929bb67-0da1-406c-99d2-5447376a4f58",
"config_id": "d1d31429-d888-4f1c-b9c1-4e842f9bce5b",
"scanner_id": "43593f58-da3f-45f0-a7bf-8763ef29bdf1"
}
}'{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"type": "targets",
"attributes": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"comment": "string",
"app_type": "string",
"owner": {
"username": "string"
},
"creation_time": "2019-08-24T14:15:22.123Z",
"modification_time": "2019-08-24T14:15:22.123Z",
"scan_enabled": true,
"end_time": "2019-08-24T14:15:22.123Z",
"status": "string",
"progress": 0,
"editable": true,
"schedule_next_time": "string",
"target": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string"
},
"schedule": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string"
},
"scanner": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string"
},
"config": {
"id": "string",
"name": "string"
},
"last_report": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"scan_end": "2019-08-24T14:15:22.123Z",
"timestamp": "2019-08-24T14:15:22.123Z"
},
"stats": {
"avg_duration": 0,
"last_duration": 0,
"reports_count": 0,
"reports_finished": 0
},
"history": [
{
"fail": true,
"error_message": "string",
"started_at": "2019-08-24T14:15:22.123Z",
"completed_at": "2019-08-24T14:15:22.123Z",
"scan_duration": "string",
"state": "string",
"previous_state": "string"
}
]
}
}
}