Go to the table of contents Go to the previous page Go to the next page View or print as PDF
Creating Custom Block Pages : Working with block page files on appliances
Working with block page files on appliances
Custom Block Pages | Web Protection Solutions | v8.5.x | 8-June-2020
Version 8.4 introduced a series of API commands for managing block page files on V and X Series appliances when connecting to the appliance from a remote computer using cURL.
Introduction
In the commands below:
*
Syntax for using the curl tool is shown. Other tools may also be used to communicate with the RESTful appliance API, such as the Postman app.
*
<c_interface> is the IP address of the appliance communication (C) interface.
*
<password> is the password for the appliance admin account.
The appliance API requires basic authentication to enable communication between the client and the appliance.
*
 
Note 
Block page commands
List files in the Default block page directory:
curl -k -u admin:<password> -X GET https://<c_interface>/wse/customblockpage/list/default/<lang_code>
List files in the Custom block page directory:
curl -k -u admin:<password> -X GET https://<c_interface>/wse/customblockpage/list/custom/<lang_code>
List files in the block page Images directory:
curl -k -u admin:<password> -X GET https://<c_interface>/wse/customblockpage/list/images
Get a file from the Default block page directory:
curl -k -u admin:<password> -X GET https://<c_interface>/wse/customblockpage/file/default/<lang_code>/<filename>
Get a file from the Custom block page directory:
curl -k -u admin:<password> -X GET https://<c_interface>/wse/customblockpage/file/custom/<lang_code>/<filename>
Get an image from the Images directory:
curl -k -u admin:<password> -X GET https://<c_interface>/wse/customblockpage/images/<filename>
Upload a custom block page file to the appropriate Custom directory:
curl -k -u admin:<password> -X PUT -F "file=@./<filename>" https://<c_interface>/wse/customblockpage/file/<lang_code>
For example:
curl -k -u admin:*My3Password -X PUT -F "file=@./master.html" https://10.115.75.30/wse/customblockpage/file/en
Upload a custom block page image to the Images directory:
curl -k -u admin:<password> -X PUT -F "file=@./<filename>" https://<c_interface>/wse/customblockpage/images
For example:
curl -k -u admin:*My3Password -X PUT -F "file=@./mylogo.png" https://10.115.75.30/wse/customblockpage/images
Delete a file from the Custom directory:
curl -k -u admin:<password> -X DELETE https://<c_interface>/wse/customblockpage/delfile/<lang_code>/<filename>
Delete an image from the Images directory:
curl -k -u admin:<password> -X DELETE https://<c_interface>/wse/customblockpage/delimage/<filename>
Stop and then start Filtering Service to cause your changes to take effect:
curl -k -u admin:<password> -X PUT https://<c_interface>/wse/admin/filter/stop
curl -k -u admin:<password> -X PUT https://<c_interface>/wse/admin/filter/start

Go to the table of contents Go to the previous page Go to the next page View or print as PDF
Creating Custom Block Pages : Working with block page files on appliances
Copyright 2020 Forcepoint. All rights reserved.