Reputation: 1510
We are using MarkLogic v9.0.7 and we have multiple AppServers, Databases and Forests created for testing purpose.
For Example, let's say, AppServer Name is testappserver.
How can i delete testappserver AppServer along with its forests and databases using xquery ?
Upvotes: 1
Views: 58
Reputation: 8422
The recommended approach is to use ml-gradle
, a tool that was built for deploying code & configuration to MarkLogic. It's well documented and based on the widely use gradle
tool. MarkLogic University even has a series of courses showing how to use ml-gradle. This approach is the repeatable way to address your question.
Deleting your app server and related databases and forests with XQuery calls would require several calls using the Admin API. Alternatively, sending a DELETE to /v1/rest-apis[name] should do the job.
Upvotes: 2