Skip to main content
Version: 2.18.1

XML policy API setup guide

The XML Policy Management API allows users to create new XML validation policies in Glasswall Halo.

Creating a new XML policy​

1. Make a post request to the XML Policy Management API​

To submit a new ICAP profile, send a post request to the api/v1/xml-policies/<policy-name> endpoint. Include a JSON request body that contains the policy. The policy name is specified as a path parameter.

Example:

{
"policySettings": {
"EnableWarningHandling": false,
"BlockedTags": [
"/XInclude:include",
"/XSL/Transform:stylesheet"
],
"AllowedEncodings": [
"utf-8",
"utf-16",
"iso-8859-1"
],
"AllowEmptyEncoding": true,
"AllowDoctypeInCData": false
}
}

If the request body is valid, the response will contain a summary of the newly created policy.

2. Use the policy in the XML Validation API​

Heading back to the XML Validation API, the saved policy can be utilised via the policyName query parameter.

Example post request:/api/v1/validate-xml?policyName=<policy-name>.

If desired, a dynamic policy can be used. Provide a JSON value to the multipart/form field labelledpolicy. If no policy name and no dynamic policy is specified, the default policy is used.

Learn more​

XML Policy Management API documentation

XML Validation API documentation