• 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.

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