The mappings endpoints could also support HTTP DELETE and HTTP POST to initialize and purge the database and to add mappings, so it will not needed to log into the application server. This also allows to abstract away the use of MongoDB as other database backends could be added without changing how to insert mappings. If the application is made public via reverse proxy, these HTTP methods can be disallowed or put behind access restrictions.
The mappings endpoints could also support HTTP DELETE and HTTP POST to initialize and purge the database and to add mappings, so it will not needed to log into the application server. This also allows to abstract away the use of MongoDB as other database backends could be added without changing how to insert mappings. If the application is made public via reverse proxy, these HTTP methods can be disallowed or put behind access restrictions.