Hi, Danny: The REST API doesn't support sharing modules databases between REST servers or providing an interface for renaming managed resources in the modules database.
There could be a number of issues (for instance, permissions on the options file), but working through the issues on an unsupported operation would be guesswork. Part of the rationale for the one-to-one relation between modules databases and REST servers was to make it easy to package up a REST implementation on a development environment and push it to a production server. Can you expand on the issues you're running into with that one-to-one approach? Thanks, Erik Hennum ________________________________ From: [email protected] [[email protected]] on behalf of Danny Sinang [[email protected]] Sent: Wednesday, April 29, 2015 8:12 AM To: general Subject: [MarkLogic Dev General] Moving REST API Instance module code to a directory in Modules database We have a REST API instance running on port 9042 on our DEV cluster and it works fine. When this instance was created, a new modules databases called 9042_imagechallenge-rest-modules was created for it by ML. I'm trying to avoid minimize the number of modules databases we have, so I : 1. Copied the code from 9042_imagechallenge-rest-modules to a new directory called "/imagechallenge_rest" in our Modules database. 2. Reconfigured our 9042-imagechallenge-rest app service to use /imagechallenge_rest as its root and Modules as its modules database. After step 2, I visited : http://marklogic-dev.mycompany.com:9042/v1/search?q=published:true&options=image_challenge and now I'm getting this error : <error-response xmlns="http://marklogic.com/xdmp/error"> <status-code>400</status-code> <status>Bad Request</status> <message-code>REST-INVALIDPARAM</message-code> <message>REST-INVALIDPARAM: (err:FOER0000) Invalid parameter: No configured options: image_challenge</message> </error-response> I checked the /imagechallenge_rest directory and this "missing" option file is indeed under : /imagechallenge_rest/Default/9042-imagechallenge-rest/rest-api/options . What could I be missing ? Regards, Danny
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
