Enforce a single workspace
Enable enforcement on the latest set of policies in the workspace.
POST /openapi/v1/applications/{application_id}/enable_enforce
|
New host firewall rules will be inserted and any existing rules will be deleted on the relevant hosts. |
Parameters: The request URL contains the following parameters
Name |
Type |
Description |
---|---|---|
application_id |
string |
The unique identifier for the workspace. |
version |
string |
(optional) The policy version to enforce. |
If a version is not provided the latest policies of the workspace will be enforced. versions is preferred to be of the form ‘p*’, if just an integer is provided the corresponding ‘p*’ version will be enforced.
Response object: Returns an object with the following attributes:
Name |
Type |
Description |
---|---|---|
epoch |
string |
Unique identifier for the latest enforcement profile. |
Sample python code
application_id = '5d02b493755f0237a3d6e078'
req_payload = {
'version': 'p10'
}
resp = restclient.post('/applications/%s/enable_enforce' % application_id,
json_body=json.dumps(req_payload))