Use APIs to update an existing config pack
https://<ADM-endpoint-name>/stylebook/nitro/v2/config/configpacks/<configpack-ID>?mode=async
{
"configpack": {
"stylebook": {
"name": "waf-adv",
"namespace": "com.citrix.adc.stylebooks",
"version": "1.3"
},
"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"
}
}
}
},
"targets": [
{
"instance_id": "1b322685-3b23-4111-a9ce-56dd1c659e4c"
}
]
}
}
{
"job": {
"job_id": "1092579455"
}
}
https://<ADM-endpoint-name>/stylebook/nitro/v2/config/jobs/1092579455
{
"job": {
"job_id": "4268148987",
"status": "completed",
"progress_info": [
{
"is_last": "false",
"message": "Validated the parameters",
"status": "success"
},
{
"is_last": "false",
"message": "Configuration audit completed",
"status": "success"
},
{
"is_last": "false",
"message": "Computed configuration objects",
"status": "success"
},
{
"is_last": "false",
"message": "Prepared objects for applying configuration on 192.168.153.165",
"status": "success"
},
{
"is_last": "false",
"message": "Retrieved existing data for updatable objects on instance 192.168.153.165",
"status": "success"
},
{
"is_last": "false",
"message": "Applied configuration on instance 192.168.153.165",
"status": "success"
},
{
"is_last": "false",
"message": "Retrieved data for configuration audit on instance 192.168.153.165",
"status": "success"
},
{
"is_last": "false",
"message": "Logged out from instance 192.168.153.165",
"status": "success"
},
{
"is_last": "true",
"message": "Saved configpack.",
"status": "completed"
}
],
"result": {
"status": "completed",
"id": "4268148987",
"config_key": "4268148987",
"created_by": "nsroot",
"created_datetime": "2023-01-20 18:57:58.985435",
"created_datetimestamp": "2023-01-20 18:57:58",
"last_modified_by": "nsroot",
"last_modified_datetime": "2023-01-20 19:00:32",
"name": "sample-dns-stylebook",
"namespace": "com.citrix.adc.tests",
"version": "1.0"
}
}
}
Use APIs to update target instances
targets section to add, remove, or replace a NetScaler instance.
targets object in the payload is changed to add a new target NetScaler to the configuration:
{
"targets": [
{
"instance_id": "<Existing-ADC-instance-ID>"
},
{
"instance_id": "<New-ADC-instance-ID>"
}
],
}
targets object when a NetScaler needs to be removed from a configuration for maintenance.
targets object. The NetScaler Console configuration is retained but it is removed from the all NetScalers on which it was previously deployed. You can update the configuration again to specify one or several targets, if required.
https://<ADM-endpoint-name>/stylebook/nitro/v2/config/configpacks/<configpack-ID>?mode=async
{
"configpack": {
"stylebook": {
"name": "waf-adv",
"namespace": "com.citrix.adc.stylebooks",
"version": "1.3"
},
"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"
}
}
}
},
"targets": []
}
}