• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Plesk 12.5.30 API propertie List ?

Chris-The-Tuner

New Pleskian
Hello together,

i'm using PLesk since 6 years, but i ran into a Problem now.
I try to implement Plesk within my Customers Panel, but i'm missing something in the doc for the API.
I try to create a Service-Plan for every customer (i know not needed but it's keeping me organized...).

I use PHP to query the API via the PleskApiClient, and try to use the following:
Code:
require_once('PleskApiClient.php');
$host = "config.mydomain.eu";
$client = new PleskApiClient($host);
$client->setCredentials("MYUSER", "MYPASS");
$request = "<packet>
<service-plan>
<add>
  <name>test_plan</name>
  <hosting>
  <property>
  <name>ssl</name>
  <value>false</value>
  </property>
     <property>
  <name>disk_space</name> ### THIS IS MY PROBLEM ###
  <value>1024</value>
  </property>
  </hosting>

</add>

</service-plan>
</packet> ";
$response = $client->request($request);
echo $response . "\n";
?>
In the Space of "### THIS IS MY PROBLEM ###" basicly thats what i ask.
Is there any List of property names that i can set ?
I need to create a Plan with certain Traffic limits, Webspace, Domains etc...
But i have search for hours and did not find any Doc where theese could be listed.

Can anyone help me here ?
Possible i'm going the wrong way, if so please tell me how to do it :)

Greetings Christian
 
This works for us:

<packet version=\"1.6.3.0\">
<service-plan>
<add>
<name>MyServicePlan</name>
<limit>
<name>disk_space</name>
<value>1073741824</value>
</limit>
<limit>
<name>disk_space_soft</name>
<value>968884224</value>
</limit>
</add>
</service-plan>
</packet>
 
Hi Christian,

<name>max_site</name>
<value>1</value>
</limit>
<limit>
<name>max_subdom</name>
<value>-1</value>
</limit>
<limit>
<name>max_dom_aliases</name>
<value>1</value>
</limit>
 
Back
Top