Loading TOC...

DELETE /v1/rest-apis/{name}

Summary

Remove an HTTP App Server servicing the MarkLogic REST API. Optionally, also remove the attached database and forests.

URL Parameters
include* Indicates that the content and/or modules database should also be removed. Accepted values: content, modules.
group? The name of a MarkLogic Server cluster Group. Use this to disambiguate the instance when more than one Group contains an instance or App Server with the same name.

Response

Upon success, MarkLogic Server return status 202 (Appserver deleted). The response body contains XML configuration information that you can use with the REST management API to confirm removal of all related resources.

Required Privileges

This operation requires the rest-admin role, or the following privileges:

http://marklogic.com/xdmp/privileges/rest-admin

http://marklogic.com/xdmp/privileges/rest-writer

http://marklogic.com/xdmp/privileges/rest-reader

Usage Notes

NOTE: This request causes a MarkLogic Server restart.

NOTE: If you use the include parameter to tear down the content database and/or the modules database, any data in the removed database is lost.

The name component of the request URI should be the name of an HTTP App Server created by making a POST request to /rest-apis. See "POST /v1/rest-apis".

It may not be possible to remove all requested resource. For example, if you include the content database (include=content) and the database is in use by another App Server, it will not be deleted. The request returns 202 (Appserver deleted) in all cases and provides additional configuration information that you can use with the REST Management API to confirm removal if necessary. To learn more, see Using the Management API in the Monitoring MarkLogic Guide.

If you do not include a group parameter and there is more than one instance or App Server in the cluster with the requested name, MarkLogic Server returns status 400 (Bad Request).

For more details, see Removing an Instance in the REST Application Developer's Guide.

Example

curl --anyauth --user user:password -X DELETE -i \
  http://localhost:8002/v1/rest-apis/RESTstop

==> The REST service named "RESTstop" is deleted. MarkLogic Server
    returns the following headers in the response:

Content-type: text/html; charset=UTF-8
Server: MarkLogic
Content-Length: 2002
Connection: close

HTTP/1.1 204 Appserver deleted
Server: MarkLogic
Content-Length: 0
Connection: close

<cluster-query 
  xsi:schemaLocation="http://marklogic.com/manage/clusters manage-clusters.xsd"
  xmlns="http://marklogic.com/manage/clusters" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  ...
</cluster-query>
  

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy