• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • Our UX team believes in the in the power of direct feedback and would like to invite you to participate in interviews, tests, and surveys.
    To stay in the loop and never miss an opportunity to share your thoughts, please subscribe to our UX research program. If you were previously part of the Plesk UX research program, please re-subscribe to continue receiving our invitations.
  • 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.

Rest API Fatal Errors

safemoon

Basic Pleskian
Username:

TITLE

Rest API Fatal Errors

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Plesk Obsidian 18.0.68 Update #2 Web Host Edition
Ubuntu 24.04.2 LTS

PROBLEM DESCRIPTION

Hello,

Creating a new thread as suggested from this post

I've encountered issues with the Plesk REST API endpoints /databases and /dbusers when invoked without specific parameters. Previously, these endpoints functioned correctly without requiring additional parameters, but recent behavior suggests otherwise. I suspect that similar issues may be present in other endpoints as well.

STEPS TO REPRODUCE

Issue with /databases Endpoint:
Request: GET /api/v2/databases
Response:

JSON:
  {

      "code": 0,

      "message": "PleskX\\Api\\Operator\\Database::getAll(): Argument #1 ($field) must be of type string, null given, called in /opt/psa/admin/plib/modules/rest-api/v2/library/SDK/pm_Database.php on line 47"

  }

This suggests that the domain parameter, which was previously optional, is now required.

Issue with /dbusers Endpoint:
Request: GET /api/v2/dbusers
Response: Error indicating that the dbId parameter is missing.

This implies that the dbId parameter has become mandatory, whereas it was optional before.

ACTUAL RESULT

Causes a fatal error when the domain or dbId parameters are not passed.

EXPECTED RESULT

The response when the parameters are not passed should contain ALL database users and database names
These parameters were optional, and there were no such issues.

ANY ADDITIONAL INFORMATION

Impact:
These changes affect the ability to programmatically verify the existence of databases and database users without specifying domain-specific parameters. This limitation complicates remote management tasks, such as creating databases or domains without conflicts, as it necessitates additional API calls and processing

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Help with sorting out
 
Back
Top