summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/includes
diff options
context:
space:
mode:
Diffstat (limited to 'admin/WebConsole/includes')
-rw-r--r--admin/WebConsole/includes/restfunctions.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php
index 653fcbf3..4813c010 100644
--- a/admin/WebConsole/includes/restfunctions.php
+++ b/admin/WebConsole/includes/restfunctions.php
@@ -26,6 +26,7 @@ define('OG_REST_CMD_CREATE_INCREMENTAL_IMAGE', 'image/create/incremental');
define('OG_REST_CMD_RESTORE_BASIC_IMAGE', 'image/restore/basic');
define('OG_REST_CMD_RESTORE_INCREMENTAL_IMAGE', 'image/restore/incremental');
define('OG_REST_CMD_RUN_SCHEDULE', 'run/schedule');
+define('OG_REST_CMD_RUN_TASK', 'task/run');
define('OG_REST_PARAM_CLIENTS', 'clients');
define('OG_REST_PARAM_ADDR', 'addr');
@@ -59,6 +60,7 @@ define('OG_REST_PARAM_DIFF_ID', 'diff_id');
define('OG_REST_PARAM_DIFF_NAME', 'diff_name');
define('OG_REST_PARAM_METHOD', 'method');
define('OG_REST_PARAM_ECHO', 'echo');
+define('OG_REST_PARAM_TASK', 'task');
$conf_file = parse_ini_file(__DIR__ . '/../../etc/ogAdmServer.cfg');
define('OG_REST_API_TOKEN', 'Authorization: ' . $conf_file['APITOKEN']);
@@ -544,6 +546,11 @@ function run_schedule($string_ips) {
common_request(OG_REST_CMD_RUN_SCHEDULE, POST, $data);
}
+function run_task($task_id) {
+ $data = array(OG_REST_PARAM_TASK => $task_id);
+ return common_request(OG_REST_CMD_RUN_TASK, POST, $data);
+}
+
/*
* @function multiRequest.
* @param URLs array (may include header and POST data), cURL options array.