Update Policies
Enable Policies
Use the enable policies request to enable existing policies, effectively turning the policies on. Policies can always be disabled again later using the disable policy request.
Endpoint
Method: PUT
URL: /policy/enable
Request Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Array | A list of the policy IDs that you want to enable. |
For an example Request, see Sample Request.
Response and Error Code
Response Code | Condition |
---|---|
200 | OK |
400 | Bad Request |
If one or more of the policies specified in the request are already enabled, the above 400 Bad Request error code will be displayed, along with information describing at least one of the already enabled policies.
Response Parameter
Parameter Name | Data Type | Description |
---|---|---|
| String | Shows the status of the request, if the policy/policies have been enabled then the value |
For an example response, see Sample Response.
Sample Request
{ "id": [ 17925, 18292 ] }
Sample Response
{ "status": "POLICY_ENABLED_SUCCESSFULLY" }
Disable Policies
Use the disable policies request to disable existing policies, effectively turning the policies off. Policies can always be enabled again later using the enable policy request.
Endpoint
Method: PUT
URL: /policy/disable
Request Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Array | A list of the policy IDs that you want to disable. |
For an example Request, see Sample Request.
Response and Error Code
Response Code | Condition |
---|---|
200 | OK |
400 | Bad Request |
If one or more of the policies specified in the request are already disabled, the above 400 Bad Request error code will be displayed, along with information describing at least one of the already disabled policies.
Response Parameter
Parameter Name | Data Type | Description |
---|---|---|
| String | Shows the status of the request, if the policy/policies have been disabled then the value |
For an example response, see Sample Response.
Sample Request
{ "id": [ 17925, 18292 ] }
Sample Response
{ "status": "POLICY_DISABLED_SUCCESSFULLY" }
Delete Policies
Use the delete policy request to remove disabled policies from your system.
Caution
Deleting a policy is permanent, there is no "undo" for deleting a policy, in the case that you want to get a deleted policy back you will need to create a new policy using the create policy request.
Policies can be enabled and disabled for use using the enable policy request and disable policy request - use the disable policy request to switch a policy off without removing the policy entirely from your system.
Endpoint
Method: DELETE
URL: /policy/delete
Request Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Array | A list of policy IDs for the policies that you want to delete, use the search policies request to get a list of policies and their IDs. |
For an example Request, see Sample Request.
Response and Error Code
Response Code | Condition |
---|---|
204 | No Content |
The above "204 No Content" response means that the policy/policies have been deleted, you can always use the search policies request and confirm that the policy/policies have been deleted.
Sample Request
{ "id": [ 17849 ] }