• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

Resolved REST API /api/v2/cli/* returns 404

Alban Staehli

Regular Pleskian
Server operating system version
CentOS Linux release 7.9.2009
Plesk version and microupdate number
Plesk Obsidian v18.0.39_build1800211117.18 os_CentOS 7
Hi,

Since I migrated my Plesk vm to a new IP, I realized the REST API calls to CLI returns 404:
  • https://<IP_ADDRESS>:8443/api/v2/cli/commands/ returns 404
  • https://<host.domain.tld>:8443/api/v2/cli/commands/ returns 404
  • command curl -k -u 'admin:password' -X GET "https://<IP_ADDRESS>:8443/api/v2/cli/commands/" returns 404
  • command curl -k -u 'admin:password' -X GET "https://<host.domain.tld>:8443/api/v2/cli/commands/" returns 404
  • https://<IP_ADDRESS>:8443/api/v2/swagger.yml returns the swagger, all good
  • https://<host.domain.tld>:8443/api/v2/swagger.yml returns the swagger, all good
Would you know what has to be tweaked / enabled?
Thank you.
 
Solved.... after playing around, the trailing slash was the issue. No clue why it changed, could be something else than the new IP, such a change in PHP version of the script calling the API...

In brief:
  • https://<IP_ADDRESS>:8443/api/v2/cli/commands/ returns 404
  • https://<host.domain.tld>:8443/api/v2/cli/commands/ returns 404
  • https://<IP_ADDRESS>:8443/api/v2/cli/commands all good
  • https://<host.domain.tld>:8443/api/v2/cli/commands all good
 
Back
Top