Download OpenAPI specification:Download
Welcome to the HostedScan API documentation.
The best way to get acquainted with HostedScan is to head over to our website and start running scans. Try it out here!
This documentation covers the API and webhook integrations. Use the API to run scans, get results, and manage risks. Use webhook integrations to receive real-time event notifications in your application.
Any questions? Please email us at hello@hostedscan.com
HostedScan offers a comprehensive REST API at https://api.hostedscan.com/v1. The API enables you to create Targets, set up Scans for those targets, along with fetching the resulting Risks and Reports. Webhooks are available to notify your application about important events, like the completion of scans, or the discovery of new risks for specific targets.
To import results from your own Nmap, OpenVAS, or ZAP installations, see the Upload Results From Your Own Scanners section.
Authenticate by setting the X-HOSTEDSCAN-API-KEY request header as your API key. You can create an API key by visiting the API & Webhooks section of your account settings.
| Status Code | Details |
|---|---|
| 200 | OK - Successful request. |
| 400 | Bad Request - Invalid request parameters or missing required parameters. |
| 401 | Unauthorized - Missing or invalid API key. |
| 403 | Forbidden - The feature is not enabled for your account, for example CSV reports. |
| 404 | Not Found - No resource at the requested path, or the id does not belong to your account. |
| 429 | Too Many Requests - Rate limit exceeded. Wait for the number of seconds in the Retry-After header before retrying. |
| 500 | Internal Server Error - Something went wrong on our server. |
Error responses carry a JSON body of the form { "error": "<message>" } where possible (see the ErrorResponse schema). Fields in request bodies that are not documented are ignored.
The API is defined using the OpenAPI (Swagger) standard. Download our OpenAPI file at the top of this page to get started.
There are tools to generate clients in most programming languages from OpenAPI definitions. The easiest way to get started is with the online swagger.io editor, which has many built-in client generators or check out this comprehensive list of client generators.
Many API tools, such as Postman, also support importing OpenAPI definitions.
If you are an AI agent or building with one, load the hostedscan-api skill from our agent skills index before writing integration code — it covers authentication, the full scan workflow, an endpoint catalog, and common pitfalls. A machine-readable index of all documentation is published at https://docs.hostedscan.com/llms.txt, and every guide is available as plain markdown at its URL plus .md. See the AI Agents guide for details.
You can import our OpenAPI document into Postman to quickly and easily test our API. Download our OpenAPI file at the top of this page to get started.
Generally, when a field or webhook event is deprecated, the field or webhook event is still preserved in the API to prevent unnecessary customer rework. As such you may see some additional fields in a response or webhook events that are not documented in these API documents. Our recommendation is to ignore these.
Run scanners such as OpenVas, Nmap, and ZAP against your Targets. Creating a scan starts the scanner for the given target(s). Fetching a Scan object gives the results from the specific scanner.
New Scans are created in the QUEUED state and will transition to RUNNING while they are in progress and then to SUCCEEDED when finished. To check if a Scan is finished, either periodically GET the Scan or integrate with the HostedScan webhooks and listen for the scan updated event.
The discovered vulnerabilities and output files are available once a scan has SUCCEEDED. In the HostedScan API, the vulnerabilities are called Risks and there are management features, such as tracking Risks over time and accepting Risks that are false positives or by design.
On the Scan object, there is a property risks, which breaks the Risks into 3 categories:
new_open: Risks that were detected for the first time on the Targetstill_open: Risks that were detected by a previous Scan of the Target and detected again by the current Scan, including Risks that had closed and are now re-openedclosed: Risks that were detected by a previous Scan of the Target and not detected by the current ScanTo get all of the vulnerabilities found by the Scan, combine new_open and still_open. The Risks are given as an array of ids. Use the Risks api to get the full information for each id: GET https://api.hostedscan.com/v1/risks/{risk_id}
Use the scan result api to download the raw output files generated by the scanner software.
Use the reports api to programmatically generate the executive style PDF reports that are created in the HostedScan web application at https://hostedscan.com/reports.
Run a new vulnerability scan. Choose the Targets to scan by sending either the target values (e.g. https://example.com or 123.123.123.123), the ID of a Target already created in your HostedScan account, or using the tags feature and the Scan will automatically include all Targets with matching tags.
Each targets value must be a public IPv4 address, a Fully Qualified Domain Name, or a URL with an http:// or https:// scheme. Private or reserved IP addresses, IPv6 addresses, and CIDR ranges are rejected with 400. Values that are not already Targets in your account are created as new Targets.
A request with many targets may be split into several Scans, because each scanner has a maximum number of targets per Scan (1 for OWASP_ZAP and OWASP_ZAP_ACTIVE, 10 for SSLYZE and NUCLEI, 100 for the other scan types). The response contains the first Scan only. Use List Scans to see all of them.
When the request would exceed your plan limits, the Scan is still created and returned with a 200 response but its state is OVER_LIMIT and it does not run. NESSUS requires Tenable Nessus to be enabled on your account and OWASP_ZAP_ACTIVE requires a paid plan; otherwise the request fails with 400.
| type required | string (RunnableScanType) Enum: "NESSUS" "NMAP" "NMAP_UDP" "NUCLEI" "OPENVAS" "OWASP_ZAP" "OWASP_ZAP_ACTIVE" "SSLYZE" |
| targets | Array of strings [ 1 .. 100 ] items [ items <= 2048 characters ] Targets to scan. e.g. |
| target_ids | Array of strings [ 1 .. 100 ] items Ids of the targets to scan. Ids that do not belong to your account are ignored. Exactly one of tags, targets, or target_ids must be specified. |
| tags | Array of strings [ 1 .. 100 ] items Tags to scan. e.g. |
| use_authentication | boolean Whether to replay the recorded login for targets that have one attached (see Authenticated Scanning). Only |
required | object (Scan) The created Scan object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{- "type": "NMAP",
- "targets": [
- "hostedscan.com"
], - "target_ids": [
- "36361122caac53b5e8c6616987"
], - "tags": [
- "prod"
], - "use_authentication": true
}{- "data": {
- "id": "123422caac53b5e8c6616123",
- "type": "NMAP",
- "state": "RUNNING",
- "progress": 57,
- "is_authenticated": true,
- "risks": {
- "new_open": [
- {
- "risk_id": "5432122caac53b5e8c6616123"
}
], - "still_open": [
- {
- "risk_id": "13131122caac53b5e8c6616123"
}
], - "closed": [
- {
- "risk_id": "232321122caac53b5e8c6616123"
}
]
}, - "results": [
- {
- "result_id": "14141122caac53b5e8c6616123",
- "content_type": "application/json"
}
], - "requested_targets": [
- {
- "target_id": "36361122caac53b5e8c6616987",
- "target": "hostedscan.com"
}
], - "resolved_targets": [
], - "skipped_targets": [
- {
- "target_id": "17171122caac53b5e8c6616987",
- "skipped_reason": "OWASP ZAP scans websites. Unable to GET a website at the target. By default ZAP checks port 80 and 443. Scan an alternative port by setting it on the target url \"www.example.com:1234\""
}
], - "created_at": "2025-10-27T03:00:00Z",
- "scheduled_by": "64fa7e5b3b3c1f27e3d92f50",
- "report_id": "a3a10e1a-4555-46dc-8da5-ada055c9fcfd"
}
}Returns all Scans, newest first.
| page_token | string Results are returned one page at a time: 500 objects by default, or |
| page_size | integer [ 1 .. 499 ] Example: page_size=100 Number of objects per page. The default and largest page size is 500; pass a value from 1 to 499 to receive smaller pages. Values outside that range use the default. |
| filters | string Example: filters={"state": ["RUNNING"], "type": ["OPENVAS", "NMAP"]} A JSON object, sent as a single URL-encoded string, of filters where each value is an array to filter on. E.g. |
required | Array of objects (Scan) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| next_page_token | string Token that is present when there are more results than can fit in the response. Use the token to get the page of results. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
curl https://api.hostedscan.com/v1/scans \ -H 'X-HOSTEDSCAN-API-KEY: YOUR_API_KEY'
{- "data": [
- {
- "id": "123422caac53b5e8c6616123",
- "type": "NMAP",
- "state": "RUNNING",
- "progress": 57,
- "is_authenticated": true,
- "risks": {
- "new_open": [
- {
- "risk_id": "5432122caac53b5e8c6616123"
}
], - "still_open": [
- {
- "risk_id": "13131122caac53b5e8c6616123"
}
], - "closed": [
- {
- "risk_id": "232321122caac53b5e8c6616123"
}
]
}, - "results": [
- {
- "result_id": "14141122caac53b5e8c6616123",
- "content_type": "application/json"
}
], - "requested_targets": [
- {
- "target_id": "36361122caac53b5e8c6616987",
- "target": "hostedscan.com"
}
], - "resolved_targets": [
], - "skipped_targets": [
- {
- "target_id": "17171122caac53b5e8c6616987",
- "skipped_reason": "OWASP ZAP scans websites. Unable to GET a website at the target. By default ZAP checks port 80 and 443. Scan an alternative port by setting it on the target url \"www.example.com:1234\""
}
], - "created_at": "2025-10-27T03:00:00Z",
- "scheduled_by": "64fa7e5b3b3c1f27e3d92f50",
- "report_id": "a3a10e1a-4555-46dc-8da5-ada055c9fcfd"
}
], - "next_page_token": "string"
}Returns a single Scan
| id required | string ID of the Scan to get |
required | object (Scan) The Scan object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
curl https://api.hostedscan.com/v1/scans/SCAN_ID \ -H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY"
{- "data": {
- "id": "123422caac53b5e8c6616123",
- "type": "NMAP",
- "state": "RUNNING",
- "progress": 57,
- "is_authenticated": true,
- "risks": {
- "new_open": [
- {
- "risk_id": "5432122caac53b5e8c6616123"
}
], - "still_open": [
- {
- "risk_id": "13131122caac53b5e8c6616123"
}
], - "closed": [
- {
- "risk_id": "232321122caac53b5e8c6616123"
}
]
}, - "results": [
- {
- "result_id": "14141122caac53b5e8c6616123",
- "content_type": "application/json"
}
], - "requested_targets": [
- {
- "target_id": "36361122caac53b5e8c6616987",
- "target": "hostedscan.com"
}
], - "resolved_targets": [
], - "skipped_targets": [
- {
- "target_id": "17171122caac53b5e8c6616987",
- "skipped_reason": "OWASP ZAP scans websites. Unable to GET a website at the target. By default ZAP checks port 80 and 443. Scan an alternative port by setting it on the target url \"www.example.com:1234\""
}
], - "created_at": "2025-10-27T03:00:00Z",
- "scheduled_by": "64fa7e5b3b3c1f27e3d92f50",
- "report_id": "a3a10e1a-4555-46dc-8da5-ada055c9fcfd"
}
}Delete a completed Scan by id.
The scan must be in a terminal state (SUCCEEDED, STOPPED, FAILED, or OVER_LIMIT). Scans that are currently QUEUED, RUNNING, or STOPPING cannot be deleted.
Deleting a scan will also update associated risk history to reflect that the scan's findings are no longer considered.
| id required | string ID of the Scan to delete |
curl -X DELETE https://api.hostedscan.com/v1/scans/SCAN_ID \ -H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY"
Request HostedScan to stop a running Scan. This endpoint transitions the Scan to STOPPING (or STOPPED when still QUEUED).
Allowed states for stopping are RUNNING and QUEUED. If the scan is already in a terminal state, a 400 may be returned.
| id required | string ID of the Scan to stop |
required | object (Scan) The updated Scan object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
curl -X POST https://api.hostedscan.com/v1/scans/SCAN_ID/stop \ -H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY"
{- "data": {
- "id": "123422caac53b5e8c6616123",
- "type": "NMAP",
- "state": "RUNNING",
- "progress": 57,
- "is_authenticated": true,
- "risks": {
- "new_open": [
- {
- "risk_id": "5432122caac53b5e8c6616123"
}
], - "still_open": [
- {
- "risk_id": "13131122caac53b5e8c6616123"
}
], - "closed": [
- {
- "risk_id": "232321122caac53b5e8c6616123"
}
]
}, - "results": [
- {
- "result_id": "14141122caac53b5e8c6616123",
- "content_type": "application/json"
}
], - "requested_targets": [
- {
- "target_id": "36361122caac53b5e8c6616987",
- "target": "hostedscan.com"
}
], - "resolved_targets": [
], - "skipped_targets": [
- {
- "target_id": "17171122caac53b5e8c6616987",
- "skipped_reason": "OWASP ZAP scans websites. Unable to GET a website at the target. By default ZAP checks port 80 and 443. Scan an alternative port by setting it on the target url \"www.example.com:1234\""
}
], - "created_at": "2025-10-27T03:00:00Z",
- "scheduled_by": "64fa7e5b3b3c1f27e3d92f50",
- "report_id": "a3a10e1a-4555-46dc-8da5-ada055c9fcfd"
}
}Scheduled Scans are used to automate scanning on a regular basis or schedule a one time scan at a specific time in the future.
Creates a scheduled scan for the authenticated organization.
The first run happens at start_time, or immediately when start_time is omitted, and then repeats according to schedule. Target selection is evaluated at each run, so targets added later that match the filter_set are included automatically.
| schedule required | string (Schedule) Enum: "ONCE" "DAILY" "WEEKLY" "MONTHLY" "QUARTERLY" "CUSTOM" Frequency of a Scheduled Scan.
| ||||
| scan_types required | Array of strings (RunnableScanType) Items Enum: "NESSUS" "NMAP" "NMAP_UDP" "NUCLEI" "OPENVAS" "OWASP_ZAP" "OWASP_ZAP_ACTIVE" "SSLYZE" | ||||
required | object Target selection for the scheduled scan. Send | ||||
| |||||
| email_notification required | string (EmailNotification) Enum: "NEVER" "ON_CHANGES" "ALWAYS" Email notification preference for scans | ||||
| start_time | string <date-time> Time of the first run. Defaults to now, so a scheduled scan created without | ||||
| schedule_dates | Array of strings <date-time> [ items <date-time > ] Required when schedule is CUSTOM (1 to 100 dates) or QUARTERLY (exactly 4 dates, one per quarter). Ignored for other schedules. | ||||
| email_to | Array of strings <email> <= 5 items [ items <email > ] | ||||
| name | string [ 1 .. 100 ] characters | ||||
object (ScheduledScan) | |||||||||||||||||||||||
| |||||||||||||||||||||||
{- "schedule": "WEEKLY",
- "scan_types": [
- "NMAP"
], - "filter_set": {
- "target_ids": [
- "string"
], - "tags": [
- "string"
]
}, - "email_notification": "NEVER",
- "start_time": "2019-08-24T14:15:22Z",
- "schedule_dates": [
- "2019-08-24T14:15:22Z"
], - "email_to": [
- "user@example.com"
], - "name": "string"
}{- "data": {
- "id": "64fa7e5b3b3c1f27e3d92f50",
- "name": "Weekly Web App Scan",
- "schedule": "WEEKLY",
- "scan_types": [
- "NMAP"
], - "targets_filter": {
- "target_ids": [
- "64fa7e5b3b3c1f27e3d92f50",
- "64fa7e5b3b3c1f27e3d92f51"
], - "tags": [
- "production",
- "webserver"
]
}, - "last_ran": "2025-10-27T03:00:00Z",
- "next_run": "2025-11-03T03:00:00Z",
- "created_at": "2025-09-15T14:12:00Z"
}
}Returns all Scheduled Scans, newest first.
| page_token | string Results are returned one page at a time: 500 objects by default, or |
| page_size | integer [ 1 .. 499 ] Example: page_size=100 Number of objects per page. The default and largest page size is 500; pass a value from 1 to 499 to receive smaller pages. Values outside that range use the default. |
required | Array of objects (ScheduledScan) | ||||||||||||||||||||||
Array
| |||||||||||||||||||||||
| next_page_token | string Token that is present when there are more results than can fit in the response. Use the token to get the page of results. | ||||||||||||||||||||||
{- "data": [
- {
- "id": "64fa7e5b3b3c1f27e3d92f50",
- "name": "Weekly Web App Scan",
- "schedule": "WEEKLY",
- "scan_types": [
- "NMAP"
], - "targets_filter": {
- "target_ids": [
- "64fa7e5b3b3c1f27e3d92f50",
- "64fa7e5b3b3c1f27e3d92f51"
], - "tags": [
- "production",
- "webserver"
]
}, - "last_ran": "2025-10-27T03:00:00Z",
- "next_run": "2025-11-03T03:00:00Z",
- "created_at": "2025-09-15T14:12:00Z"
}
], - "next_page_token": "string"
}Returns a single Scheduled Scan
| id required | string Example: 64fa7e5b3b3c1f27e3d92f50 ID of the Scheduled Scan to get |
required | object (ScheduledScan) The Scheduled Scan object | ||||||||||||||||||||||
| |||||||||||||||||||||||
{- "data": {
- "id": "64fa7e5b3b3c1f27e3d92f50",
- "name": "Weekly Web App Scan",
- "schedule": "WEEKLY",
- "scan_types": [
- "NMAP"
], - "targets_filter": {
- "target_ids": [
- "64fa7e5b3b3c1f27e3d92f50",
- "64fa7e5b3b3c1f27e3d92f51"
], - "tags": [
- "production",
- "webserver"
]
}, - "last_ran": "2025-10-27T03:00:00Z",
- "next_run": "2025-11-03T03:00:00Z",
- "created_at": "2025-09-15T14:12:00Z"
}
}Deletes a Scheduled Scan for the authenticated organization.
| id required | string Example: 64fa7e5b3b3c1f27e3d92f50 ID of the Scheduled Scan to delete |
curl -X DELETE 'https://api.hostedscan.com/v1/scans/scheduled/SCHEDULED_SCAN_ID' \ -H 'X-HOSTEDSCAN-API-KEY: YOUR_API_KEY'
Replaces the configuration of a Scheduled Scan. schedule, filter_set, and email_notification must be sent on every update.
Omitted scan_types, email_to, disabled, and start_time keep their current values. An omitted name clears the name, so include it to keep it. schedule_dates is required when schedule is CUSTOM or QUARTERLY. next_run is recalculated on every update.
| id required | string Example: 64fa7e5b3b3c1f27e3d92f50 ID of the Scheduled Scan to update |
| schedule required | string (Schedule) Enum: "ONCE" "DAILY" "WEEKLY" "MONTHLY" "QUARTERLY" "CUSTOM" Frequency of a Scheduled Scan.
| ||||
| scan_types | Array of strings (RunnableScanType) Items Enum: "NESSUS" "NMAP" "NMAP_UDP" "NUCLEI" "OPENVAS" "OWASP_ZAP" "OWASP_ZAP_ACTIVE" "SSLYZE" | ||||
required | object Target selection for the scheduled scan. Send | ||||
| |||||
| email_notification required | string (EmailNotification) Enum: "NEVER" "ON_CHANGES" "ALWAYS" Email notification preference for scans | ||||
| start_time | string <date-time> When present and no more than 5 minutes in the past, used as the next run time. Otherwise the next run is recalculated from | ||||
| schedule_dates | Array of strings <date-time> [ items <date-time > ] Required when schedule is CUSTOM (1 to 100 dates) or QUARTERLY (exactly 4 dates, one per quarter). Ignored for other schedules. | ||||
| email_to | Array of strings <email> <= 5 items [ items <email > ] | ||||
| name | string [ 1 .. 100 ] characters | ||||
| disabled | boolean Set to | ||||
object (ScheduledScan) | |||||||||||||||||||||||
| |||||||||||||||||||||||
{- "schedule": "WEEKLY",
- "scan_types": [
- "NMAP"
], - "filter_set": {
- "target_ids": [
- "string"
], - "tags": [
- "string"
]
}, - "email_notification": "NEVER",
- "start_time": "2019-08-24T14:15:22Z",
- "schedule_dates": [
- "2019-08-24T14:15:22Z"
], - "email_to": [
- "user@example.com"
], - "name": "string",
- "disabled": true
}{- "data": {
- "id": "64fa7e5b3b3c1f27e3d92f50",
- "name": "Weekly Web App Scan",
- "schedule": "WEEKLY",
- "scan_types": [
- "NMAP"
], - "targets_filter": {
- "target_ids": [
- "64fa7e5b3b3c1f27e3d92f50",
- "64fa7e5b3b3c1f27e3d92f51"
], - "tags": [
- "production",
- "webserver"
]
}, - "last_ran": "2025-10-27T03:00:00Z",
- "next_run": "2025-11-03T03:00:00Z",
- "created_at": "2025-09-15T14:12:00Z"
}
}Authenticated scanning lets the OWASP_ZAP and OWASP_ZAP_ACTIVE scanners log in to a website before scanning, so pages behind the login are tested too. The login is a Selenium IDE recording (a .side file) attached to the Target, replayed at the start of each scan. To record one, see the recorded login guide; for the feature overview see https://hostedscan.com/authenticated-web-app-vulnerability-scan.
auth_selenium_file field shows the attached file name; uploading again replaces it.OWASP_ZAP or OWASP_ZAP_ACTIVE scan with Start a new Scan. Authentication is on by default for those scan types; send use_authentication: false to run the scan without logging in. Other scan types cannot use the login session and reject use_authentication: true with 400.The Scan's is_authenticated field is true when authentication was enabled and at least one of its targets had a recording attached when the scan was created. It reports that a login was configured, not that it succeeded: before each such target is scanned the recording is replayed, and if the login fails that target is skipped with skipped_reason "Authentication Failed" while the rest of the scan continues. Check skipped_targets on the finished Scan to see login failures.
curl -H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY" -F file=@YourSeleniumRecording.side https://api.hostedscan.com/v1/targets/TARGET_ID/auth/selenium
Upload a Selenium IDE recording (.side file) of the login sequence for a Target. OWASP_ZAP and OWASP_ZAP_ACTIVE scans of the Target replay the recording to log in before scanning. Uploading again replaces the previous recording. See the Authenticated Scanning overview for the full workflow.
| id required | string ID of the Target to attach the recording to |
| file required | string <binary> Selenium IDE recording. The file name must end in |
required | object (Target) The updated Target object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
curl -X POST \ -H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY" \ -F "file=@login.side" \ https://api.hostedscan.com/v1/targets/TARGET_ID/auth/selenium
{- "data": {
- "id": "111122caac53b5e8c6616e12",
- "target": "www.example.com",
- "label": "production-website",
- "tags": [
- "prod"
], - "health_score": {
- "score": 150,
- "grade": "A"
}, - "auth_selenium_file": "login.side",
- "scanner_settings": {
- "zap": {
- "included_domains": [
- "app.example.com"
], - "excluded_domains": [
- "blog.example.com"
], - "anti_csrf_tokens": [
- "XSRF-TOKEN"
], - "scan_discovered_subdomains": true,
- "scan_third_party_javascript": true,
- "headers": [
- {
- "key": "X-API-KEY",
- "value": "example"
}
], - "cookies": [
- {
- "domain": "example.com",
- "expiry": 1734732496,
- "httpOnly": false,
- "name": "mycookie",
- "path": "/webapp",
- "sameSite": "Strict",
- "secure": false,
- "value": "test123"
}
]
}
}
}
}Risks are the vulnerability findings from scans. For example, a vulnerable javascript dependency or an open port.
Returns all Risks, including CLOSED ones, newest first (by the time the risk was first created, not by its latest detection). OpenVAS risks below your account's minimum Quality of Detection setting are not returned.
| page_token | string Results are returned one page at a time: 500 objects by default, or |
| page_size | integer [ 1 .. 499 ] Example: page_size=100 Number of objects per page. The default and largest page size is 500; pass a value from 1 to 499 to receive smaller pages. Values outside that range use the default. |
| filters | string Example: filters={"risk_definition.scan_type": ["NMAP", "NMAP_UDP"]} A JSON object, sent as a single URL-encoded string, of filters where each value is an array to filter on. E.g. |
required | Array of objects (Risk) | ||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||
| next_page_token | string Token that is present when there are more results than can fit in the response. Use the token to get the page of results. | ||||||||||||||||||||||||||||||||||||||||||||||||
curl -H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY" https://api.hostedscan.com/v1/risks
{- "data": [
- {
- "id": "111122caac53b5e8c6616123",
- "target_id": "211122caac53b5e8c6616321",
- "target": "www.example.com",
- "target_label": "production-website",
- "tags": [
- "prod"
], - "status": "OPEN",
- "first_detected_at": "2019-08-24T14:15:22Z",
- "last_detected_at": "2019-08-24T14:15:22Z",
- "is_accepted": true,
- "accepted_by": [
- {
- "note": "Expected behavior for production webserver to have ports 80 and 443 open",
- "created_at": "2019-08-24T14:15:22Z",
- "last_updated_at": "2019-08-24T14:15:22Z"
}
], - "risk_definition": {
- "scan_type": "NMAP",
- "title": "Port 443 Open",
- "threat_level": "MEDIUM",
- "description": "Port 443 was detected open.",
- "solution": "Close the port or restrict access to it with a firewall.",
- "cvss": "7.5",
- "additional_info": { }
}
}
], - "next_page_token": "string"
}Returns a single Risk
| id required | string ID of the Risk to get |
required | object (Risk) The Risk object | ||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||
curl -H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY" https://api.hostedscan.com/v1/risks/RISK_ID
{- "data": {
- "id": "111122caac53b5e8c6616123",
- "target_id": "211122caac53b5e8c6616321",
- "target": "www.example.com",
- "target_label": "production-website",
- "tags": [
- "prod"
], - "status": "OPEN",
- "first_detected_at": "2019-08-24T14:15:22Z",
- "last_detected_at": "2019-08-24T14:15:22Z",
- "is_accepted": true,
- "accepted_by": [
- {
- "note": "Expected behavior for production webserver to have ports 80 and 443 open",
- "created_at": "2019-08-24T14:15:22Z",
- "last_updated_at": "2019-08-24T14:15:22Z"
}
], - "risk_definition": {
- "scan_type": "NMAP",
- "title": "Port 443 Open",
- "threat_level": "MEDIUM",
- "description": "Port 443 was detected open.",
- "solution": "Close the port or restrict access to it with a firewall.",
- "cvss": "7.5",
- "additional_info": { }
}
}
}Targets are the servers and websites to be scanned for vulnerabilities. A target is defined by an IP address, URL, or Fully Qualified Domain Name.
Create a new Target
| upsert | boolean Set to |
| target required | string <= 2048 characters Public IPv4 address, Fully Qualified Domain Name, or URL with an | ||||||||||||||||||||||||||||||||||||||||||||||
| label | string <= 255 characters Label for the Target | ||||||||||||||||||||||||||||||||||||||||||||||
| tags | Array of strings <= 10 items [ items <= 255 characters ] Up to 10 tags for filtering, selecting, and sorting. Tags are stored in lowercase. | ||||||||||||||||||||||||||||||||||||||||||||||
object (ScannerSettings) The settings to use with a particular scanner when scanning this target. | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
required | object (Target) The created Target object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{- "target": "hostedscan.com",
- "label": "production website",
- "tags": [
- "prod"
], - "scanner_settings": {
- "zap": {
- "included_domains": [
- "app.example.com"
], - "excluded_domains": [
- "blog.example.com"
], - "anti_csrf_tokens": [
- "XSRF-TOKEN"
], - "scan_discovered_subdomains": true,
- "scan_third_party_javascript": true,
- "headers": [
- {
- "key": "X-API-KEY",
- "value": "example"
}
], - "cookies": [
- {
- "domain": "example.com",
- "expiry": 1734732496,
- "httpOnly": false,
- "name": "mycookie",
- "path": "/webapp",
- "sameSite": "Strict",
- "secure": false,
- "value": "test123"
}
]
}
}
}{- "data": {
- "id": "111122caac53b5e8c6616e12",
- "target": "www.example.com",
- "label": "production-website",
- "tags": [
- "prod"
], - "health_score": {
- "score": 150,
- "grade": "A"
}, - "auth_selenium_file": "login.side",
- "scanner_settings": {
- "zap": {
- "included_domains": [
- "app.example.com"
], - "excluded_domains": [
- "blog.example.com"
], - "anti_csrf_tokens": [
- "XSRF-TOKEN"
], - "scan_discovered_subdomains": true,
- "scan_third_party_javascript": true,
- "headers": [
- {
- "key": "X-API-KEY",
- "value": "example"
}
], - "cookies": [
- {
- "domain": "example.com",
- "expiry": 1734732496,
- "httpOnly": false,
- "name": "mycookie",
- "path": "/webapp",
- "sameSite": "Strict",
- "secure": false,
- "value": "test123"
}
]
}
}
}
}Returns all Targets, newest first.
| page_token | string Results are returned one page at a time: 500 objects by default, or |
| page_size | integer [ 1 .. 499 ] Example: page_size=100 Number of objects per page. The default and largest page size is 500; pass a value from 1 to 499 to receive smaller pages. Values outside that range use the default. |
| filters | string Example: filters={"tags": ["prod"], "label": ["prod-webserver"]} A JSON object, sent as a single URL-encoded string, of filters where each value is an array to filter on. E.g. |
| sort | string Example: sort=last_scanned desc Sort order: one or more comma-separated fields, each optionally followed by a space and |
required | Array of objects (Target) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| next_page_token | string Token that is present when there are more results than can fit in the response. Use the token to get the page of results. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
curl https://api.hostedscan.com/v1/targets \ -H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY"
{- "data": [
- {
- "id": "111122caac53b5e8c6616e12",
- "target": "www.example.com",
- "label": "production-website",
- "tags": [
- "prod"
], - "health_score": {
- "score": 150,
- "grade": "A"
}, - "auth_selenium_file": "login.side",
- "scanner_settings": {
- "zap": {
- "included_domains": [
- "app.example.com"
], - "excluded_domains": [
- "blog.example.com"
], - "anti_csrf_tokens": [
- "XSRF-TOKEN"
], - "scan_discovered_subdomains": true,
- "scan_third_party_javascript": true,
- "headers": [
- {
- "key": "X-API-KEY",
- "value": "example"
}
], - "cookies": [
- {
- "domain": "example.com",
- "expiry": 1734732496,
- "httpOnly": false,
- "name": "mycookie",
- "path": "/webapp",
- "sameSite": "Strict",
- "secure": false,
- "value": "test123"
}
]
}
}
}
], - "next_page_token": "string"
}Returns a single Target
| id required | string ID of the Target to get |
required | object (Target) The Target object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
curl -H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY" https://api.hostedscan.com/v1/targets/TARGET_ID
{- "data": {
- "id": "111122caac53b5e8c6616e12",
- "target": "www.example.com",
- "label": "production-website",
- "tags": [
- "prod"
], - "health_score": {
- "score": 150,
- "grade": "A"
}, - "auth_selenium_file": "login.side",
- "scanner_settings": {
- "zap": {
- "included_domains": [
- "app.example.com"
], - "excluded_domains": [
- "blog.example.com"
], - "anti_csrf_tokens": [
- "XSRF-TOKEN"
], - "scan_discovered_subdomains": true,
- "scan_third_party_javascript": true,
- "headers": [
- {
- "key": "X-API-KEY",
- "value": "example"
}
], - "cookies": [
- {
- "domain": "example.com",
- "expiry": 1734732496,
- "httpOnly": false,
- "name": "mycookie",
- "path": "/webapp",
- "sameSite": "Strict",
- "secure": false,
- "value": "test123"
}
]
}
}
}
}Update a Target's label, tags, or scanner settings. The target address cannot be changed. Omitted fields keep their current values.
Within scanner_settings.zap, sending any of the crawl settings (included_domains, excluded_domains, excluded_urls, seed_urls, anti_csrf_tokens, scan_discovered_subdomains, scan_third_party_javascript) replaces all of the crawl settings, so include every crawl setting you want to keep. headers and cookies are each replaced only when sent.
Targets imported from a cloud provider keep the provider's label and tags; changes to those fields are ignored. Targets created from uploaded scan results cannot be updated and return 400.
| id required | string ID of the Target to update |
| label | string <= 255 characters Label for the Target | ||||||||||||||||||||||||||||||||||||||||||||||
| tags | Array of strings <= 10 items [ items <= 255 characters ] Up to 10 tags for filtering, selecting, and sorting. Tags are stored in lowercase. Send an empty array to remove all tags. | ||||||||||||||||||||||||||||||||||||||||||||||
object (ScannerSettings) The settings to use with a particular scanner when scanning this target. | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
required | object (Target) The updated Target object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{- "label": "production-webserver",
- "tags": [
- "prod"
], - "scanner_settings": {
- "zap": {
- "included_domains": [
- "app.example.com"
], - "excluded_domains": [
- "blog.example.com"
], - "anti_csrf_tokens": [
- "XSRF-TOKEN"
], - "scan_discovered_subdomains": true,
- "scan_third_party_javascript": true,
- "headers": [
- {
- "key": "X-API-KEY",
- "value": "example"
}
], - "cookies": [
- {
- "domain": "example.com",
- "expiry": 1734732496,
- "httpOnly": false,
- "name": "mycookie",
- "path": "/webapp",
- "sameSite": "Strict",
- "secure": false,
- "value": "test123"
}
]
}
}
}{- "data": {
- "id": "111122caac53b5e8c6616e12",
- "target": "www.example.com",
- "label": "production-website",
- "tags": [
- "prod"
], - "health_score": {
- "score": 150,
- "grade": "A"
}, - "auth_selenium_file": "login.side",
- "scanner_settings": {
- "zap": {
- "included_domains": [
- "app.example.com"
], - "excluded_domains": [
- "blog.example.com"
], - "anti_csrf_tokens": [
- "XSRF-TOKEN"
], - "scan_discovered_subdomains": true,
- "scan_third_party_javascript": true,
- "headers": [
- {
- "key": "X-API-KEY",
- "value": "example"
}
], - "cookies": [
- {
- "domain": "example.com",
- "expiry": 1734732496,
- "httpOnly": false,
- "name": "mycookie",
- "path": "/webapp",
- "sameSite": "Strict",
- "secure": false,
- "value": "test123"
}
]
}
}
}
}Delete a Target by id
Note: Deleting a target will also delete any risks associated with that target and remove it from any Scheduled Scans that select it by id. Scans that already ran against the target are kept.
Only Targets created manually (through this API or the dashboard) or discovered by an Internal Scanner can be deleted here. Targets imported from cloud providers, code integrations, or uploaded scan results are managed by their source and return 400.
| id required | string ID of the Target to delete |
curl -H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY" --request DELETE https://api.hostedscan.com/v1/targets/TARGET_ID
Upload an OpenAPI specification file to an existing target for API-based vulnerability scanning.
| id required | string ID of the target to upload the OpenAPI file to |
| file required | string <binary> OpenAPI specification file in JSON or YAML format.
|
required | object (Target) The Target object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Step 1: Create target with authentication headers TARGET_RESPONSE=$(curl -s -X POST \ -H "Content-Type: application/json" \ -H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY" \ -d '{ "target": "https://api.example.com", "label": "My API Service", "scanner_settings": { "zap": { "headers": [ { "key": "Authorization", "value": "Bearer your-api-token" } ] } } }' \ https://api.hostedscan.com/v1/targets) # Extract target ID TARGET_ID=$(echo $TARGET_RESPONSE | jq -r '.data.id') # Step 2: Upload OpenAPI file to the target curl -X POST \ -H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY" \ -F "file=@openapi.yaml" \ https://api.hostedscan.com/v1/targets/$TARGET_ID/openapi
{- "data": {
- "id": "111122caac53b5e8c6616e12",
- "target": "www.example.com",
- "label": "production-website",
- "tags": [
- "prod"
], - "health_score": {
- "score": 150,
- "grade": "A"
}, - "auth_selenium_file": "login.side",
- "scanner_settings": {
- "zap": {
- "included_domains": [
- "app.example.com"
], - "excluded_domains": [
- "blog.example.com"
], - "anti_csrf_tokens": [
- "XSRF-TOKEN"
], - "scan_discovered_subdomains": true,
- "scan_third_party_javascript": true,
- "headers": [
- {
- "key": "X-API-KEY",
- "value": "example"
}
], - "cookies": [
- {
- "domain": "example.com",
- "expiry": 1734732496,
- "httpOnly": false,
- "name": "mycookie",
- "path": "/webapp",
- "sameSite": "Strict",
- "secure": false,
- "value": "test123"
}
]
}
}
}
}Create a new Report. The report is generated before the response is returned, so the request can take several seconds, and PDF reports can take up to minutes depending on size. Download the finished report with Download a Report.
CSV reports require CSV export to be enabled on your account; otherwise the request fails with 403.
| report_format required | string Enum: "PDF" "HTML" "CSV"
| ||||||
object Target ids, tags, or labels. | |||||||
| |||||||
| risks_filter | object Key value pairs of filters, where each value is an array to filter on. E.g.
| ||||||
required | object | ||
| |||
{- "report_format": "PDF",
- "targets_filter": {
- "target_ids": [
- "string"
], - "tags": [
- "string"
], - "label": [
- "string"
]
}, - "risks_filter": { }
}{- "data": {
- "id": "a3a10e1a-4555-46dc-8da5-ada055c9fcfd"
}
}Download a Report
| id required | string ID of the Report to get |
| filename | string Optional filename to use in the |
| format | string Enum: "PDF" "HTML" "CSV" Format of the report to download; pass the |
curl --header "X-HOSTEDSCAN-API-KEY: your-api-key-here" \ --output report.pdf \ https://api.hostedscan.com/v1/reports/id-of-created-report-here
HostedScan is compatible with the top open-source scanning tools in the world. If you run these scanners yourself, you can upload their output to HostedScan to use dashboards and reports.
The API endpoints in this section are POST /v1/sources (create an IMPORTED source) and POST /v1/results (upload a scan file). The walkthrough below covers Nmap, OpenVAS, and ZAP end to end.
Navigate to https://hostedscan.com/settings/api and generate an API key.

HostedScan uses Sources to group related targets and vulnerability scan results. This keeps results from one network separate from others.
Create a source with source_type IMPORTED:
curl -H "Content-Type: application/json" \
-H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY" \
--request POST \
--data '{"source_type":"IMPORTED", "name":"My Network"}' \
https://api.hostedscan.com/v1/sources
curl.exe -H "Content-Type: application/json" `
-H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY" `
--request POST `
--data '{\"source_type\":\"IMPORTED\", \"name\":\"My Network\"}' `
https://api.hostedscan.com/v1/sources
Note the id in the JSON response — you will use it as source_id when uploading results.
{"data":{"id":"64c94d38714823ae20c1a9bc","source_type":"IMPORTED","name":"My Network"}}
You will also see the new Source in your account at https://hostedscan.com/targets.

Note: Nmap is the most widely used port scanner in the world. Learn more about Nmap.
Nmap is available via most Linux package managers, Homebrew on macOS, and the Windows installer.
Example: scan private addresses 10.0.0.0–10.0.0.15 and write XML:
nmap -v -oX scan.xml 10.0.0.0/28
nmap -v -oX scan.xml 10.0.0.0/28
Example Nmap output (truncated):
Starting Nmap 7.94 ( https://nmap.org ) at 2023-08-01 11:54 PDT
...
Nmap scan report for 10.0.0.1
Host is up (0.010s latency).
PORT STATE SERVICE
53/tcp open domain
80/tcp open http
443/tcp open https
...
Upload the XML to HostedScan (scan_type NMAP):
curl \
-H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY" \
-F scan_type=NMAP \
-F source_id=SOURCE_ID \
-F file=@scan.xml \
https://api.hostedscan.com/v1/results
curl.exe `
-H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY" `
-F "scan_type=NMAP" `
-F "source_id=SOURCE_ID" `
-F "file=@scan.xml" `
https://api.hostedscan.com/v1/results
After processing, the scan appears in the HostedScan UI.


OpenVAS (via Greenbone Community Edition) is a network vulnerability scanner. Use the GCE UI (often http://localhost:9392). See Greenbone scanning documentation.

When the scan finishes, save the Anonymous XML report. Short demo:
Upload the saved XML (scan_type OPENVAS):
curl \
-H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY" \
-F scan_type=OPENVAS \
-F source_id=SOURCE_ID \
-F file=@openvas-scan.xml \
https://api.hostedscan.com/v1/results
curl.exe `
-H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY" `
-F "scan_type=OPENVAS" `
-F "source_id=SOURCE_ID" `
-F "file=@openvas-scan.xml" `
https://api.hostedscan.com/v1/results

OWASP ZAP is a popular web app scanner (desktop, APIs, Docker). For HostedScan, export the Traditional JSON report. ZAP report generation.

Upload the JSON. target is required for ZAP uploads (the URL that was scanned):
curl \
-H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY" \
-F scan_type=OWASP_ZAP \
-F source_id=SOURCE_ID \
-F target="https://example.com" \
-F file=@zap-scan.json \
https://api.hostedscan.com/v1/results
curl.exe `
-H "X-HOSTEDSCAN-API-KEY: YOUR_API_KEY" `
-F "scan_type=OWASP_ZAP" `
-F "source_id=SOURCE_ID" `
-F "target=https://example.com" `
-F "file=@zap-scan.json" `
https://api.hostedscan.com/v1/results
Create a Source used to group imported scan results. For BYO scanner uploads, use source_type IMPORTED and a human-readable name.
The response includes data.id — use that value as source_id on POST /v1/results.
Full walkthrough (curl, Nmap/OpenVAS/ZAP, screenshots): see the Upload Results From Your Own Scanners tag description.
| source_type required | string Value: "IMPORTED" |
| name required | string A name for the Source |
required | object | ||||||
| |||||||
{- "source_type": "IMPORTED",
- "name": "HQ Internal Network"
}{- "data": {
- "id": "39391122caac7655e8c6616987",
- "source_type": "IMPORTED",
- "name": "HQ Internal Network"
}
}Upload a scanner output file for an IMPORTED source. The request must be multipart/form-data with exactly one file part (field name file, max size 25 MB on the server).
Form fields
source_id (required): IMPORTED source id from POST /v1/sources.scan_type (required): NMAP, NMAP_UDP, OPENVAS, OWASP_ZAP, or OWASP_ZAP_ACTIVE. Other scan types are not supported for uploads and return 400.target (required for ZAP): e.g. https://example.com. Omitted for NMAP / OPENVAS — targets are inferred from the file.file (required): Scanner output. Expected formats:-oX)Step-by-step examples: Upload Results From Your Own Scanners.
| source_id required | string Id of the Source that this result will be grouped with |
| scan_type required | string Enum: "NMAP" "NMAP_UDP" "OPENVAS" "OWASP_ZAP" "OWASP_ZAP_ACTIVE" The scanner that produced the file. Only these values are supported for uploads. |
| target | string The target that was scanned. e.g. https://example.com. Required only for the |
| file required | string <binary> Scanner output file (XML for Nmap/OpenVAS, Traditional JSON for ZAP). Exactly one file must be uploaded. |
{- "error": "Target already exists: www.example.com",
- "ref": "string"
}HostedScan uses webhooks to send event notifications to your application. Receive events when scans finish or when new risks are discovered.
The webhook notifications sent by HostedScan are Event objects. An Event is a JSON structure with the following properties: the event id, the event_created_at time, the event type, and the data. The data is specific for each event. E.g. for a risk.created event the data is the Risk object and for a scan.created event the data is the Scan object.
{
"id": "12345",
"event_created_at": "2023-08-11T05:52:56.104Z",
"type": "risk.created",
"data": {
...
}
}
Your webhook endpoint must use HTTPS with a signed certificate, such as one from https://letsencrypt.org/. HostedScan will not send to endpoints using self-signed certificates.
You can register new webhook endpoints and view your existing webhook endpoints in your account settings at https://hostedscan.com/settings. Webhook endpoints are managed in the dashboard only; there is no API for creating or listing them.
Any 2xx response code from your endpoint is treated as a successful delivery. Any non-2xx status code, or no response within 5 seconds, is treated as a failure and will be retried. HostedScan makes up to 10 delivery attempts per event. The wait before each retry grows by 5 minutes, starting at about 10 seconds, so the attempts are spread over roughly 3 hours. Delivery is at-least-once: an event can occasionally be delivered more than once, so use the event id to de-duplicate.
When you register an endpoint, HostedScan creates a signing secret for that endpoint. HostedScan uses this secret to send a signature in the header of each Event message. The signature can be validated using the signing secret to verify that an event was sent by HostedScan.
Each webhook message request includes an http header X-HOSTEDSCAN-SIGNATURE. The X-HOSTEDSCAN-SIGNATURE is a hash-based message authentication code (HMAC) generated with SHA-256. To validate this signature an application will first recreate the signature using the signing secret for that endpoint and then check that the signature sent in the X-HOSTEDSCAN-SIGNATURE header matches the recreated signature. To do this, follow the steps below:
X-HOSTEDSCAN-TIMESTAMP header, as milliseconds since the Unix epoch), the character . , and the raw JSON payload sent in the request body, exactly as received.X-HOSTEDSCAN-SIGNATURE header.The hostedscan-api-examples Github repository has sample code for receiving webhooks with an AWS Lambda function.
The API has deprecated a couple of events you will see at your webhook endpoint. Our policy is to generally preserve API behavior to prevent unnecessary rework. The following events have been deprecated:
scan.succeededrisk.openedrisk.closed Our recommendation is to ignore these. Instead, the API uses created and updated events to denote changes to scans and risks.
A new Scan has been created
| id required | string Unique id of the event. The same event delivered to several endpoints, or redelivered after a failure, has the same id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| event_created_at required | string <date-time> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| created_at | integer Deprecated The event creation time as milliseconds since the Unix epoch. Deprecated, use | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type required | string Value: "scan.created" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{- "id": "evt_64fa7e5b3b3c1f27e3d92f50",
- "event_created_at": "2019-08-24T14:15:22Z",
- "created_at": 1691733176104,
- "type": "scan.created",
- "data": {
- "id": "123422caac53b5e8c6616123",
- "type": "NMAP",
- "state": "RUNNING",
- "progress": 57,
- "is_authenticated": true,
- "risks": {
- "new_open": [
- {
- "risk_id": "5432122caac53b5e8c6616123"
}
], - "still_open": [
- {
- "risk_id": "13131122caac53b5e8c6616123"
}
], - "closed": [
- {
- "risk_id": "232321122caac53b5e8c6616123"
}
]
}, - "results": [
- {
- "result_id": "14141122caac53b5e8c6616123",
- "content_type": "application/json"
}
], - "requested_targets": [
- {
- "target_id": "36361122caac53b5e8c6616987",
- "target": "hostedscan.com"
}
], - "resolved_targets": [
], - "skipped_targets": [
- {
- "target_id": "17171122caac53b5e8c6616987",
- "skipped_reason": "OWASP ZAP scans websites. Unable to GET a website at the target. By default ZAP checks port 80 and 443. Scan an alternative port by setting it on the target url \"www.example.com:1234\""
}
], - "created_at": "2025-10-27T03:00:00Z",
- "scheduled_by": "64fa7e5b3b3c1f27e3d92f50",
- "report_id": "a3a10e1a-4555-46dc-8da5-ada055c9fcfd"
}
}A Scan has been updated. Sent for every change to the Scan, including progress updates while it runs, so expect several events per Scan. Check data.state to detect completion.
| id required | string Unique id of the event. The same event delivered to several endpoints, or redelivered after a failure, has the same id. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| event_created_at required | string <date-time> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| created_at | integer Deprecated The event creation time as milliseconds since the Unix epoch. Deprecated, use | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type required | string Value: "scan.updated" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{- "id": "evt_64fa7e5b3b3c1f27e3d92f50",
- "event_created_at": "2019-08-24T14:15:22Z",
- "created_at": 1691733176104,
- "type": "scan.updated",
- "data": {
- "id": "123422caac53b5e8c6616123",
- "type": "NMAP",
- "state": "RUNNING",
- "progress": 57,
- "is_authenticated": true,
- "risks": {
- "new_open": [
- {
- "risk_id": "5432122caac53b5e8c6616123"
}
], - "still_open": [
- {
- "risk_id": "13131122caac53b5e8c6616123"
}
], - "closed": [
- {
- "risk_id": "232321122caac53b5e8c6616123"
}
]
}, - "results": [
- {
- "result_id": "14141122caac53b5e8c6616123",
- "content_type": "application/json"
}
], - "requested_targets": [
- {
- "target_id": "36361122caac53b5e8c6616987",
- "target": "hostedscan.com"
}
], - "resolved_targets": [
], - "skipped_targets": [
- {
- "target_id": "17171122caac53b5e8c6616987",
- "skipped_reason": "OWASP ZAP scans websites. Unable to GET a website at the target. By default ZAP checks port 80 and 443. Scan an alternative port by setting it on the target url \"www.example.com:1234\""
}
], - "created_at": "2025-10-27T03:00:00Z",
- "scheduled_by": "64fa7e5b3b3c1f27e3d92f50",
- "report_id": "a3a10e1a-4555-46dc-8da5-ada055c9fcfd"
}
}A new Risk has been created
| id required | string Unique id of the event. The same event delivered to several endpoints, or redelivered after a failure, has the same id. | ||||||||||||||||||||||||||||||||||||||||||||||||
| event_created_at required | string <date-time> | ||||||||||||||||||||||||||||||||||||||||||||||||
| created_at | integer Deprecated The event creation time as milliseconds since the Unix epoch. Deprecated, use | ||||||||||||||||||||||||||||||||||||||||||||||||
| type required | string Value: "risk.created" | ||||||||||||||||||||||||||||||||||||||||||||||||
required | object | ||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||
{- "id": "evt_64fa7e5b3b3c1f27e3d92f50",
- "event_created_at": "2019-08-24T14:15:22Z",
- "created_at": 1691733176104,
- "type": "risk.created",
- "data": {
- "id": "111122caac53b5e8c6616123",
- "target_id": "211122caac53b5e8c6616321",
- "target": "www.example.com",
- "target_label": "production-website",
- "tags": [
- "prod"
], - "status": "OPEN",
- "first_detected_at": "2019-08-24T14:15:22Z",
- "last_detected_at": "2019-08-24T14:15:22Z",
- "is_accepted": true,
- "accepted_by": [
- {
- "note": "Expected behavior for production webserver to have ports 80 and 443 open",
- "created_at": "2019-08-24T14:15:22Z",
- "last_updated_at": "2019-08-24T14:15:22Z"
}
], - "risk_definition": {
- "scan_type": "NMAP",
- "title": "Port 443 Open",
- "threat_level": "MEDIUM",
- "description": "Port 443 was detected open.",
- "solution": "Close the port or restrict access to it with a firewall.",
- "cvss": "7.5",
- "additional_info": { }
}
}
}A Risk has been updated
| id required | string Unique id of the event. The same event delivered to several endpoints, or redelivered after a failure, has the same id. | ||||||||||||||||||||||||||||||||||||||||||||||||
| event_created_at required | string <date-time> | ||||||||||||||||||||||||||||||||||||||||||||||||
| created_at | integer Deprecated The event creation time as milliseconds since the Unix epoch. Deprecated, use | ||||||||||||||||||||||||||||||||||||||||||||||||
| type required | string Value: "risk.updated" | ||||||||||||||||||||||||||||||||||||||||||||||||
required | object | ||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||
{- "id": "evt_64fa7e5b3b3c1f27e3d92f50",
- "event_created_at": "2019-08-24T14:15:22Z",
- "created_at": 1691733176104,
- "type": "risk.updated",
- "data": {
- "id": "111122caac53b5e8c6616123",
- "target_id": "211122caac53b5e8c6616321",
- "target": "www.example.com",
- "target_label": "production-website",
- "tags": [
- "prod"
], - "status": "OPEN",
- "first_detected_at": "2019-08-24T14:15:22Z",
- "last_detected_at": "2019-08-24T14:15:22Z",
- "is_accepted": true,
- "accepted_by": [
- {
- "note": "Expected behavior for production webserver to have ports 80 and 443 open",
- "created_at": "2019-08-24T14:15:22Z",
- "last_updated_at": "2019-08-24T14:15:22Z"
}
], - "risk_definition": {
- "scan_type": "NMAP",
- "title": "Port 443 Open",
- "threat_level": "MEDIUM",
- "description": "Port 443 was detected open.",
- "solution": "Close the port or restrict access to it with a firewall.",
- "cvss": "7.5",
- "additional_info": { }
}
}
}Sample code can be found on Github at https://github.com/hostedscan/hostedscan-api-examples