Application domain management
Append single domain to an existing application
Description
Append single domain to an existing application. Currently only one domain name can be appended at a time.
URI
POST /admin-api/applications/http/{app_id}/domains
URI Parameters
domain
type: string
required: yes
description: the domain name to be appended to the application, wildcard domain (i.e. *.example.com) is supported, (in case of wildcard domain, the
is_wildcard
field below needs to be set to true)is_wildcard
type: boolean
required: no
description: whether the domain name is a wildcard domain or not.
default: false
Example Request
Shell
curl \
-X POST \
-H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
"https://{admin-site}/admin-api/http/1/domains" \
-d '{"domain":"2.example.com","is_wildcard": false}'
Example Response
Status: 200 OK
{"status":0}
Append domains to an existing application in bulk
Description
Append domains to an existing application in bulk
URI
PUT /admin-api/app_domains/{app_id}/append
URI Parameters
domains
type: array
required: yes
description: the domain name to be appended to the application
Example Request
Shell
curl \
-X PUT \
-H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
"https://{admin-site}/admin-api/app_domains/1/append \
-d '{"domains":["3.example.com", "4.example.com"]}'
Example Response
Status: 200 OK
{"status":0}
Remove domains from existing application in bulk
Description
Remove domains from existing application in bulk
URI
PUT /admin-api/app_domains/{app_id}/remove
URI Parameters
domains
type: array
required: yes
description: the domain name to be remove from the application
Example Request
Shell
curl \
-X PUT \
-H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
"https://{admin-site}/admin-api/app_domains/1/remove \
-d '{"domains":["3.example.com", "4.example.com"]}'
Example Response
Status: 200 OK
{"status":0}