Application Delivery Management

Use API to create configurations to upload certificate and key files

Use the StyleBook APIs to create configurations based on this StyleBook. You can use any tool such as the curl command line tool or the Postman chrome browser extension to send HTTP requests to NetScaler Application Delivery Management (ADM).

Consider the StyleBook example you created to upload the certificate and key files in How to Create a StyleBook to Upload SSL Certificate and Certificate Key Files to NetScaler ADM. Use REST API to create a configuration pack from this StyleBook as follows:

POST

https://<MAS_IP_Address>/stylebook/nitro/v1/config/stylebooks/com.citrix.adc.stylebooks/1.0/lb-mon/configpacks?mode=async
<!--NeedCopy-->
Content-Type: application/jsonAccept: application/json {
   "configpack": {
       "parameters": {
           "lb-appname": "lbmon",
           "lb-virtual-ip": "13.1.11.10",
           "lb-virtual-port": "80",
           "lb-service-type": "HTTP",
           "svc-service-type": "HTTP",
           "svc-servers": [
               {
                   "ip": "14.1.1.15",
                   "port": "80"        }
      ],
           "certificates": [
               {
                   "cert-name": "server_cert",
                   "cert-file": "server_cert.pem",
                   "ssl-inform": "PEM",
                   "key-name": "server_key",
                   "key-file": "server_key.pem",
                   "cert-password": "secret",
                   "cert-advanced": {
                       "is-ca-cert": false,
                       "skip-ca-name": false
          }
        }
      ],
           "lb-advanced": {
               "flush-on-state-down": "ENABLED",
               "auth-params": {
                   "authentication": "OFF",
                   "authentication-http-401": "OFF"
        },
               "appflow-log": "ENABLED",
               "algorithm": "LEASTCONNECTION"
      },
           "svcg-advanced": {
               "svc-client-ip": "DISABLED",
               "svc-use-source-ip": "NO",
               "svc-use-proxy-port": "NO",
               "svc-surge-protection": "OFF",
               "svc-client-keepalive": "NO",
               "svc-tcp-buffering": "NO",
               "svc-compression": "NO",
               "svc-state": "ENABLED",
               "svc-downstate-flush": "DISABLED",
               "svc-enable-health-monitor": "NO"
      }
    },
       "targets": [
           {
               "id": "8c158e7a-0087-423f-91b0-0ccf16de552a"
      }
    ]
  }
}
<!--NeedCopy-->

This configuration pack is uniquely identified by using the id 8c158e7a-0087-423f-91b0-0ccf16de552a. You can use this ID to query, update, or delete the configuration. On successful update of the configuration pack, the certificate and key files are uploaded to NetScaler ADM file system.

Use API to create configurations to upload certificate and key files