All URIs are relative to https://localhost:3780
Method | HTTP request | Description |
---|---|---|
create_policy_override | POST /api/3/policy_overrides | Policy Overrides |
delete_policy_override | DELETE /api/3/policy_overrides/{id} | Policy Override |
get_asset_policy_overrides | GET /api/3/assets/{id}/policy_overrides | Asset Policy Overrides |
get_policy_override | GET /api/3/policy_overrides/{id} | Policy Override |
get_policy_override_expiration | GET /api/3/policy_overrides/{id}/expires | Policy Override Expiration |
get_policy_overrides | GET /api/3/policy_overrides | Policy Overrides |
set_policy_override_expiration | PUT /api/3/policy_overrides/{id}/expires | Policy Override Expiration |
set_policy_override_status | POST /api/3/policy_overrides/{id}/{status} | Policy Override Status |
CreatedReferencePolicyOverrideIDLink create_policy_override(policy_override=policy_override)
Policy Overrides
Submit a policy override. The policy override can be submitted or it can be submitted and approved in a single request.
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.PolicyOverrideApi()
policy_override = rapid7vmconsole.PolicyOverride() # PolicyOverride | The specification of a policy override. Allows users to override the compliance result of a policy rule. (optional)
try:
# Policy Overrides
api_response = api_instance.create_policy_override(policy_override=policy_override)
pprint(api_response)
except ApiException as e:
print("Exception when calling PolicyOverrideApi->create_policy_override: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
policy_override | PolicyOverride | The specification of a policy override. Allows users to override the compliance result of a policy rule. | [optional] |
CreatedReferencePolicyOverrideIDLink
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_policy_override(id)
Policy Override
Removes a policy override created for a policy rule.
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.PolicyOverrideApi()
id = 789 # int | The identifier of the policy override.
try:
# Policy Override
api_response = api_instance.delete_policy_override(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling PolicyOverrideApi->delete_policy_override: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the policy override. |
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]
ResourcesPolicyOverride get_asset_policy_overrides(id)
Asset Policy Overrides
Retrieves policy overrides defined on policy rules for the specified asset.
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.PolicyOverrideApi()
id = 789 # int | The identifier of the asset.
try:
# Asset Policy Overrides
api_response = api_instance.get_asset_policy_overrides(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling PolicyOverrideApi->get_asset_policy_overrides: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the asset. |
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]
PolicyOverride get_policy_override(id)
Policy Override
Retrieve the specified policy override.
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.PolicyOverrideApi()
id = 789 # int | The identifier of the policy override.
try:
# Policy Override
api_response = api_instance.get_policy_override(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling PolicyOverrideApi->get_policy_override: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the policy override. |
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 get_policy_override_expiration(id)
Policy Override Expiration
Get the expiration date for a policy override.
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.PolicyOverrideApi()
id = 789 # int | The identifier of the policy override.
try:
# Policy Override Expiration
api_response = api_instance.get_policy_override_expiration(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling PolicyOverrideApi->get_policy_override_expiration: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the policy override. |
str
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]
PageOfPolicyOverride get_policy_overrides(page=page, size=size, sort=sort)
Policy Overrides
Retrieves policy overrides defined on policy rules.
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.PolicyOverrideApi()
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:
# Policy Overrides
api_response = api_instance.get_policy_overrides(page=page, size=size, sort=sort)
pprint(api_response)
except ApiException as e:
print("Exception when calling PolicyOverrideApi->get_policy_overrides: %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 set_policy_override_expiration(id, expiration=expiration)
Policy Override Expiration
Set the expiration date for a policy override. This must be a valid date in the future.
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.PolicyOverrideApi()
id = 789 # int | The identifier of the policy override.
expiration = 'expiration_example' # str | The date the policy override is set to expire. Date is represented in ISO 8601 format. (optional)
try:
# Policy Override Expiration
api_response = api_instance.set_policy_override_expiration(id, expiration=expiration)
pprint(api_response)
except ApiException as e:
print("Exception when calling PolicyOverrideApi->set_policy_override_expiration: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the policy override. | |
expiration | str | The date the policy override is set to expire. Date is represented in ISO 8601 format. | [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]
set_policy_override_status(id, status, comment=comment)
Policy Override Status
Update the status of the specified policy override. The status can be one of the following: \"recall\"
, \"approve\"
, or \"reject\"
.
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.PolicyOverrideApi()
id = 789 # int | The identifier of the policy override.
status = 'status_example' # str | Policy Override Status
comment = 'comment_example' # str | A comment describing the change of the policy override status. (optional)
try:
# Policy Override Status
api_instance.set_policy_override_status(id, status, comment=comment)
except ApiException as e:
print("Exception when calling PolicyOverrideApi->set_policy_override_status: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | The identifier of the policy override. | |
status | str | Policy Override Status | |
comment | str | A comment describing the change of the policy override status. | [optional] |
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]