Overwrite databases via REST interface

Wednesday, 15 January 2020 · 2 messages
BB
Braunschweig, Björn15 Jan 2020 15:30 #
Dear list, I have a use case where multiple distributed processes make use of a shared basex instance using the REST interface. Unfortunately executing PUT /rest/mydb creates an empty database regardless of whether it contains files or not. Is there a config option or something else to not overwrite existing databases? Otherwise I have to implement a locking mechanism. Regards, Björn
CG
Christian Grün15 Jan 2020 17:51 #
Hi Björn, The BaseX admin user can be compared with the Unix root user. In productive environments, you should avoid the admin account and create additional, task-specific users. For example, you may want to create a user, which only has read/update permissions for specific databases [1]. Hope this helps, Christian [1] http://docs.basex.org/wiki/User_Management
Quoted text · Björn · 13 lines
On Wed, Jan 15, 2020 at 3:31 PM Braunschweig, Björn <bjoern.braunschweig at gwdg.de> wrote: > > Dear list, > > I have a use case where multiple distributed processes make use of a shared > basex instance using the REST interface. Unfortunately executing PUT > /rest/mydb creates an empty database regardless of whether it contains files > or not. Is there a config option or something else to not overwrite existing > databases? Otherwise I have to implement a locking mechanism. > > Regards, > Björn

⚡Generated with XQuery