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(opts)
Sonar Queries
Creates a sonar query.
# load the gem
require 'rapid7_vm_console'
api_instance = Rapid7VmConsole::AssetDiscoveryApi.new
opts = {
query: Rapid7VmConsole::SonarQuery.new # SonarQuery | The criteria for a Sonar query.
}
begin
#Sonar Queries
result = api_instance.create_sonar_query(opts)
p result
rescue Rapid7VmConsole::ApiError => e
puts "Exception when calling AssetDiscoveryApi->create_sonar_query: #{e}"
end
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
Links delete_sonar_query(id)
Sonar Query
Removes a sonar query.
# load the gem
require 'rapid7_vm_console'
api_instance = Rapid7VmConsole::AssetDiscoveryApi.new
id = 789 # Integer | The identifier of the Sonar query.
begin
#Sonar Query
result = api_instance.delete_sonar_query(id)
p result
rescue Rapid7VmConsole::ApiError => e
puts "Exception when calling AssetDiscoveryApi->delete_sonar_query: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | The identifier of the Sonar query. |
No authorization required
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
DiscoveryConnection get_discovery_connection(id)
Discovery Connection
Returns a discovery connection.
# load the gem
require 'rapid7_vm_console'
api_instance = Rapid7VmConsole::AssetDiscoveryApi.new
id = 789 # Integer | The identifier of the discovery connection.
begin
#Discovery Connection
result = api_instance.get_discovery_connection(id)
p result
rescue Rapid7VmConsole::ApiError => e
puts "Exception when calling AssetDiscoveryApi->get_discovery_connection: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | The identifier of the discovery connection. |
No authorization required
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
PageOfDiscoveryConnection get_discovery_connections(opts)
Discovery Connections
Returns all discovery connections.
# load the gem
require 'rapid7_vm_console'
api_instance = Rapid7VmConsole::AssetDiscoveryApi.new
opts = {
page: 0, # Integer | The index of the page (zero-based) to retrieve.
size: 10, # Integer | The number of records per page to retrieve.
sort: ['sort_example'] # Array<String> | 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.
}
begin
#Discovery Connections
result = api_instance.get_discovery_connections(opts)
p result
rescue Rapid7VmConsole::ApiError => e
puts "Exception when calling AssetDiscoveryApi->get_discovery_connections: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
page | Integer | The index of the page (zero-based) to retrieve. | [optional] [default to 0] |
size | Integer | The number of records per page to retrieve. | [optional] [default to 10] |
sort | Array<String> | 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
ResourcesSonarQuery get_sonar_queries
Sonar Queries
Returns all sonar queries.
# load the gem
require 'rapid7_vm_console'
api_instance = Rapid7VmConsole::AssetDiscoveryApi.new
begin
#Sonar Queries
result = api_instance.get_sonar_queries
p result
rescue Rapid7VmConsole::ApiError => e
puts "Exception when calling AssetDiscoveryApi->get_sonar_queries: #{e}"
end
This endpoint does not need any parameter.
No authorization required
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
SonarQuery get_sonar_query(id)
Sonar Query
Returns a sonar query.
# load the gem
require 'rapid7_vm_console'
api_instance = Rapid7VmConsole::AssetDiscoveryApi.new
id = 789 # Integer | The identifier of the Sonar query.
begin
#Sonar Query
result = api_instance.get_sonar_query(id)
p result
rescue Rapid7VmConsole::ApiError => e
puts "Exception when calling AssetDiscoveryApi->get_sonar_query: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | The identifier of the Sonar query. |
No authorization required
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
ResourcesDiscoveryAsset get_sonar_query_assets(id)
Sonar Query Assets
Returns the assets that are discovered by a Sonar query.
# load the gem
require 'rapid7_vm_console'
api_instance = Rapid7VmConsole::AssetDiscoveryApi.new
id = 789 # Integer | The identifier of the Sonar query.
begin
#Sonar Query Assets
result = api_instance.get_sonar_query_assets(id)
p result
rescue Rapid7VmConsole::ApiError => e
puts "Exception when calling AssetDiscoveryApi->get_sonar_query_assets: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | The identifier of the Sonar query. |
No authorization required
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
reconnect_discovery_connection(id)
Discovery Connection Reconnect
Attempts to reconnect the discovery connection.
# load the gem
require 'rapid7_vm_console'
api_instance = Rapid7VmConsole::AssetDiscoveryApi.new
id = 789 # Integer | The identifier of the discovery connection.
begin
#Discovery Connection Reconnect
api_instance.reconnect_discovery_connection(id)
rescue Rapid7VmConsole::ApiError => e
puts "Exception when calling AssetDiscoveryApi->reconnect_discovery_connection: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | The identifier of the discovery connection. |
nil (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
Array<DiscoveryAsset> sonar_query_search(opts)
Sonar Query Search
Executes a Sonar query to discover assets with the given search criteria.
# load the gem
require 'rapid7_vm_console'
api_instance = Rapid7VmConsole::AssetDiscoveryApi.new
opts = {
query: Rapid7VmConsole::SonarCriteria.new # SonarCriteria | The criteria for a Sonar query.
}
begin
#Sonar Query Search
result = api_instance.sonar_query_search(opts)
p result
rescue Rapid7VmConsole::ApiError => e
puts "Exception when calling AssetDiscoveryApi->sonar_query_search: #{e}"
end
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
Links update_sonar_query(id, opts)
Sonar Query
Updates a sonar query.
# load the gem
require 'rapid7_vm_console'
api_instance = Rapid7VmConsole::AssetDiscoveryApi.new
id = 789 # Integer | The identifier of the Sonar query.
opts = {
query: Rapid7VmConsole::SonarQuery.new # SonarQuery | The criteria for a Sonar query.
}
begin
#Sonar Query
result = api_instance.update_sonar_query(id, opts)
p result
rescue Rapid7VmConsole::ApiError => e
puts "Exception when calling AssetDiscoveryApi->update_sonar_query: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | 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