• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

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