Loading TOC...


   uri as String,
   deep as Boolean,
   remove-versions as Boolean
) as null


Removes the specified document from management. You must have update permissions on the document to unmanage the document.

uri The URI of the document.
deep Specifies whether to unmanage this document as well as any documents for which this document has XInculde references to. Specify true to unmanage all XInclude references or false to leave any included documents as managed documents. The default is false.
remove-versions Specify true to delete all but the latest version during the unmanage operation, false to leave any older versions in the database as unmanaged documents.

Required Privileges

The dls-user role is required to run this function, or the privilege:


// Unmanages 'baz.xml', but maintains management of its referenced
// documents. All versions but the latest version of this document 
// are deleted.

const dls = require('/MarkLogic/dls');

dls.documentUnmanage('/foo/bar/baz.xml', false, true);

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.