Loading TOC...

dls.documentCheckoutStatus

dls.documentCheckoutStatus(
   $uri as String
) as element(dls.checkout)?

Summary

This function returns a checkout element containing the checkout status of the specified document.

Parameters
$uri The URI of the document.

Required Privileges

The dls-user role is required to run this function, or the privilege:
http://marklogic.com/xdmp/privileges/dls-user

Example

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

dls.documentCheckoutStatus('/foo/bar/baz.xml');

/* If the document is checked out, the results should look like this:

<dls:checkout xmlns:dls="http://marklogic.com/xdmp/dls">
  <dls:document-uri>/foo/bar/baz.xml</dls:document-uri>
  <dls:annotation>updating doc</dls:annotation>
  <dls:timeout>3600</dls:timeout>
  <dls:timestamp>1524872318</dls:timestamp>
  <sec:user-id xmlns:sec="http://marklogic.com/xdmp/security">1975742840184594244</sec:user-id>
</dls:checkout>
*/
   

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