Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Latest commit

 

History

History
361 lines (252 loc) · 11.5 KB

VulnerabilityExceptionApi.md

File metadata and controls

361 lines (252 loc) · 11.5 KB

rapid7vmconsole.VulnerabilityExceptionApi

All URIs are relative to https://localhost:3780

Method HTTP request Description
create_vulnerability_exception POST /api/3/vulnerability_exceptions Exceptions
get_vulnerability_exception GET /api/3/vulnerability_exceptions/{id} Exception
get_vulnerability_exception_expiration GET /api/3/vulnerability_exceptions/{id}/expires Exception Expiration
get_vulnerability_exceptions GET /api/3/vulnerability_exceptions Exceptions
remove_vulnerability_exception DELETE /api/3/vulnerability_exceptions/{id} Exception
update_vulnerability_exception_expiration PUT /api/3/vulnerability_exceptions/{id}/expires Exception Expiration
update_vulnerability_exception_status POST /api/3/vulnerability_exceptions/{id}/{status} Exception Status

create_vulnerability_exception

CreatedReferenceVulnerabilityExceptionIDLink create_vulnerability_exception(vulnerability_exception=vulnerability_exception)

Exceptions

Creates a vulnerability exception.

Example

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.VulnerabilityExceptionApi()
vulnerability_exception = rapid7vmconsole.VulnerabilityException() # VulnerabilityException | The vulnerability exception to create. (optional)

try:
    # Exceptions
    api_response = api_instance.create_vulnerability_exception(vulnerability_exception=vulnerability_exception)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityExceptionApi->create_vulnerability_exception: %s\n" % e)

Parameters

Name Type Description Notes
vulnerability_exception VulnerabilityException The vulnerability exception to create. [optional]

Return type

CreatedReferenceVulnerabilityExceptionIDLink

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_vulnerability_exception

VulnerabilityException get_vulnerability_exception(id)

Exception

Returns an exception made on a vulnerability.

Example

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.VulnerabilityExceptionApi()
id = 56 # int | The identifier of the vulnerability exception.

try:
    # Exception
    api_response = api_instance.get_vulnerability_exception(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityExceptionApi->get_vulnerability_exception: %s\n" % e)

Parameters

Name Type Description Notes
id int The identifier of the vulnerability exception.

Return type

VulnerabilityException

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_vulnerability_exception_expiration

str get_vulnerability_exception_expiration(id)

Exception Expiration

Get the expiration date for a vulnerability exception.

Example

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.VulnerabilityExceptionApi()
id = 56 # int | id

try:
    # Exception Expiration
    api_response = api_instance.get_vulnerability_exception_expiration(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityExceptionApi->get_vulnerability_exception_expiration: %s\n" % e)

Parameters

Name Type Description Notes
id int id

Return type

str

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_vulnerability_exceptions

PageOfVulnerabilityException get_vulnerability_exceptions(page=page, size=size, sort=sort)

Exceptions

Returns all exceptions defined on vulnerabilities.

Example

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.VulnerabilityExceptionApi()
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:
    # Exceptions
    api_response = api_instance.get_vulnerability_exceptions(page=page, size=size, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityExceptionApi->get_vulnerability_exceptions: %s\n" % e)

Parameters

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.

Return type

PageOfVulnerabilityException

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

remove_vulnerability_exception

Links remove_vulnerability_exception(id)

Exception

Removes an exception made on a vulnerability.

Example

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.VulnerabilityExceptionApi()
id = 56 # int | id

try:
    # Exception
    api_response = api_instance.remove_vulnerability_exception(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityExceptionApi->remove_vulnerability_exception: %s\n" % e)

Parameters

Name Type Description Notes
id int id

Return type

Links

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_vulnerability_exception_expiration

Links update_vulnerability_exception_expiration(id, param1)

Exception Expiration

Set the expiration date for a vulnerability exception. This must be a valid date in the future.

Example

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.VulnerabilityExceptionApi()
id = 56 # int | id
param1 = 'param1_example' # str | param1

try:
    # Exception Expiration
    api_response = api_instance.update_vulnerability_exception_expiration(id, param1)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityExceptionApi->update_vulnerability_exception_expiration: %s\n" % e)

Parameters

Name Type Description Notes
id int id
param1 str param1

Return type

Links

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_vulnerability_exception_status

Links update_vulnerability_exception_status(id, status, param2=param2)

Exception Status

Update the status of the vulnerability exception. The status can be one of: \"recall\", \"approve\", or \"reject\".

Example

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.VulnerabilityExceptionApi()
id = 56 # int | id
status = 'status_example' # str | Exception Status
param2 = 'param2_example' # str | param2 (optional)

try:
    # Exception Status
    api_response = api_instance.update_vulnerability_exception_status(id, status, param2=param2)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityExceptionApi->update_vulnerability_exception_status: %s\n" % e)

Parameters

Name Type Description Notes
id int id
status str Exception Status
param2 str param2 [optional]

Return type

Links

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]