From 85ffdab597e2eef2927d2c42501d1289a8064bc3 Mon Sep 17 00:00:00 2001 From: dlavigne Date: Fri, 29 Apr 2016 11:03:52 -0400 Subject: [PATCH] Doc kill action. --- api/classes/dispatcher.rst | 50 +++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/api/classes/dispatcher.rst b/api/classes/dispatcher.rst index f21d1bd..82fea92 100644 --- a/api/classes/dispatcher.rst +++ b/api/classes/dispatcher.rst @@ -20,7 +20,7 @@ Every dispatcher class request contains the following parameters: | namespace | rpc | | | | | | +---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+ -| action | | supported actions include "list" | +| action | | supported actions include "list", "kill" | | | | | +---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+ @@ -78,4 +78,52 @@ The "list" action lists all the currently running or pending processes within th "id": "fooid", "name": "response", "namespace": "rpc" + } + +.. index:: kill, dispatcher + +.. _Kill Processes: + +Kill Processes +============== + +The "kill" action allows a user with full access to cancel pending or running jobs within the dispatcher system. + +**REST Request** + +.. code-block:: json + + PUT /rpc/dispatcher + { + "action" : "kill", + "job_id" : "sysadm_pkg_install-{9c079421-ace9-4b6e-8870-d023b48f4c49}" + } + +**WebSocket Request** + +.. code-block:: json + + { + "args" : { + "action" : "kill", + "job_id" : "sysadm_pkg_install-{9c079421-ace9-4b6e-8870-d023b48f4c49}" + }, + "namespace" : "rpc", + "name" : "dispatcher", + "id" : "fooid" + } + +**Response** + +.. code-block:: json + + { + "args": { + "killed": { + "jobs": ["sysadm_pkg_install-{9c079421-ace9-4b6e-8870-d023b48f4c49}"] + } + }, + "id": "fooid", + "name": "response", + "namespace": "rpc" } \ No newline at end of file