kb: how-to
Plesk Obsidian for Linux
Plesk Onyx for Linux
ABT: Group A
Applicable to:
- Plesk Obsidian for Linux
- Plesk Onyx for Linux
Question
How to create domain via REST API?
Answer
- Create
plesk-domain.json
file with the following content to store the request body:CONFIG_TEXT: {
"name": "example.com",
"hosting_type": "virtual",
"hosting_settings": {
"ftp_login": "ftplogin",
"ftp_password": "ftppassword"
},
"ipv4": ["212.XXX.XXX.XXX"],
"plan": {
"name": "Unlimited"
}
} - Execute the following API request:
# curl -k -u admin:'password' -X POST -d @plesk-domain.json "https://<plesk-host>:8443/api/v2/domains"
Comments
1 comment
When I create domain it say:
"code": 1013,
"message": "Specified Webspace does not exist"
So the virtual hosting does not exists?
Please sign in to leave a comment.