xdmp.forestState( forestID as (Number|String) ) as Sequence
Returns state of the forests
http://marklogic.com/xdmp/privileges/status
xdmp.forestState(xdmp.forest("Documents")); => open