herhrethrth
New Pleskian
am using Plesk Onyx Hosting along with it's API to suspend webspaces (subscriptions). I do this using the PHP library like so:
public function disableWebspace($id, $guid, $domain) {
$webspace = $this->client->webspace()->request([
'set' => [
'filter' => [
'guid' => $guid,
//'name' => $domain,
//'id' => $id,
],
'values' => [
'gen_setup' => [
'status' => '16', // status keys = What do the domain status codes in Plesk mean?
],
],
],
]);
var_dump($webspace);
}
Changing the status works fine, and the subscription is suspended. However...:
I can only change the status back to 0 using the API. I cannot re-activate the subscription using the plesk panel with the root/admin user.
However when I suspend using the Plesk panel (root/admin). I am able to do this.
Shouldn't the admin/root user be able to do everything in the Plesk panel?
public function disableWebspace($id, $guid, $domain) {
$webspace = $this->client->webspace()->request([
'set' => [
'filter' => [
'guid' => $guid,
//'name' => $domain,
//'id' => $id,
],
'values' => [
'gen_setup' => [
'status' => '16', // status keys = What do the domain status codes in Plesk mean?
],
],
],
]);
var_dump($webspace);
}
Changing the status works fine, and the subscription is suspended. However...:
I can only change the status back to 0 using the API. I cannot re-activate the subscription using the plesk panel with the root/admin user.
However when I suspend using the Plesk panel (root/admin). I am able to do this.
Shouldn't the admin/root user be able to do everything in the Plesk panel?