Command disabled: backlink

Jobs: detailed information

To get detailed information about specified jobs, use the command resource/get_job_data:

svc=resource/get_job_data&params={"itemId":<long>,
				  "col":[<long>]}

Parameters

Name Description
itemId resource ID
col array of jobs IDs

Response

[
	{
		"id":<long>,	/* job ID */
		"n":<text>,	/* name */
		"d":<text>,	/* description */
		"r":<text>,	/* execution type (see below) */
		"at":<uint>,	/* activation time */
		"m":<uint>,	/* maximal executions count, 0 - unlimited */
                "fl":<uint>,	/* delete job after maximal executions count, 1 - yes */ 
		"tz":<int>,	/* timezone (sec) */
		"l":<text>,	/* language used for job */
		"st":{		/* state */
			"e":<int>,	/* enabled/disabled */
			"c":<uint>,	/* executions count */
			"l":<uint>	/* time of last execution */
		},
		"sch":{		/* time limitation */
			"f1":<uint>,	/* beginning of interval 1 */
			"f2":<uint>,	/* beginning of interval 2 */
			"t1":<uint>,	/* ending of interval 1 */
			"t2":<uint>,	/* ending of interval 2 */
			"m":<uint>,	/* days of month mask */
			"y":<uint>,	/* months mask */
			"w":<uint>	/* days of week mask */
		},
		"act":{		/* actions (list of actions see below) */
			"t":<text>,	/* type */
			"p":{		/* parameters */
				<text>:<text>,	/* name: value */
				...
			}
		},
		"ct":<uint>,    /* creation time */  
		"mt":<uint>     /* last modification time */
	}
]

Execution can be either of two types: form a detailed list of execution times or set an interval between executions. If you choose the first option (exact schedule), the format of r field should be “1 …” (after 1 you indicate execution time and if there are several, separate them by space). Time format can be either “hours:minutes” or just “hours”. If you choose the second option (constant interval between executions), the format of r field should be “1 …” (after 2 indicate time interval in Unix format).

Action types

Execute a command over unit(s)

"act":{
	"t":"exec_unit_cmd",		/* action type */
	"p":{
		"cmd_name":<text>,	/* command name */
		"cmd_type":<text>,	/* command type */
		"cmd_param":<text>,	/* command parameter */
		"link_type":<text>,	/* link type */
		"timeout":<text>,	/* during this time system will try to execute command, sec */
		"units":<text>		/* list of units/unit groups ID's (comma-separated) */
	}
}

:!: You can see list of avalible command type here List of available commands

GPRS traffic accounting

"act":{
	"t":"reset_unit_bytes_counter",	/* action type */
	"p":{
		"reset_bytes":<text>,	/* reset counter value (1 - yes, 2 - no) */
		"store_bytes":<text>,	/* store counter value in unit log (1 - yes, 0 - no) */
		"units":<text>		/* list of units/unit groups ID's (comma-separated) */
	}
}

Change access to units

"act":{
	"t":"change_access_user",	/* action type */
	"p":{
		"acl_bits":<text>,	/* 1 - set bit, 0 - remove bit */
		"acl_mask":<text>,	/* mask of bits which must be changed */
		"units":<text>,		/* list of units/unit groups ID's (comma-separated) */
		"users":<text>		/* list of users IDs (comma-separated) */
	}
}

Mileage accounting

"act":{
	"t":"reset_unit_mileage_counter",	/* action type */
	"p":{
		"param_name":<text>,		/* parameter name, if empty - don't save counter value as parameter for unit data messages */
		"skip_reset":<text>,		/* set new value for mileage counter (0 - yes, 1 - no) */
		"store_mileage":<text>,		/* store counter value in unit log */
		"units":<text>,			/* list of units/unit groups ID's (comma-separated) */
		"value_mileage":<text>		/* new value of mileage counter (meters) */
	}
}

Engine hours accounting

"act":{
	"t":"reset_unit_engine_hours_counter",	/* action type */
	"p":{
		"param_name":<text>,		/* parameter name, if empty - don't save counter value as parameter for unit data messages */
		"skip_reset":<text>,		/* set new value of engine hours counter (0 - yes, 1 - no) */
		"store_eh":<text>,		/* store counter value in unit log */
		"units":<text>,			/* list of units/unit groups ID's (comma-separated) */
		"value_eh":<text>		/* new value of engine hours counter (seconds) */
	}
}

Send fuel information by e-mail or SMS

"act":{
	"t":"send_email_sms_fuel",	/* action type */
	"p":{
		"email_to":<text>,	/* comma-separated e-mail addresses */
		"flags":<text>,		/* flags (see below) */
		"phone_to":<text>,	/* phone numbers */
		"time_offset":<text>,	/* time offset, min */
		"units":<text>		/* list of units/unit groups ID's (comma-separated) */
	}
}

Flags:

Value Description
0x01 Separate message for each unit
0x02 All units in one message
0x04 Event type: Filling
0x08 Event type: Theft
0x10 Event type: Fuel level
0x20 Method of delivery: e-mail
0x40 Method of delivery: SMS

Send a report by e-mail

"act":{
	"t":"send_email_report",	/* action type */
	"p":{
		"email_to":<text>,	/* comma-separeted e-mail addresses */
		"file_type":<text>,	/* file format */
		"flags":<text>,		/* interval flags */
		"params":<text>,	/* report configuration (xml) */
		"report_guid":<text>,	/* resource ID */
		"report_id":<text>,	/* report template ID */
		"report_objects":<text>,/* list of comma-separated units IDs */
		"time_from":<text>,	/* beginning of time interval */
		"time_to":<text>	/* ending of time interval */
	}
}

Interval flags are described in the chapter Reports: Execute report.

File formats (zip archive content):

  • 1 - html;
  • 2 - pdf;
  • 4 - xls;
  • 8 - xlsx;
  • 16 - xml;
  • 32 - csv.
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2024 Gurtam