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

Site getAll is only returning one item #163

Open
MichaelCastelbuono opened this issue May 16, 2024 · 1 comment
Open

Site getAll is only returning one item #163

MichaelCastelbuono opened this issue May 16, 2024 · 1 comment

Comments

@MichaelCastelbuono
Copy link

MichaelCastelbuono commented May 16, 2024

Running $client->site()->getAll(); only seems to return one item and it appears to always be the last item. If I add a filter for a specific ID then that item is returned so I know there are more items in my plesk instance.

The protocol version returned in the response is 1.6.9.1.

@MichaelCastelbuono
Copy link
Author

MichaelCastelbuono commented May 19, 2024

After talking with Plesk support I discovered this is working as expected. The <site> operator only returns non-primary domain information evidently. Here's what I heard from support:

Request you are using uses operator which retrieves the information for every site that is not the primary site for a subscription, and every subdomain.
Let's say you have subscription called example.com and it has only primary domain example.com.
In such case request will return "ok" meaning that it is a valid request, but it won't return any information for example.com as it is a primary domain of corresponding subscription.
At the same time, if subscription example.com has additional domain example.org and a subdomain sub.example.com request will return information for only these two domains and not for example.com

I can confirm that after configuring multiple non-primary domains in Plesk that the <site> operator or $client->site()->getAll() returns multiple entries. It would be nice if either the <webspace> operator or <site> operator had a filter to allow for all domains to be retrieved but it looks like this isn't possible yet.

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

1 participant