Webhob REST API Tasks: Difference between revisions
From Yocto Project
				
				
				Jump to navigationJump to search
				
				No edit summary  | 
				|||
| (One intermediate revision by the same user not shown) | |||
| Line 45: | Line 45: | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span> || object || - || YES || - || - || -  | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span> || object || - || YES || - || - || -  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">build</span> || number || 2 || YES || - ||   | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">build</span> || number || 2 || YES || - || Primary key for builds table || -  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">cpu_usage</span> ||   | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">cpu_usage</span> || number || - || YES || - || Utilisation (%) as collected by buildstats || -  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">disk_io</span> ||   | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">disk_io</span> || number || - || YES || - || Number of ms spent doing I/Os || -  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">elapsed_time</span> ||   | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">elapsed_time</span> || string || - || YES || - ||  How long it took for the task to complete. || -  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">line_number</span> || number || - || YES || - ||   | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">line_number</span> || number || - || YES || - || The starting line in the file that applies to the task || -  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">  | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">order</span> || number || - || YES || - || Shows the order of execution || -  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">  | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">outcome</span> || number || - || YES || - || Identifies the result of a task. || OUTCOME_SUCCESS = 0<br />OUTCOME_COVERED = 1<br />OUTCOME_SSTATE = 2<br />OUTCOME_EXISTING = 3<br />OUTCOME_FAILED = 4<br />OUTCOME_NA = 5<br />  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">  | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">path_to_sstate_obj</span> || File Path || - || YES || - || Shows the path BitBake searched for files for a certain task || -  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">  | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">py_stack_trace</span> || string || - || YES || - || The Python stack trace || -  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">  | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">script_type</span> || number || - || YES || - || This item specifies if it is a Python task or a shell task || CODING_PYTHON = 0<br />CODING_SHELL = 1  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">  | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">source_url</span> || File Path || - || YES || - || The path to the sstate object || -  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">  | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">sstate_checksum</span> || string || - || YES || - || Signature of a task's inputs to support incremental builds || -  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">  | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">sstate_result</span> || number || - || YES || - || We'll use this to generate information for the task history || SSTATE_NA = 0<br />SSTATE_MISS = 1<br />SSTATE_FAILED = 2<br />SSTATE_RESTORED = 3<br />  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">  | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">task_executed</span> || boolean || - || YES || - || Identifies if a task was executed or not || true means Executed, false means Prebuilt  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">  | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">task_name</span> || string || - || YES || - || The task name || -  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">  | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">message</span> || string || - || YES || - || Message returned by task || -  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">  | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">logfile</span> || File Path || - || YES || - || Log for the task || -  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">  | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">work_directory</span> || File Path || - || YES || - || The WORKDIR for the recipe to which the task applies || -  | ||
|-  | |-  | ||
| [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">  | | [Object Root].<span style="color:#FF9900">list[]</span>.<span style="color:#0066FF">fields</span>.<span style="color:#006600">recipe</span> || number || - || YES || - || Primary key for the Recipes model of which the task belongs to || -  | ||
|}  | |}  | ||
Latest revision as of 13:25, 2 August 2013
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 = 0 OUTCOME_COVERED = 1 OUTCOME_SSTATE = 2 OUTCOME_EXISTING = 3 OUTCOME_FAILED = 4 OUTCOME_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 = 0 CODING_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 = 0 SSTATE_MISS = 1 SSTATE_FAILED = 2 SSTATE_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 | - |