Remove documents in a collection or directory, or clear the database.
|database?||Perform this operation on the named content database instead of the default content database associated with the REST API instance. Using an alternative database requires the "eval-in" privilege; for details, see Security Requirements in the REST Application Developer's Guide.|
The transaction identifier of the multi-statement transaction in
which to service this request. Use the |
|collection?||Remove documents in the named collection.|
|directory?||Remove documents in the named directory.|
Upon success, MarkLogic Server returns a status 204.
rest-writerrole, or the following privileges:
Clearing the database requires the
rest-admin role, or the
A request with no parameters removes all documents in all non-replica
forests attached to the content database. The
role is required for this operation. If the requesting user does not
have the required role, a 400 status is returned.
All other requests must supply either one directory or one collection. All matching documents in the directory or collection are deleted.
A request to remove selected documents, rather than a full database
clear, requires the
rest-writer role, and must include
at least one