• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Plesk REST API cli - endpoint for wp-toolkit

Mike99

Basic Pleskian
Hi,

please help me figure out, what would be an endpoint for REST API call to wp-toolkit extension:

When I try to run https://<myIP>:8443/api/v2/cli/wp_instance/call, I get

{
"code": 0,
"message": "Command 'wp_instance' not found"
}

It looks like wp_isntance command is not supported anymore, I tried the same with wp-toolkit, but it is not /plesk/bin command, it is run by #plesk ext wp-toolkit.

So what is the right endpoint for REST API to run command #plesk ext wp-toolkit <options>?

I tried to run #plesk bin extension --call wp-toolkit --list and it works, but I can not figure out, how to feed this with cURL or Postman to the REST API.

Thank you.
 
Ok I figured this out, it is strange but if it helps anyone, the endpoint is

https://<myIP>:8443/api/v2/cli/extension/call

and parameters must start with an option "--call":

{ "params": ["--call", "wp-toolkit", "--list"] }
 
Back
Top