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
talk.plesk.com
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:
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
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
Issue - GetDatabases Rest API Fatal Error
Hi All, Recently the API call to the /databases endpoint is not working properly without a "domain" parameter. It used to work without any issues before. Having the ability to find if a database name already exists in the server is very beneficial as it allows you to create databases/domains...

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