From 6efbf5871efc7e03918ea976993064763c0a4dd3 Mon Sep 17 00:00:00 2001 From: Mrt134 Date: Thu, 8 Dec 2016 09:55:21 -0500 Subject: [PATCH] API reference guide addition: - Added missing "run" action to dispatcher class. --- docs/api_reference/classes/dispatcher.rst | 55 +++++++++++++++++++++-- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/docs/api_reference/classes/dispatcher.rst b/docs/api_reference/classes/dispatcher.rst index 6afb3b8..0a7027c 100644 --- a/docs/api_reference/classes/dispatcher.rst +++ b/docs/api_reference/classes/dispatcher.rst @@ -21,15 +21,14 @@ Every dispatcher class request contains several parameters: | namespace | rpc | | | | | | +---------------+------------+--------------------------------------+ -| action | | Actions include "list" and "kill". | -| | | | +| action | | Actions include "list", "kill", and | +| | | "run". | +---------------+------------+--------------------------------------+ The rest of this section provides examples of the available *actions* for each type of request, along with their responses. .. index:: list, dispatcher - .. _List Processes: List Processes @@ -131,4 +130,52 @@ running jobs within the dispatcher system. "id": "fooid", "name": "response", "namespace": "rpc" - } \ No newline at end of file + } + +.. index:: run, dispatcher +.. _Run Processes: + +Run Process(es) +=============== + +The "run" action allows a user with full access to create new jobs +within the dispatcher system. + +**REST Request** + +:: + + PUT /rpc/dispatcher + { + "action" : "run", + "job_id" : "", + "multi_job_id" : ["", "", ""] + } + +**WebSocket Request** + +.. code-block:: json + + { + "args" : { + "action" : "run", + "job_id" : "", + "multi_job_id" : ["", "", ""] + }, + "namespace" : "rpc", + "name" : "dispatcher", + "id" : "fooid" + } + +**Response** + +.. code-block:: json + + { + "args": { + "started": ["job_id", "multi-job_id"] + }, + "id": "fooid", + "name": "response", + "namespace": "rpc" + }