新建應用
新建應用
URI
POST /admin-api/applications/http
JSON body
partitions
type: array
required: yes
description: 釋出到的叢集分割槽
is_default
type: boolean
required: yes
description: 是否預設
http_ports
type: array
required: yes
description: HTTP埠
https_ports
type: array
required: yes
description: HTTPS埠
http2_status
type: string
required: yes
description: http2狀態
allow_access_by_ip_list
type: array
required: no
description:
allow_load_by_ip_list
type: array
required: no
description:
domains
type: array
required: yes
description: 域名列表
domains.is_wildcard
type: boolean
required: yes
description: 是否是萬用字元域名
domains.domain
type: string
required: yes
description: 域名名稱
請求示例
Shell
curl \
-H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
http://admin-site/admin-api/applications/http \
-d '{"partitions":[1],"is_default":false,"http_ports":[80],"https_ports":[443],"http2_status":"global","allow_access_by_ip_list":null,"allow_load_by_ip_list":null,"domains":[{"is_wildcard":false,"domain":"test.com"}]}'
響應示例
Status: 200 OK
{
"data": {
"id": 2
},
"status": 0
}