Use API to create configurations to upload any file type

You can also use the NetScaler MAS API to create a configpack that uploads files to the selected NetScaler instance.

Consider the StyleBook example you created to upload files of any type in How to Create a StyleBook to Upload Files to NetScaler MA Service. As in the example in the above topic, create a configpack and specify the value of the parameter “locationfile” as the file path of the location file on NetScaler MAS. Use REST API to create a configpack from this StyleBook as follows:

POST https://<mas\_ip\>/stylebook/nitro/v1/config/stylebooks/com.citrix.adc.stylebooks.samples/1.0/upload-geolocations/configpacks

Content-Type: application/json
Accept: application/json
{
   "configpack":
   {
      "parameters": {
         "locationfile": "/var/mps/tenants/root/files/ /custom_geolocations.csv"  
    },
      "targets": [
         {
            "id": "5e540839-cd6c-437e-ac53-7d49bc2602b5"
      }
    ]
  }
}

Use API to create configurations to upload any file type

In this article