Webhob REST API Tasks

Category:REST API Contracts
=== Endpoints ===
Method	Endpoint	Body	Description 	Comments
GET 	/tasks 	JSON	Returns page size limited and search criteria filtered amount of builds from the data base	-
=== Parameters ===
Name 	Type 	Description 	Comments
limit 	number	The amout of builds to be displayed in one page 	-
offset 	number	Represents the position of the first record in the page 	If limit is 1, end point will target the findOne functionality and the offset will act as the actual build id
search 	string	Search string for all fields 	-
filter 	string	Consists of a string used to filter results 	The general form: "<FIELD>:<VALUE>".
orderby	string	the name of the field that determens the soring of the resuls.	"<FIELD>:<ORDER_DIRECTION>"
=== Response ===
Name 	Type 	Dimension	Required	Default value(s)	Description 	Comments
[Object Root] 	object 	- 	YES 	- 	- 	-
[Object Root].count 	number 	- 	YES 	- 	Total amount of builds to be displayed (according to filter parameter)	-
[Object Root].list 	object array	- 	YES 	- 	- 	To describe a generic object element of the array, the refference to it's root is "list[]"
[Object Root].list[].pk 	number 	- 	YES 	- 	- 	-
[Object Root].list[].model 	string 	- 	YES 	- 	- 	-
[Object Root].list[].fields 	object 	- 	YES 	- 	- 	-
[Object Root].list[].fields.build 	number 	2 	YES 	- 	Primary key for builds table 	-
[Object Root].list[].fields.cpu_usage 	number 	- 	YES 	- 	Utilisation (%) as collected by buildstats 	-
[Object Root].list[].fields.disk_io 	number 	- 	YES 	- 	Number of ms spent doing I/Os 	-
[Object Root].list[].fields.elapsed_time 	string 	- 	YES 	- 	How long it took for the task to complete. 	-
[Object Root].list[].fields.line_number 	number 	- 	YES 	- 	The starting line in the file that applies to the task 	-
[Object Root].list[].fields.order 	number 	- 	YES 	- 	Shows the order of execution 	-
[Object Root].list[].fields.outcome 	number 	- 	YES 	- 	Identifies the result of a task. 	OUTCOME_SUCCESS = 0OUTCOME_COVERED = 1OUTCOME_SSTATE = 2OUTCOME_EXISTING = 3OUTCOME_FAILED = 4OUTCOME_NA = 5
[Object Root].list[].fields.path_to_sstate_obj	File Path 	- 	YES 	- 	Shows the path BitBake searched for files for a certain task 	-
[Object Root].list[].fields.py_stack_trace 	string 	- 	YES 	- 	The Python stack trace 	-
[Object Root].list[].fields.script_type 	number 	- 	YES 	- 	This item specifies if it is a Python task or a shell task 	CODING_PYTHON = 0CODING_SHELL = 1
[Object Root].list[].fields.source_url 	File Path 	- 	YES 	- 	The path to the sstate object 	-
[Object Root].list[].fields.sstate_checksum 	string 	- 	YES 	- 	Signature of a task's inputs to support incremental builds 	-
[Object Root].list[].fields.sstate_result 	number 	- 	YES 	- 	We'll use this to generate information for the task history 	SSTATE_NA = 0SSTATE_MISS = 1SSTATE_FAILED = 2SSTATE_RESTORED = 3
[Object Root].list[].fields.task_executed 	boolean 	- 	YES 	- 	Identifies if a task was executed or not 	true means Executed, false means Prebuilt
[Object Root].list[].fields.task_name 	string 	- 	YES 	- 	The task name 	-
[Object Root].list[].fields.message 	string 	- 	YES 	- 	Message returned by task 	-
[Object Root].list[].fields.logfile 	File Path 	- 	YES 	- 	Log for the task 	-
[Object Root].list[].fields.work_directory 	File Path 	- 	YES 	- 	The WORKDIR for the recipe to which the task applies 	-
[Object Root].list[].fields.recipe 	number 	- 	YES 	- 	Primary key for the Recipes model of which the task belongs to 	-