Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get all properties of subscriptions #69

Open
aadlung opened this issue Sep 19, 2019 · 1 comment
Open

get all properties of subscriptions #69

aadlung opened this issue Sep 19, 2019 · 1 comment

Comments

@aadlung
Copy link

aadlung commented Sep 19, 2019

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?

@dezio
Copy link

dezio commented Nov 17, 2019

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'    => ''
                        ]
                    ]
                ]
            ]
        ]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants