• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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