api-php-lib
api-php-lib copied to clipboard
get all properties of subscriptions
Hi, in general, the API is just returning the gen_info tags mostly, there is no way of getting a full subscription, e.g. with a packet:
<packet>
<webspace>
<get>
<filter/>
<dataset>
<gen_info/>
<hosting/>
<stat/>
<prefs/>
<disk_usage/>
<performance/>
<subscriptions/>
<php-settings/>
<resource-usage/>
</dataset>
</get>
</webspace>
</packet>
Is there any plan to extend the API to really receive all properties, or a way to customize it without re-programming nearly the whole API?
@abashurov , any idea?
Hey, I got the following working:
$this->plesk()
gives me an instance of \PleskX\Api\Client
. U can leave the filter empty and of course add or remove some datasets.
$req = $this->plesk()->request([
'webspace' => [
[
'get' => [
'filter' => ['name' => $this->subscription],
'dataset' => [
'gen_info' => '',
'hosting' => '',
'php-settings' => '',
'performance' => '',
'prefs' => '',
'subscriptions' => '',
'limits' => '',
'plan-items' => ''
]
]
]
]
]);