Reputation: 1614
I've set up a cluster using a slightly modified version of the MarkLogic Java API com.marklogic.client.test.util.TestServerBootstrapper
to create the databases automatically along with the following http service
Admin HTTP Security 0.0.0.0 8001 no
HealthCheck HTTP App-Services 0.0.0.0 7997 no
manage HTTP App-Services 0.0.0.0 8002 no
dbname HTTP dbname 0.0.0.0 8012 no
I've been able to create manually a copy of the default App-Services on port 8000 and adjust to use a different database and module database as
App-Services HTTP dbname 0.0.0.0 8013 no
I'm wondering how I would automatically create and tear down the that App-Services on port 8013 by modifying the java api client. Could you recommend documentation that I would need to read to accomplish that.
Thanks Conteh
Upvotes: 1
Views: 86
Reputation: 8422
As of right now, the Java Client API supports the MarkLogic REST Client API, but not the Management API.
From the Java Application Developer's Guide:
Note that you can only configure aspects of the underlying REST instance with the Java API. MarkLogic Server administration is not exposed in Java, so things such as creating indexes, creating users, creating databases, assigning roles to users, and so on must be done via the MarkLogic Admin Interface or other means (for example the Admin API or REST Management API).
If you want to do it from Java, you can send HTTP requests to the Management API. Good news: there's a community-driven project that will make this a lot easier. Take a look at @rjrudin's ml-app-deployer, a Java Client for the Management API. He's also written a Gradle client for it that uses ml-app-deployer.
Upvotes: 1