Application Delivery Management

使用 API 创建配置以上传任何文件类型

您还可以使用 NetScaler Console API 创建配置包,以上传文件到所选的 NetScaler 实例。 请参阅有关上传任何文件类型的示例,该示例位于“如何创建 StyleBook 以上传文件到 NetScaler MA Service”。 如示例中所述,创建一个配置包,并将“locationfile”参数的值设置为 NetScaler Console 上位置文件的文件路径。 使用 REST API 从此 StyleBook 创建配置包,如下所示:

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-->
使用 API 创建配置以上传任何文件类型