XML Policy API Setup Guide
    • PDF

    XML Policy API Setup Guide

    • PDF

    Article summary

    API

    XML Policy Management API Documentation

    XML Validation API Documentation

    Creating a new XML Policy

    1. Make a POST request to the XML Policy 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 param.

    Exmaple:

    {
        "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 param.

    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 labelled policy. If no policy name and no dynamic policy is specified, the default policy is used.


    Was this article helpful?

    What's Next