Input [Feature Request] Add php_handler_id to Plesk Rest API [GET] /domains

tertek

New Pleskian
As far as I can tell, there is no simple way to fetch subdomains and their associated php_handler_id's in one (or more) requests through Plesk Rest API.

I have read through the Rest Documentation, as well as through CLI documentation, but could not find an easy way to retrieve php_handler_id for my sudomains.

However, through XML API this is rather simple, by calling packet:subdomains:get: ... .

Using XML API does not seem right, and also requires additional parsing of response. JSON would be much needed.
Therefore, I submit this feature request to add php_handler_id to the response object of Rest API endpoint for GET /domains.
 
@tertek, the XML API is actually the preferred and recommend interface for these operations. The REST API is really only meant, as far as I know at least, for simple operations. While the XML API has much more elaborate options.

In case you using a PHP application (or scripts) for your API calls, there is an official XML API wrapper for PHP to simply usage.
 
@Kaspar I have also noticed, that XML API is much more elobarate - on the other hand working with XML is really painful. Hence, I wish the REST API would be extended.

I am using Ansible to automate Plesk on multiple hosts at once. Ansible has XML parsers, but it is an additional overhead.

@Sebahat.hadzhi The particular use-case would be: Automating the process to php_handler_id per subdomain, after retrieving all subdomains per domain and checking there current php_handler_id.
 
Hello, @tertek . Thank you for the additional details. Kindly submit the request on features.plesk.com so we can have an official entry for it and keep you update via email in case our team decides to consider the suggestion for implementation.
 
Back
Top