• 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

Resolved Rest-API incomplete

Jelle_Timmer

Basic Pleskian
Hi all,

While trying to automate some Plesk-actions I ran into some deprecated functions in the old XML api.

When i tried to get come information about, and from, the new Rest api, i ran into some issues. The most irritating is the fact that some actions in the api don't seem to be implemented while the playground (logged in as root) and Swagger say otherwise.

I tried to get some information about the commands in the CLI-endpoint, but when i try /cli/{command}/ref, i always get

501 - Error: Not Implemented
Code:
{
  "code": 0,
  "message": "Since 17.9.5"
}

When requesting command-references i would expect this:
200 - OK
Code:
{
  "allowed_commands": {},
  "allowed_options": {}
}

This is not the expected response when requesting references for an existing command (retrieved by /cli/commands).

Am i doing something wrong or is there an error in the api itself?

System-info:
CentOS 7.6.1810
Plesk Onyx 17.8.11#66 Web Pro
 
Last edited:
Took some time to land, but i see now that these options will be implemented in the new release of Plesk... :oops:

Still, it would have been nice if options in the old api would be disabled at the moment they are enabled in the new, and not far before that moment.

One of the things i am looking for is package-management. This was disabled in Plesk 17.5 and will become available again in 17.9.5. What about the users on 17.8?
 
Hi, @Jelle_Timmer
Unfortunately we can not synchronize internal plesk SDK between different releases. Method which provide CLI options info uses JSON formatter available since 17.9 (now known as 18.0 Obsidian).
You can anyway use CLI commands interface to execute commands in 17.8. If you need to know available options you can use CLI interface like plesk bin commandname --help and then use this options in API. All options available in CLI also available in REST API.
 
I understand you cannot move Plesk SDK's between different versions. It took me a while to notice most of the Rest API functions are not yet supported.

But can you tell me why some of the old XML API functions are disabled before there is a working alternative for remote use?
 
It took me a while to notice most of the Rest API functions are not yet supported.
You mean REST API currently is not has many functions? It is :(

But can you tell me why some of the old XML API functions are disabled before there is a working alternative for remote use?
Unfortunately i can not. BTW i think you can feet your needs with cli methods (except one that give options list)
 
Back
Top