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

Question REST API Import Database?

safemoon

Basic Pleskian
Server operating system version
20.04.6 LTS
Plesk version and microupdate number
18.0.55
Hello,
I know that it is possible to create a database through Plesk Rest API, but is it possible to import an SQL file to that database so it gets filled with the necessary db tables for my app?
 
according to Google (Bard)
"Yes, I can verify that the Plesk REST API endpoint for importing a database file still exists. The endpoint is /api/v2/databases/import and it is available in Plesk Onyx and later versions."

However, I don't think this is true as this endpoint is not listed in the documentation.
Any thoughts?
 
There isn't any methode in the REST API to import a database.

But if your objective is to just create tables, you could simply use the credentials used to create the database in the first place to open a database connection and add the tables via a script. I would almost say it's easier then importing.
 
Back
Top