All URIs are relative to https://localhost:3780
Method | HTTP request | Description |
---|---|---|
create_sonar_query | POST /api/3/sonar_queries | Sonar Queries |
delete_sonar_query | DELETE /api/3/sonar_queries/{id} | Sonar Query |
get_discovery_connection | GET /api/3/discovery_connections/{id} | Discovery Connection |
get_discovery_connections | GET /api/3/discovery_connections | Discovery Connections |
get_sonar_queries | GET /api/3/sonar_queries | Sonar Queries |
get_sonar_query | GET /api/3/sonar_queries/{id} | Sonar Query |
get_sonar_query_assets | GET /api/3/sonar_queries/{id}/assets | Sonar Query Assets |
reconnect_discovery_connection | POST /api/3/discovery_connections/{id}/connect | Discovery Connection Reconnect |
sonar_query_search | POST /api/3/sonar_queries/search | Sonar Query Search |
update_sonar_query | PUT /api/3/sonar_queries/{id} | Sonar Query |
CreatedReferenceDiscoveryQueryIDLink create_sonar_query(query=query)
Sonar Queries
Creates a sonar query.
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.AssetDiscoveryApi()
query = rapid7vmconsole.SonarQuery() # SonarQuery | The criteria for a Sonar query. (optional)
try:
# Sonar Queries
api_response = api_instance.create_sonar_query(query=query)
pprint(api_response)
except ApiException as e:
print("Exception when calling AssetDiscoveryApi->create_sonar_query: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
query | SonarQuery | The criteria for a Sonar query. | [optional] |
CreatedReferenceDiscoveryQueryIDLink
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_sonar_query(id)
Sonar Query
Removes a sonar query.
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.AssetDiscoveryApi()
id = 789 # int | The identifier of the Sonar query.
try:
# Sonar Query
api_response = api_instance.delete_sonar_query(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AssetDiscoveryApi->delete_sonar_query: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the Sonar query. |
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]
DiscoveryConnection get_discovery_connection(id)
Discovery Connection
Returns a discovery connection.
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.AssetDiscoveryApi()
id = 789 # int | The identifier of the discovery connection.
try:
# Discovery Connection
api_response = api_instance.get_discovery_connection(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AssetDiscoveryApi->get_discovery_connection: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the discovery connection. |
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]
PageOfDiscoveryConnection get_discovery_connections(page=page, size=size, sort=sort)
Discovery Connections
Returns all discovery connections.
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.AssetDiscoveryApi()
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:
# Discovery Connections
api_response = api_instance.get_discovery_connections(page=page, size=size, sort=sort)
pprint(api_response)
except ApiException as e:
print("Exception when calling AssetDiscoveryApi->get_discovery_connections: %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]
ResourcesSonarQuery get_sonar_queries()
Sonar Queries
Returns all sonar queries.
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.AssetDiscoveryApi()
try:
# Sonar Queries
api_response = api_instance.get_sonar_queries()
pprint(api_response)
except ApiException as e:
print("Exception when calling AssetDiscoveryApi->get_sonar_queries: %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]
SonarQuery get_sonar_query(id)
Sonar Query
Returns a sonar query.
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.AssetDiscoveryApi()
id = 789 # int | The identifier of the Sonar query.
try:
# Sonar Query
api_response = api_instance.get_sonar_query(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AssetDiscoveryApi->get_sonar_query: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the Sonar query. |
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]
ResourcesDiscoveryAsset get_sonar_query_assets(id)
Sonar Query Assets
Returns the assets that are discovered by a Sonar query.
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.AssetDiscoveryApi()
id = 789 # int | The identifier of the Sonar query.
try:
# Sonar Query Assets
api_response = api_instance.get_sonar_query_assets(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AssetDiscoveryApi->get_sonar_query_assets: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the Sonar query. |
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]
reconnect_discovery_connection(id)
Discovery Connection Reconnect
Attempts to reconnect the discovery connection.
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.AssetDiscoveryApi()
id = 789 # int | The identifier of the discovery connection.
try:
# Discovery Connection Reconnect
api_instance.reconnect_discovery_connection(id)
except ApiException as e:
print("Exception when calling AssetDiscoveryApi->reconnect_discovery_connection: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the discovery connection. |
void (empty response body)
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]
list[DiscoveryAsset] sonar_query_search(query=query)
Sonar Query Search
Executes a Sonar query to discover assets with the given search criteria.
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.AssetDiscoveryApi()
query = rapid7vmconsole.SonarCriteria() # SonarCriteria | The criteria for a Sonar query. (optional)
try:
# Sonar Query Search
api_response = api_instance.sonar_query_search(query=query)
pprint(api_response)
except ApiException as e:
print("Exception when calling AssetDiscoveryApi->sonar_query_search: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
query | SonarCriteria | The criteria for a Sonar query. | [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 update_sonar_query(id, query=query)
Sonar Query
Updates a sonar query.
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.AssetDiscoveryApi()
id = 789 # int | The identifier of the Sonar query.
query = rapid7vmconsole.SonarQuery() # SonarQuery | The criteria for a Sonar query. (optional)
try:
# Sonar Query
api_response = api_instance.update_sonar_query(id, query=query)
pprint(api_response)
except ApiException as e:
print("Exception when calling AssetDiscoveryApi->update_sonar_query: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the Sonar query. | |
query | SonarQuery | The criteria for a Sonar query. | [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]