update_job

The update_job function is used to create, edit, or delete jobs.

Copied!
svc=resource/update_job&params={"itemId":<long>,
								"id":<long>,
								"callMode":"<text>",
								"n":"<text>",
								"d":"<text>",
								"r":"<text>",
								"at":<uint>,
								"m":<uint>,
								"fl":<uint>, /* Not required for job creation, editing, and deletion. Used for test execution. Default: 0 */
								"tz":<int>,
								"l":"<text>",
								"e":<bool>,
								"sch":{
									"f1":<uint>,
									"f2":<uint>,
									"t1":<uint>,
									"t2":<uint>,
									"m":<uint>,
									"y":<uint>,
									"w":<uint>
								},					
								"act":{	
									"t":"<text>",
									"p":{
										"<text>":"<text>",
										...
									}					
								}}

Parameters

NameDescription
itemIdResource ID.
idJob ID (0 — create).
callMode

Action: create, update, delete.

Other parameters are only required for creating and updating. See the get_job_data page.

Returned result

For creation and modification requests:

Copied!
[
	<long>,		/* job ID */
	{
		"id":<long>,	/* job ID */
		"n":"<text>",	/* name */
		"d":"<text>",	/* description */
		"m":<uint>,	/* maximum executions count, 0 — unlimited */
		"fl":<uint>,	/* delete job after maximum executions count, 1 — yes. Not required for job creation, editing, and deletion. Used for test execution. */
		"st":{		/* state */
			"e":<uint>,	/* enabled/disabled */
			"c":<uint>,	/* executions count */
			"l":<uint>	/* last execution time */
		},
		"act":"<text>",	/* action */
		"ct":<uint>,    /* creation time */  
		"mt":<uint>     /* last modification time */
	}
]

All the possible action types are described here.

For deletion requests:

Copied!
[
	<long>,		/* job ID */
	null
]

Possible error codes:

CodeDescription
7Failed to fetch the resource with the desired ACL (ADF_ACL_AVL_RES_EDIT_JOBS).
6Undefined error.
4

Wrong input parameters.

Download PDF file
Download Word document

See also