Webhob REST API Builds: Difference between revisions
From Yocto Project
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Method !! Endpoint !! Body !! Description !! Comments | |||
|- | |- | ||
| GET || /builds || JSON || Returns page size limited and search criteria filtered amount of builds from the data base || - | |||
|} | |} | ||
Line 18: | Line 14: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! 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 | ||
|- | |- | ||
| | | filter || string || Consists of a string used to filter results || Generic parameter sent from front-end application. If | ||
|} | |} | ||
=== Responses === | === Responses === | ||
If the "limit" parameter has the value 1, the information retrieved from this endpoint consists of a single object (Builds DTO). | |||
==== Build DTO ==== | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 39: | Line 33: | ||
! Name !! Type !! Dimension !! Required !! Default value(s) !! Description !! Comments | ! Name !! Type !! Dimension !! Required !! Default value(s) !! Description !! Comments | ||
|- | |- | ||
| [Object Root] || | | [Object Root] || object || - || YES || - || The object root (will not be literaly be used in the coding). Used only here to describe the container for the actual properties. || - | ||
|- | |- | ||
| [Object Root].<span style="color:#006600">outcome</span> || number || 2 || YES || - || Signals successful or failed build || 0 - the build has failed,<br /> 1 - successful build | | [Object Root].<span style="color:#006600">outcome</span> || number || 2 || YES || - || Signals successful or failed build || 0 - the build has failed,<br /> 1 - successful build | ||
|- | |- | ||
| [Object Root].<span style="color:#006600">target</span> || string || - || YES || - || The name of the build target(s || - | | [Object Root].<span style="color:#006600">target</span> || string || - || YES || - || The name of the build target(s) || - | ||
|- | |- | ||
| [Object Root].<span style="color:#006600">machine</span> || string array || - || YES || - || The selected hardware || - | | [Object Root].<span style="color:#006600">machine</span> || string array || - || YES || - || The selected hardware || - | ||
Line 58: | Line 52: | ||
|- | |- | ||
| [Object Root].<span style="color:#006600">output</span> || string array || - || YES || - || The extensions of the root file systems produced by the build || - | | [Object Root].<span style="color:#006600">output</span> || string array || - || YES || - || The extensions of the root file systems produced by the build || - | ||
|} | |||
==== Returning Multiple Builds ==== | |||
If the "limit" parameter is greater than 1 then the information retrieved from this endpoint consists of an object that has two properties: count (the total amount of items for pagination purposes)and the actual list of builds (objects with same structure as the Build DTO explained earlier). | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type !! Dimension !! Required !! Default value(s) !! Description !! Comments | |||
|- | |||
| [Object Root] || object || - || YES || - || The object root (will not be literaly be used in the coding). Used only here to describe the container for the actual properties. || - | |||
|- | |||
| [Object Root].<span style="color:#006600">count</span> || number || - || YES || - || Total amount of builds || - | |||
|- | |||
| [Object Root].<span style="color:#006600">list</span> || object(Build DTO) array || - || YES || - || The list of Build DTOs within the given limit || Reffer to Build DTO for object description | |||
|} | |} |
Revision as of 11:02, 22 July 2013
Endpoints
Method | Endpoint | Body | Description | Comments |
---|---|---|---|---|
GET | /builds | 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 |
filter | string | Consists of a string used to filter results | Generic parameter sent from front-end application. If |
Responses
If the "limit" parameter has the value 1, the information retrieved from this endpoint consists of a single object (Builds DTO).
Build DTO
Name | Type | Dimension | Required | Default value(s) | Description | Comments |
---|---|---|---|---|---|---|
[Object Root] | object | - | YES | - | The object root (will not be literaly be used in the coding). Used only here to describe the container for the actual properties. | - |
[Object Root].outcome | number | 2 | YES | - | Signals successful or failed build | 0 - the build has failed, 1 - successful build |
[Object Root].target | string | - | YES | - | The name of the build target(s) | - |
[Object Root].machine | string array | - | YES | - | The selected hardware | - |
[Object Root].startedOn | number representation of date | - | YES | - | Marks the moment the process is started | - |
[Object Root].completedOn | number representation of date | - | YES | - | Marks the moment the process is completed | - |
[Object Root].errors | number | - | YES | - | Number of errors thrown by the build | - |
[Object Root].warnings | number | - | YES | - | Number of warnings thrown by the build | - |
[Object Root].log | string | - | YES | - | Path to log file | - |
[Object Root].output | string array | - | YES | - | The extensions of the root file systems produced by the build | - |
Returning Multiple Builds
If the "limit" parameter is greater than 1 then the information retrieved from this endpoint consists of an object that has two properties: count (the total amount of items for pagination purposes)and the actual list of builds (objects with same structure as the Build DTO explained earlier).
Name | Type | Dimension | Required | Default value(s) | Description | Comments |
---|---|---|---|---|---|---|
[Object Root] | object | - | YES | - | The object root (will not be literaly be used in the coding). Used only here to describe the container for the actual properties. | - |
[Object Root].count | number | - | YES | - | Total amount of builds | - |
[Object Root].list | object(Build DTO) array | - | YES | - | The list of Build DTOs within the given limit | Reffer to Build DTO for object description |