Overwrite databases via REST interface
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
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
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
Written for BaseX 9.3. BaseX may have changed since: please check the current documentation.