• 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.

API Problems

Matthew James

Basic Pleskian
Hi,

There are problems with some functions with the API in 10.2.0:

1) Creating Subscriptions:

Subscription is created OK, and it shows the correct plan assigned, yet the limits and permissions that are set for the subscription do not reflect the limits and permissions set for the plan. For example, my Bronze plan has 1Gb webspace, yet creating a subscription via the API based on the Bronze plan gives it Unlimited webspace. And the Bronze plan allows the permission "DNS zone management" yet the created subscription has this permission turned off.

It seems that whilst it's assigning the correct plan, it is ignoring all limits and permissions related to the plan.

Is there a workaround for this problem?

Thanks
Matt
 
Hi, Matthew

I've just tried to submit the following packet and got correct result - new subscription was created for customer, all limits were good and subscriptions was completely synced with service plan (I used "Default Domain" as example) :

<packet version="1.6.3.0">
<webspace>
<add>
<gen_setup>
<name>testapi.com</name>
<owner-id>5</owner-id>
<htype>vrt_hst</htype>
<ip_address>10.10.10.10</ip_address>
<status>0</status>
</gen_setup>
<hosting>
<vrt_hst>
<property>
<name>ftp_login</name>
<value>ftp16se4fdf0</value>
</property>
<property>
<name>ftp_password</name>
<value>qweqwe</value>
</property>
<property>
<name>ssl</name>
<value>false</value>
</property>
<ip_address>10.10.10.10</ip_address>
</vrt_hst>
</hosting>
<plan-name>Default Domain</plan-name>
</add>
</webspace>
</packet>
 
Hi EugeneL,

Thanks for the reply.

That is almost identical to the packet I've been sending however the limits do not get applied for me. Are you doing this as a reseller or administrator?

Packet sent:

<?xml version="1.0" encoding="UTF-8"?><packet version="1.6.3.0"><webspace>
<add>
<gen_setup>
<name>testing.com</name>
<owner-id>119</owner-id>
<ip_address>***.***.***.***</ip_address>
<htype>vrt_hst</htype>
<status>0</status>
</gen_setup>
<hosting>
<vrt_hst>
<property>
<name>ftp_login</name>
<value>testingc</value>
</property>
<property>
<name>ftp_password</name>
<value>**********</value>
</property>
<ip_address>***.***.***.***</ip_address>
</vrt_hst>
</hosting>
<plan-name>Silver</plan-name>
</add>
</webspace></packet>

The Silver plan has the following limits:

Disk space 2.00 GB
Traffic 20.0 GB/month
Subdomains 10
Domain aliases Unlimited
Mailboxes Unlimited
Mailing lists Unlimited
Additional FTP accounts 100
Databases 5

Yet the testing.com subscription that's created has the following limits:

Disk space Unlimited
Traffic Unlimited
Subdomains Unlimited
Domain aliases Unlimited
Mailboxes Unlimited
Mailing lists Unlimited
Additional FTP accounts Unlimited
Databases Unlimited

Also, when I try to change a subscriptions plan via the API, I get error:

"The plan was not applied: Permission denied., Permission denied."

Any ideas on that one?

Thanks again
Matt
 
I've tried to reproduce the issue under both administrator and reseller account nut without a success.

What OS do you use?
I investigated your issue under CentOS5_x86 with all installed micro-updates (there 3 MUs now) for Panel 10.2
 
Hi there,

I have just applied all the latest updates and it's still not working.

It does think the subscription is synced with the plan though, as there is no option to sync it and no exclamation mark saying it's not synced however the limits are not what the plan limits show:

gold_plan.PNG

testingc_subscription.PNG


If I go to the Gold plan, click Update & Sync then it gives error "Warning: Some subscriptions were not synced with the plan. They were marked as 'Unsynced' in the subscriptions list. To retry syncing, go to a subscription overview page and click the Sync button." and then the subscription shows as not being synced, but ONLY if I do this as the reseller, If I do it as administrator it works fine, so perhaps a permissions issue?

I am running CentOS 5.5.
 
Last edited:
Further to the above, when trying to sync that subscription manually as the reseller it says:

"Syncing the subscription with its service plan failed because some of the services or resources defined in the plan cannot be actually provisioned with the subscription. Available value indicates the actual state of a resource or a service in the system. Clicking OK will initiate setting the subscription values according to the available values."

And then goes on to mention that log rotation available option is not what is set by the plan and another thing about php safe mode.

I have allowed the reseller permission for these 2 options and now the account is synced up without any problems and the change package function is also working!

Thanks for the help in confirming it was not a bug.
 
Issue seems to appear when you work on behalf of reseller and try to create subscription with permissions which are not allowed by your reseller's plan.
I've forwarded your request to developers.
 
Back
Top