Application Delivery Management

Use API to create configurations to upload any file type

You can also use the NetScaler Console API to create a config pack that uploads files to the selected NetScaler instance. Refer to the example for uploading files of any type at How to Create a StyleBook to Upload Files to NetScaler MA Service. As explained in the example, create a config pack and set the value of the ‘locationfile’ parameter to the file path of the location file on NetScaler Console. Use REST API to create a config pack from this StyleBook as follows:

POST

https://<mas_ip>/stylebook/nitro/v2/config/configpacks?mode=sync
<!--NeedCopy-->
Content-Type: application/json
Accept: application/json
{
    "configpack": {
        "stylebook": {
            "name": "upload-geolocations",
            "namespace": "com.citrix.adc.stylebooks.samples",
            "version": "1.0"
        },
        "parameters": {
            "locationfile": {
                "name": "servercert1.key",
                "contents": "<base64-contents>",
                "encoding_type": "base64"
            }
        },
        "targets": [
            {
                "instance_id": "d9dca475-abde-47ef-bf99-8434fe6ad886"
            }
        ]
    }
}

<!--NeedCopy-->
Use API to create configurations to upload any file type