You can use this REST API call to send a request to create or override an existing URL list.
POST request URL
https://<epo_server_name:port>/rest/dlp/definitions/urlList/import
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 |
Parameter name | Description | Required | Values |
|---|---|---|---|
name | If the name of the definition exists, the current properties are overridden, else a new definition is created. | Required | String |
description | Description of the definition. | Optional | String |
override | If true: Overrides the existing definition. If false: If the definition name exists, the operation fails. | Required | Boolean |
body | CSV file containing records to be imported. | Required | File |
Sample POST request URL
https://172.27.108.53:8443/rest/dlp/definitions/urlList/import
Sample cURL command
curl -k -v -X POST 'https://172.27.108.53:8443/rest/dlp/definitions/urlList/import' -u '<user>:<password>' -F 'name="CatalogItemName"' -F 'description="Enter desc. here"' -F 'override="false"' -F 'body=@"/path/to/file/fileName.csv"'
Sample request parameters (multipart/form-data)
{
"name": "CatalogItemName",
"description": "Enter desc. here",
"override": false,
"body": the CSV file
}
Sample response
Import completed
Status and error codes
List of HTTP status codes returned for the query.
Code | Description |
|---|---|
200 OK | Returns a message after a successful import of the URL list. |
400 Bad Request | Returns a bad request if:
|
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 |