REST API call to apply DLP Policy

Prev Next

Use this REST API call to apply DLP policy.

POST request URL

https://<epo_server_name:port>/rest/dlp/policy/apply

Where, epo_server_name:port is the server IP address and port number.

Request Parameters

Parameter name

Description

Required

Values

Authorization

User credentials for ePO - On-prem.

Required

Form Parameters (x-www-form-urlencoded)

Parameter name

Description

Required

Values

policyName

Name of the policy that has to be applied, name can include whitespace. Include whitespace to specify multiple policies.

Required

String

forceApply

Ignore validation warnings.

If the forceApply parameter isn't passed, the default value is false.

Optional

Boolean



Sample POST request URL

https://172.27.108.53:8443/rest/dlp/policy/apply

{

"policyName": "My Default DLP Policy"

"forceApply": false

}

Sample cURL command

curl -k -v -X POST 'https://172.27.108.53:8443/rest/dlp/policy/apply' -d "policyName=My Default DLP Policy&forceApply=false" -u '<user>:<password>'

Sample request parameters (x-www-form-urlencoded)

{
      "policyName": "My Default DLP Policy"
      "forceApply": false
}

Sample response

Applied successfully: My Default DLP Policy

Status and error codes

List of HTTP status codes returned for the query.

Code

Description

200 OK

Returns a successful message.

400 Bad Request

Returns a bad request if:

  • Policy with policyName doesn't exist.

  • Policy is in the disabled state.

  • Policy needs to be force applied but forceApply = false.

  • Policy apply failed.

404 Not Found

Incorrect ePO - On-prem URL.

500 Internal Server Error

An error on the server side that failed the request. See the ePO - On-prem orion.log file for more details about the error.