When using the REST API, the content database is specified by the REST API port (server) you are connecting to. Specifying db.configure({database: "mycontent"}) would be effectively ignored.
Instead we need to ignore port: the first time around and use the admin port to lookup the correct rest server instance for the "mycontent" database. Only if this fails should we fall back to the port setting.
Removing this as an issue. Port is not unreasonable to use. If we forced port lookup, you would always need to configure an admin user/pass, which is bad practice
When using the REST API, the content database is specified by the REST API port (server) you are connecting to. Specifying db.configure({database: "mycontent"}) would be effectively ignored.
Instead we need to ignore port: the first time around and use the admin port to lookup the correct rest server instance for the "mycontent" database. Only if this fails should we fall back to the port setting.
This also needs documenting very clearly.