PLESK API add customer, add domain
Plesk api example:
Add customer:
curl -u admin:5KZlqnnOiobn61c@ -X POST "https://peopleadmin.tuke.sk/api/v2/clients" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"name\": \"Martin Hasin\", \"company\": \"UVT\", \"login\": \"mh476nd\", \"status\": 0, \"email\": \"martin.hasin@tuke.sk\", \"locale\": \"en-US\", \"owner_login\": \"admin\", \"external_id\": \"link:12345\", \"description\": \"Martin Hasin customer\", \"password\": \"changeme1Q**\", \"type\": \"customer\"}"
JSON:
{
"name": "John Smith",
"company": "Plesk",
"login": "john-unit-test",
"status": 0,
"email": "john_smith@msn.com",
"locale": "en-US",
"owner_login": "admin",
"external_id": "link:12345",
"description": "Nice guy",
"password": "changeme1Q**",
"type": "reseller"
}
Domain ADD:
curl -u admin:5KZlqnnOiobn61c@ -X POST "https://peopleadmin.tuke.sk/api/v2/domains" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"name\": \"qwerty5.domena3.lab1.tuke.sk\", \"description\": \"Martin Hasin website\", \"hosting_type\": \"virtual\", \"hosting_settings\": { \"ftp_login\": \"mh476nd_ftp5\", \"ftp_password\": \"changeme1Q**\" }, \"owner_client\": { \"login\": \"mh476nd\" }, \"ip_addresses\": [ \"147.232.16.52\" ], \"plan\": { \"name\": \"people\" }}"