Run Task Now
Service name: task_run_now
Base URL
https://{SERVER}/api/?apikey={yourAPIkey}&service=task_run_now
Description
Set an Automated Task to run now and return the time until the task starts.
Parameters
Required parameters
Add required parameters immediately after the base URL.
https://{SERVER}/api/?apikey={yourAPIkey}&service=task_run_now&required_parameters={parameter-value}
| Parameter | Description | Type | Options | Default | 
|---|---|---|---|---|
| checkid | The identifier for the Automated Task. | number | 0 | 0 | 
Optional parameters
Add optional parameters after the required parameters in the base URL.
https://{SERVER}/api/?apikey={yourAPIkey}&service=task_run_now&required_parameters={parameter-value}&optional_parameters={parameter-value}
| Parameter | Description | Type | Options | Default | 
|---|---|---|---|---|
| describe | Optional. Returns a description of the entered call, the available parameters, an example of its output, and returned fields with descriptions. | boolean | true | 0 | 
Determine parameter values
Use the following associated service calls to determine parameter values.
| Parameter | Call | URL Format | 
|---|---|---|
| checkid | list_checks | https://{SERVER}/api/?apikey={yourAPIkey}&service=list_checks&deviceid=DEVICEID | 
| deviceid | list_devices_at_client | https://{SERVER}/api/?apikey={yourAPIkey}&service=list_devices_at_client&clientid=CLIENTID&devicetype=server | 
| list_servers | https://SERVER/api/?apikey=yourAPIkey&service=list_servers&siteid=SITEID | |
| list_workstations | https://SERVER/api/?apikey=yourAPIkey&service=list_workstations&siteid=SITEID | |
| siteid | list_sites | https://SERVER/api/?apikey=yourAPIkey&service=list_sites&clientid=CLIENTID | 
| clientid | list_clients | https://SERVER/api/?apikey=yourAPIkey&service=list_clients | 
Examples
Run a specified automated task now
https://{SERVER}/api/?apikey={yourAPIkey}&service=task_run_now&checkid=CHECKID
Example response
<?xml version="1.0" ?> 
	<result created="2012-04-26T18:30:04+01:00" host="SERVER" status="OK"> 
	<message time="15">15 minutes</message> 
	</result>Returned fields
| Field | Type | Can Be Empty | Description | 
|---|---|---|---|
| @time | string | no | Number of minutes until Automated Task runs. | 
| message | string | no | Textual representation of time until Automated Task run. | 
Updated 3 months ago