All URIs are relative to https://localhost:3780
Method | HTTP request | Description |
---|---|---|
get_scan | GET /api/3/scans/{id} | Scan |
get_scans | GET /api/3/scans | Scans |
get_site_scans | GET /api/3/sites/{id}/scans | Site Scans |
set_scan_status | POST /api/3/scans/{id}/{status} | Scan Status |
start_scan | POST /api/3/sites/{id}/scans | Site Scans |
Scan get_scan(id)
Scan
Returns the specified scan.
from __future__ import print_function
import time
import rapid7vmconsole
from rapid7vmconsole.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = rapid7vmconsole.ScanApi()
id = 789 # int | The identifier of the scan.
try:
# Scan
api_response = api_instance.get_scan(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScanApi->get_scan: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the scan. |
No authorization required
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PageOfGlobalScan get_scans(active=active, page=page, size=size, sort=sort)
Scans
Returns all scans.
from __future__ import print_function
import time
import rapid7vmconsole
from rapid7vmconsole.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = rapid7vmconsole.ScanApi()
active = false # bool | Return running scans or past scans (true/false value). (optional) (default to false)
page = 0 # int | The index of the page (zero-based) to retrieve. (optional) (default to 0)
size = 10 # int | The number of records per page to retrieve. (optional) (default to 10)
sort = ['sort_example'] # list[str] | The criteria to sort the records by, in the format: `property[,ASC|DESC]`. The default sort order is ascending. Multiple sort criteria can be specified using multiple sort query parameters. (optional)
try:
# Scans
api_response = api_instance.get_scans(active=active, page=page, size=size, sort=sort)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScanApi->get_scans: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
active | bool | Return running scans or past scans (true/false value). | [optional] [default to false] |
page | int | The index of the page (zero-based) to retrieve. | [optional] [default to 0] |
size | int | The number of records per page to retrieve. | [optional] [default to 10] |
sort | list[str] | The criteria to sort the records by, in the format: `property[,ASC | DESC]`. The default sort order is ascending. Multiple sort criteria can be specified using multiple sort query parameters. |
No authorization required
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PageOfScan get_site_scans(id, active=active, page=page, size=size, sort=sort)
Site Scans
Returns the scans for the specified site.
from __future__ import print_function
import time
import rapid7vmconsole
from rapid7vmconsole.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = rapid7vmconsole.ScanApi()
id = 56 # int | The identifier of the site.
active = false # bool | Return running scans or past scans (true/false value). (optional) (default to false)
page = 0 # int | The index of the page (zero-based) to retrieve. (optional) (default to 0)
size = 10 # int | The number of records per page to retrieve. (optional) (default to 10)
sort = ['sort_example'] # list[str] | The criteria to sort the records by, in the format: `property[,ASC|DESC]`. The default sort order is ascending. Multiple sort criteria can be specified using multiple sort query parameters. (optional)
try:
# Site Scans
api_response = api_instance.get_site_scans(id, active=active, page=page, size=size, sort=sort)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScanApi->get_site_scans: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the site. | |
active | bool | Return running scans or past scans (true/false value). | [optional] [default to false] |
page | int | The index of the page (zero-based) to retrieve. | [optional] [default to 0] |
size | int | The number of records per page to retrieve. | [optional] [default to 10] |
sort | list[str] | The criteria to sort the records by, in the format: `property[,ASC | DESC]`. The default sort order is ascending. Multiple sort criteria can be specified using multiple sort query parameters. |
No authorization required
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Links set_scan_status(id, status)
Scan Status
Updates the scan status. Can pause, resume, and stop scans using this resource. In order to stop a scan the scan must be running or paused. In order to resume a scan the scan must be paused. In order to pause a scan the scan must be running.
from __future__ import print_function
import time
import rapid7vmconsole
from rapid7vmconsole.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = rapid7vmconsole.ScanApi()
id = 789 # int | The identifier of the scan.
status = 'status_example' # str | The status of the scan.
try:
# Scan Status
api_response = api_instance.set_scan_status(id, status)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScanApi->set_scan_status: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the scan. | |
status | str | The status of the scan. |
No authorization required
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreatedReferenceScanIDLink start_scan(id, override_blackout=override_blackout, scan=scan)
Site Scans
Starts a scan for the specified site.
from __future__ import print_function
import time
import rapid7vmconsole
from rapid7vmconsole.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = rapid7vmconsole.ScanApi()
id = 56 # int | The identifier of the site.
override_blackout = false # bool | ${override.blackout} (optional) (default to false)
scan = rapid7vmconsole.AdhocScan() # AdhocScan | The details for the scan. (optional)
try:
# Site Scans
api_response = api_instance.start_scan(id, override_blackout=override_blackout, scan=scan)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScanApi->start_scan: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the site. | |
override_blackout | bool | ${override.blackout} | [optional] [default to false] |
scan | AdhocScan | The details for the scan. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]