All URIs are relative to https://localhost:3780
Method | HTTP request | Description |
---|---|---|
create_report | POST /api/3/reports | Reports |
delete_report | DELETE /api/3/reports/{id} | Report |
delete_report_instance | DELETE /api/3/reports/{id}/history/{instance} | Report History |
download_report | GET /api/3/reports/{id}/history/{instance}/output | Report Download |
generate_report | POST /api/3/reports/{id}/generate | Report Generation |
get_report | GET /api/3/reports/{id} | Report |
get_report_formats | GET /api/3/report_formats | Report Formats |
get_report_instance | GET /api/3/reports/{id}/history/{instance} | Report History |
get_report_instances | GET /api/3/reports/{id}/history | Report Histories |
get_report_template | GET /api/3/report_templates/{id} | Report Template |
get_report_templates | GET /api/3/report_templates | Report Templates |
get_reports | GET /api/3/reports | Reports |
update_report | PUT /api/3/reports/{id} | Report |
CreatedReferenceintLink create_report(report=report)
Reports
Configures a new report for generation. Report types are controlled through either or both a format and template. Non-templatized (export
) report formats do not require a template and have their output format preset. Templatized (document
and file
) report formats support a report template that governs the content of the output and the output format can be chosen from a list of supported formats.
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.ReportApi()
report = rapid7vmconsole.Report() # Report | The specification of a report configuration. (optional)
try:
# Reports
api_response = api_instance.create_report(report=report)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReportApi->create_report: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
report | Report | The specification of a report configuration. | [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]
Links delete_report(id)
Report
Deletes the configuration of a report.
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.ReportApi()
id = 56 # int | The identifier of the report.
try:
# Report
api_response = api_instance.delete_report(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReportApi->delete_report: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the report. |
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 delete_report_instance(id, instance)
Report History
Deletes an instance of a generated report.
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.ReportApi()
id = 56 # int | The identifier of the report.
instance = 'instance_example' # str | The identifier of the report instance.
try:
# Report History
api_response = api_instance.delete_report_instance(id, instance)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReportApi->delete_report_instance: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the report. | |
instance | str | The identifier of the report instance. |
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]
str download_report(id, instance)
Report Download
Returns the contents of a generated report. The report content is usually returned in a GZip compressed format.
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.ReportApi()
id = 56 # int | The identifier of the report.
instance = 'instance_example' # str | The identifier of the report instance.
try:
# Report Download
api_response = api_instance.download_report(id, instance)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReportApi->download_report: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the report. | |
instance | str | The identifier of the report instance. |
str
No authorization required
- Content-Type: application/json
- Accept: application/octet-stream, application/json;charset=UTF-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ReferenceWithReportIDLink generate_report(id)
Report Generation
Generates a configured report and returns the instance identifier of the report.
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.ReportApi()
id = 56 # int | The identifier of the report.
try:
# Report Generation
api_response = api_instance.generate_report(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReportApi->generate_report: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the report. |
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]
Report get_report(id)
Report
Returns the configuration details of a report.
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.ReportApi()
id = 56 # int | The identifier of the report.
try:
# Report
api_response = api_instance.get_report(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReportApi->get_report: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the report. |
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]
ResourcesAvailableReportFormat get_report_formats()
Report Formats
Returns all available report formats. A report format indicates an output file format specification (e.g. PDF, XML, etc). Some printable formats may be templated, and others may not. The supported templates for each formated are provided.
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.ReportApi()
try:
# Report Formats
api_response = api_instance.get_report_formats()
pprint(api_response)
except ApiException as e:
print("Exception when calling ReportApi->get_report_formats: %s\n" % e)
This endpoint does not need any parameter.
ResourcesAvailableReportFormat
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]
ReportInstance get_report_instance(id, instance)
Report History
Returns the details for a generation of the report.
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.ReportApi()
id = 56 # int | The identifier of the report.
instance = 'instance_example' # str | The identifier of the report instance.
try:
# Report History
api_response = api_instance.get_report_instance(id, instance)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReportApi->get_report_instance: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the report. | |
instance | str | The identifier of the report instance. |
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]
ResourcesReportInstance get_report_instances(id)
Report Histories
Returns all historical details for generation of the report over time.
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.ReportApi()
id = 56 # int | The identifier of the report.
try:
# Report Histories
api_response = api_instance.get_report_instances(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReportApi->get_report_instances: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the report. |
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]
ReportTemplate get_report_template(id)
Report Template
Returns the details of a report template. Report templates govern the contents generated within a report.
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.ReportApi()
id = 'id_example' # str | The identifier of the report template;
try:
# Report Template
api_response = api_instance.get_report_template(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReportApi->get_report_template: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | The identifier of the report template; |
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]
ResourcesReportTemplate get_report_templates()
Report Templates
Returns all available report templates.
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.ReportApi()
try:
# Report Templates
api_response = api_instance.get_report_templates()
pprint(api_response)
except ApiException as e:
print("Exception when calling ReportApi->get_report_templates: %s\n" % e)
This endpoint does not need any parameter.
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]
PageOfReport get_reports(page=page, size=size, sort=sort)
Reports
Returns all defined report configurations.
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.ReportApi()
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:
# Reports
api_response = api_instance.get_reports(page=page, size=size, sort=sort)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReportApi->get_reports: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
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 update_report(id, report=report)
Report
Updates the configuration details of a report.
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.ReportApi()
id = 56 # int | The identifier of the report.
report = rapid7vmconsole.Report() # Report | The specification of a report configuration. (optional)
try:
# Report
api_response = api_instance.update_report(id, report=report)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReportApi->update_report: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the report. | |
report | Report | The specification of a report configuration. | [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]