## List Scans **get** `/accounts/{account_id}/vuln_scanner/scans` Returns all scans for the account. ### Path Parameters - `account_id: optional string` Identifier. ### Query Parameters - `page: optional number` Page number of paginated results. - `per_page: optional number` Number of results per page. ### Returns - `errors: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `messages: array of { code, message, documentation_url, source }` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional { pointer }` - `pointer: optional string` - `success: true` Whether the API call was successful. - `true` - `result: optional array of { id, scan_type, status, 2 more }` - `id: string` Scan identifier. - `scan_type: "bola"` The type of vulnerability scan. - `"bola"` - `status: "created" or "scheduled" or "planning" or 3 more` Current lifecycle status of the scan. - `"created"` - `"scheduled"` - `"planning"` - `"running"` - `"finished"` - `"failed"` - `target_environment_id: string` The target environment this scan runs against. - `report: optional { report, report_schema_version }` Vulnerability report produced after the scan completes. The shape depends on the scan type. Present only for finished scans. - `report: { summary, tests }` Version 1 of the BOLA vulnerability scan report. - `summary: { verdict }` Summary of all steps and findings. - `verdict: "ok" or "warning" or "inconclusive"` Overall verdict of the vulnerability scan. - `"ok"` - `"warning"` - `"inconclusive"` - `tests: array of { steps, verdict, preflight_errors }` List of tests that were run. - `steps: array of { assertions, errors, request, response }` Steps that were executed. - `assertions: array of { description, kind, observed, outcome }` Assertions that were made against the received response. - `description: string` Human-readable description of the assertion, explaining what was checked. - `kind: { parameters, type }` Kind of assertion. - `parameters: { max, min }` Range of HTTP status codes. - `max: number` Maximum (inclusive) status code of the range. - `min: number` Minimum (inclusive) status code of the range. - `type: "http_status_within_range"` - `"http_status_within_range"` - `observed: number` Observed value on which the assertion was made. - `outcome: "ok" or "fail" or "inconclusive"` Outcome of the assertion. - `"ok"` - `"fail"` - `"inconclusive"` - `errors: optional array of { description, error_code }` Errors the step encountered that may explain absent or incomplete fields. - `description: string` Human-readable error description. - `error_code: optional number` Numeric error code identifying the class of error, if available. - `request: optional { credential_set, header_names, method, 3 more }` HTTP request that was made, if any. - `credential_set: { id, role }` Credential set that was used. - `id: string` ID of the credential set. - `role: "owner" or "attacker"` Role of the credential set. - `"owner"` - `"attacker"` - `header_names: array of string` Names of headers that were sent. - `method: "GET" or "DELETE" or "PATCH" or 2 more` HTTP method. - `"GET"` - `"DELETE"` - `"PATCH"` - `"POST"` - `"PUT"` - `url: string` Exact and full URL (including host, query parameters) that was requested. - `variable_captures: array of { json_path, name }` Variable captures requested for this step. - `json_path: string` JSONPath expression used for capture, e.g. `"$.id"`. - `name: string` Variable name, e.g. `"resource_id"`. - `body: optional unknown` Request body, if any. - `response: optional { body, header_names, status, status_text }` HTTP response that was received, if any. - `body: { kind } or { contents, kind, truncated } or { contents, kind, truncated } or { contents, kind, truncated }` HTTP response body. - `Kind { kind }` No body was received. - `kind: "not_found"` - `"not_found"` - `{ contents, kind, truncated }` Body received but unable to read as UTF-8. Raw bytes, base64-encoded. - `contents: string` - `kind: "bytes"` - `"bytes"` - `truncated: boolean` - `{ contents, kind, truncated }` Body received as valid UTF-8 text but not valid JSON. - `contents: string` - `kind: "text"` - `"text"` - `truncated: boolean` - `{ contents, kind, truncated }` Body received as valid JSON. - `contents: string` - `kind: "json"` - `"json"` - `truncated: boolean` - `header_names: array of string` Names of headers that were received. - `status: number` HTTP status code. - `status_text: optional string` HTTP status text, if available for the status code. - `verdict: "ok" or "warning" or "inconclusive"` Verdict of this single test. - `"ok"` - `"warning"` - `"inconclusive"` - `preflight_errors: optional array of { description, error_code }` Errors that prevented step execution. - `description: string` Human-readable error description. - `error_code: optional number` Numeric error code identifying the class of error, if available. - `report_schema_version: "v1"` Version of the report schema. - `"v1"` - `result_info: optional { count, page, per_page, 2 more }` - `count: optional number` Total number of results for the requested service. - `page: optional number` Current page within paginated list of results. - `per_page: optional number` Number of results per page of results. - `total_count: optional number` Total results available without any search parameters. - `total_pages: optional number` The number of total pages in the entire result set. ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/vuln_scanner/scans \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "scan_type": "bola", "status": "created", "target_environment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "report": { "report": { "summary": { "verdict": "ok" }, "tests": [ { "steps": [ { "assertions": [ { "description": "description", "kind": { "parameters": { "max": 0, "min": 0 }, "type": "http_status_within_range" }, "observed": 0, "outcome": "ok" } ], "errors": [ { "description": "description", "error_code": 0 } ], "request": { "credential_set": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "role": "owner" }, "header_names": [ "string" ], "method": "GET", "url": "https://example.com", "variable_captures": [ { "json_path": "json_path", "name": "name" } ], "body": {} }, "response": { "body": { "kind": "not_found" }, "header_names": [ "string" ], "status": 0, "status_text": "status_text" } } ], "verdict": "ok", "preflight_errors": [ { "description": "description", "error_code": 0 } ] } ] }, "report_schema_version": "v1" } } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000, "total_pages": 100 } } ```