Loading TOC...

xdmp:request-cancel

xdmp:request-cancel(
   hostID as xs:unsignedLong,
   serverID as xs:unsignedLong,
   requestID as xs:unsignedLong
) as empty-sequence()

Summary

Cancel the request with the given host, server, and request IDs.

Parameters
hostID The ID of the host on which the request is running. Typically, you get the ID of a host by executing code similar to:
    xdmp:host("myhost")
serverID The ID of the App Server in which the request is running. Typically, you get the ID of an App Server by executing code similar to:
    xdmp:server("myAppServerName")
requestID The ID of the request. You can access the request IDs in the request elements of the xdmp:server-status output. You get the request ID by executing code similar to:
    declare namespace status=
        "http://marklogic.com/xdmp/status/server"

    xdmp:server-status( xdmp:host("myhost"),
      xdmp:server("myAppServerName") )//status:request
      

Required Privileges

http://marklogic.com/xdmp/privileges/cancel-any-request or http://marklogic.com/xdmp/privileges/cancel-my-requests

Usage Notes

To find out the status of the request after it has been canceled, you can call xdmp:server-status, which has information about each request active or being canceled on the server. Once a request has completed canceling, it will no longer appear in the output of xdmp:server-status.

Example

xdmp:request-cancel(xdmp:host("myhost"),
                      xdmp:server("myAppServerName"),
                      98394839084390843)
=> ()

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