StyleBook configuration

Use API to update an existing config pack

You can use the StyleBook API to update the existing config packs in ADM.

PUT: https://<ADM-endpoint-name>/stylebook/nitro/v2/config/configpacks/<configpack-ID>?mode=async

Payload:

{
    "configpack": {
        "parameters": {
            "name": "TestApp1",
            "lbname": "my-lbv",
            "waf-settings": {
                "rule": "true",
                "type": [
                    "HTML"
                ],
                "profile-settings": {
                    "logeverypolicyhit": false,
                    "enablesignatures": {
                        "signaturename": "waf-sign1"
                    },
                    "sqlinjection-settings": {
                        "sqlinjectionaction": [
                            "log",
                            "stats"
                        ],
                        "sqlinjection-default-settings": {
                            "sqlinjectiontransformspecialchars": true,
                            "sqlinjectionchecksqlwildchars": true,
                            "sqlinjectiontype": "SQLSplCharANDKeyword",
                            "sqlinjectionparsecomments": "checkall",
                            "sqlinjectiongrammar": "OFF"
                        }
                    },
                    "bufferoverflow-settings": {
                        "bufferoverflowaction": [
                            "log"
                        ],
                        "bufferoverflowmaxurllength": "2048",
                        "bufferoverflowmaxheaderlength": "4096",
                        "bufferoverflowmaxcookielength": "4096",
                        "bufferoverflowmaxquerylength": "65535",
                        "bufferoverflowmaxtotalheaderlength": "65535"
                    }
                }
            }
        },
        "config_key": "",
        "targets": [
            {
                "instance_id": "1b322685-3b23-4111-a9ce-56dd1c659e4c"
            }
        ],
        "stylebook": {
            "name": "waf-adv",
            "namespace": "com.citrix.adc.stylebooks",
            "version": "1.3"
        }
    }
}
<!--NeedCopy-->

Use API to update target instances

In the update config pack payload, change the targets section to add, remove, or replace an ADC instance.

Example:

{
    "targets": [
        {
            "instance_id": "Existing-ADC-instance-ID"
        },
        {
            "instance_id": "New-ADC-instance-ID"
        }
    ],
}
<!--NeedCopy-->
Use API to update an existing config pack