<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.requestStatus.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.requestStatus</api:function-name><api:suggest>xdmp.requeststatus</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>requeststatus</api:suggest><api:function-link mode="xquery" fullname="xdmp:request-status">/apidoc/8.0/xdmp:request-status.xml</api:function-link><api:function mode="javascript" name="requestStatus" type="builtin" lib="xdmp" category="Server Monitoring" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.requestStatus"><api:summary>
  <p xmlns="http://www.w3.org/1999/xhtml">
  Returns the status of a running request <span class="javascript">as
  a ValueIterator of ObjectNodes</span>.  If the request ID is that of
  the calling request, then no special permission is required.  If the
  ID is for another request, then the calling request needs
  <code>http://marklogic.com/xdmp/privileges/status</code> permission.
  </p>
  <p xmlns="http://www.w3.org/1999/xhtml">
  The result of this builtin is exactly equivalent to
  <code>xdmp:server-status(xdmp:host(), xdmp:server())//*:request-status[*:request-id = $req]</code>,
  where <code>$req</code> is the ID of the request
  you are interested in.
  </p>
  <p xmlns="http://www.w3.org/1999/xhtml">
  In the 3.2 release this builtin is not cluster-aware, the
  first argument (host ID) must be the same as the value returned
  by <code>xdmp:host()</code>.  If you wish to obtain the status of a request
  running on a remote host, use the code snippet above to obtain
  the request status using <code>xdmp:server-status()</code>.
  </p>
</api:summary><api:params><api:param name="host-id" type="xs:unsignedLong"><api:param-description>
    A host ID.  Must be the ID of the local host.
  </api:param-description><api:param-name>host-id</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="server-id" type="xs:unsignedLong"><api:param-description>
    A server ID (HTTP, XDBC, ODBC, webDAV, or Task).
  </api:param-description><api:param-name>server-id</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="request-id" type="xs:unsignedLong*"><api:param-description>
    One or more request IDs.
  </api:param-description><api:param-name>request-id</api:param-name><api:param-type>String[]</api:param-type></api:param></api:params><api:return class="javascript">ValueIterator</api:return><api:privilege>
  http://marklogic.com/xdmp/privileges/status
</api:privilege><api:usage schema="server-status.xsd" camel-case="true">
<api:schema-info><api:element><api:element-name>requestId</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">A unique id for a request.</xs:documentation></api:element-description></api:element><api:element><api:element-name>serverId</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The server id.</xs:documentation></api:element-description></api:element><api:element><api:element-name>hostId</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The unique key of the host</xs:documentation></api:element-description></api:element><api:element><api:element-name>transactionId</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The unique key of the transaction</xs:documentation></api:element-description></api:element><api:element><api:element-name>canceled</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">Has this request been canceled.</xs:documentation></api:element-description></api:element><api:element><api:element-name>modules</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The ID of the database that contains application modules. If on the file-system, then 0.</xs:documentation></api:element-description></api:element><api:element><api:element-name>database</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The ID of the content database when applicable. In some cases, this is a forest ID or a random number (when neither a database ID nor a forest ID is available).</xs:documentation></api:element-description></api:element><api:element><api:element-name>root</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The root document directory pathname.</xs:documentation></api:element-description></api:element><api:element><api:element-name>requestKind</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The kind of request (for example, invoke, eval).</xs:documentation></api:element-description></api:element><api:element><api:element-name>requestText</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The request text.</xs:documentation></api:element-description></api:element><api:element><api:element-name>requestRewrittenText</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The rewritten request text.</xs:documentation></api:element-description></api:element><api:element><api:element-name>update</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">Specifies if this request an update (true for update requests).</xs:documentation></api:element-description></api:element><api:element><api:element-name>startTime</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The time the operation started.</xs:documentation></api:element-description></api:element><api:element><api:element-name>timeLimit</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The request's time limit, in seconds.</xs:documentation></api:element-description></api:element><api:element><api:element-name>maxTimeLimit</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The upper bound for a request's time limit, in seconds.</xs:documentation></api:element-description></api:element><api:element><api:element-name>user</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The unique ID of the user executing the request.</xs:documentation></api:element-description></api:element><api:element><api:element-name>clientAddress</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The network address of a client</xs:documentation></api:element-description></api:element><api:element><api:element-name>triggerDepth</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The maximum depth of trigger invocation.</xs:documentation></api:element-description></api:element><api:element><api:element-name>expandedTreeCacheHits</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The number of hits on the expanded cache.</xs:documentation></api:element-description></api:element><api:element><api:element-name>expandedTreeCacheMisses</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The number of misses on the expanded cache.</xs:documentation></api:element-description></api:element><api:element><api:element-name>requestState</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The state of a request</xs:documentation></api:element-description></api:element><api:element><api:element-name>profilingAllowed</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">Is profiling allowed for this request.</xs:documentation></api:element-description></api:element><api:element><api:element-name>profilingEnabled</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">Is profiling currently enabled for this request.</xs:documentation></api:element-description></api:element><api:element><api:element-name>debuggingAllowed</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">Is debugging allowed for this request.</xs:documentation></api:element-description></api:element><api:element><api:element-name>debuggingStatus</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The debugging status of the request.</xs:documentation></api:element-description></api:element><api:element><api:element-name>retryCount</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The number of retries on the request.</xs:documentation></api:element-description></api:element><api:element><api:element-name>exprId</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">The expression id.</xs:documentation></api:element-description></api:element><api:element><api:element-name>whereStopped</api:element-name><api:element-description><xs:documentation xmlns:xs="http://www.w3.org/2001/XMLSchema">Where the request is stopped.</xs:documentation></api:element-description></api:element></api:schema-info></api:usage><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.requestStatus(xdmp.host(), xdmp.server(), xdmp.request());
=&gt;
{
 "requestId": "9833232389754205407",
 "serverId": "536121115905064034",
 "hostId": "2485368722774099257",
 "transactionId": "6714524514889161071",
 "canceled": false,
 "modules": 0,
 "database": "12466402192567279933",
 "root": "Apps/",
 "requestKind": "invoke",
 "requestText": "/qconsole/endpoints/evaljs.sjs",
 "requestRewrittenText": "/qconsole/endpoints/evaljs.sjs?sid=
	 18127344729549022960&amp;qid=4268464128679030683&amp;crid=
	 9862289152&amp;querytype=javascript&amp;action=eval&amp;cache=1418875622481",
 "update": false,
 "startTime": "2014-12-17T20:07:02.496789-08:00",
 "timeLimit": 600,
 "maxTimeLimit": 3600,
 "user": "7071164303237443533",
 "clientAddress": "172.16.19.129",
 "triggerDepth": 0,
 "expandedTreeCacheHits": 0,
 "expandedTreeCacheMisses": 0,
 "requestState": "running",
 "profilingAllowed": true,
 "profilingEnabled": false,
 "debuggingAllowed": true,
 "debuggingStatus": "detached",
 "retryCount": 0
}

</pre></api:example></api:function></api:function-page>