Get All Build Fields
GET /api/v3/projects/{projectId}/settings/builds/fields
qTest version: 4+
Description: To get all active fields of a build.
Path variable:
- projectId: ID of the project
Request sample:
GET /api/v3/projects/19949/settings/builds/fields HTTP/1.1 Host: linhdang.qtestnet.com Authorization: bearer [token] Cache-Control: no-cache
Response sample:
[ { "links": [ { "rel": "self", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/-65" } ], "id": -65, "attribute_type": "Number", "label": "Status", "required": false, "constrained": true, "order": 1, "allowed_values": [ { "links": [], "value": 400, "label": "Planned", "order": 1, "is_default": true, "is_active": true }, { "links": [], "value": 401, "label": "In Progress", "order": 2, "is_default": false, "is_active": true }, { "links": [], "value": 402, "label": "Completed", "order": 3, "is_default": false, "is_active": true }, { "links": [], "value": 403, "label": "Closed", "order": 4, "is_default": false, "is_active": true } ], "multiple": false, "data_type": 3, "searchable": false, "free_text_search": false, "search_key": "stat", "system_field": true, "original_name": "Status", "is_active": true }, { "links": [ { "rel": "self", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/-66" } ], "id": -66, "attribute_type": "Date", "label": "Build Date", "required": false, "constrained": false, "order": 2, "multiple": false, "data_type": 4, "searchable": false, "free_text_search": false, "system_field": true, "original_name": "Build Date", "is_active": true }, { "links": [ { "rel": "self", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/-67" } ], "id": -67, "attribute_type": "LongText", "label": "Build Note", "required": false, "constrained": false, "order": 3, "multiple": false, "data_type": 6, "searchable": false, "free_text_search": true, "search_key": "note", "system_field": true, "original_name": "Note", "is_active": true } ]
Get All Builds Of A Release
GET /api/v3/projects/{projectId}/builds
qTest version: 6+
Description: To retrieve all builds under a release
Path variable:
- projectId: ID of the project
Request Parameter:
Parameter | Required | Description |
releaseId | yes | ID of the release which contains the retrieved builds |
Request sample:
GET /api/v3/projects/5714/builds?releaseId=62218 HTTP/1.1 Host: linhdang.qtestnet.com Authorization: bearer [token] Cache-Control: no-cache
Response sample:
[ { "links": [ { "rel": "self", "href": "https://linhdang.qtestnet.com/api/v3/projects/5714/builds/131516" } ], "id": 131516, "name": "Build 1.0", "order": 0, "pid": "BL-29", "properties": [ { "field_id": -65, "field_value": "403" }, { "field_id": -66, "field_value": "2014-08-26T00:00:00+00:00" }, { "field_id": -67, "field_value": "Build 1.0 of Release 1" } ] }, { "links": [ { "rel": "self", "href": "https://linhdang.qtestnet.com/api/v3/projects/5714/builds/131517" } ], "id": 131517, "name": "Build 1.1", "order": 1, "pid": "BL-30", "properties": [ { "field_id": -65, "field_value": "403" }, { "field_id": -66, "field_value": "2014-09-25T00:00:00+00:00" }, { "field_id": -67, "field_value": "Build 1.1 of Release 1" } ] }, { "links": [ { "rel": "self", "href": "https://linhdang.qtestnet.com/api/v3/projects/5714/builds/131518" } ], "id": 131518, "name": "Build 1.2", "order": 2, "pid": "BL-31", "properties": [ { "field_id": -65, "field_value": "403" }, { "field_id": -66, "field_value": "2014-10-15T00:00:00+00:00" }, { "field_id": -67, "field_value": "Build 1.2 of Release 1" } ] } ]
Get A Build By Its ID
GET /api/v3/projects/{projectId}/builds/{buildId}
qTest version: 6+
Description: To retrieve a Build's details using its ID.
Path variable:
- projectId: ID of the project
- buildId: ID of the build which you want to retrieve
Request sample:
GET /api/v3/projects/5714/builds/131516 HTTP/1.1 Host: linhdang.qtestnet.com Authorization: bearer [token] Cache-Control: no-cache
Response sample:
{ "links": [ { "rel": "self", "href": "https://linhdang.qtestnet.com/api/v3/projects/5714/builds/131516" } ], "id": 131516, "name": "Build 1.0", "order": 0, "pid": "BL-29", "properties": [ { "field_id": -65, "field_value": "403" }, { "field_id": -66, "field_value": "2014-08-26T00:00:00+00:00" }, { "field_id": -67, "field_value": "Build 1.0 of Release 1" } ] }
Create A New Build
POST /api/v3/projects/{projectId}/builds
qTest version: 4+
Description: To create a new build. You will need to specify the release which contains this build in the JSON body of the request.
Path variable:
- projectId: ID of the project
Request body:
Attribute Name | Required | Type | Description |
---|---|---|---|
name | True | String | Build name |
release | True | JSON object | Specify the release Id in which the build will be located |
properties | False | JSONArray | An array of field-value pairs |
Request sample:
POST /api/v3/projects/1/builds HTTP/1.1
Host: localhost:8080
Authorization: --
Content-Type: application/json
Cache-Control: no-cache
{
"name": "Build from API 3",
"release": { "id": 1 },
"properties":
[
{
"field_id": -5,
"field_value": 401
},
{
"field_id": -1,
"field_value": "2014-01-31T00:00:00+00:00"
},
{
"field_id": -4,
"field_value": "Build Note"
},
{
"field_id": 725,
"field_value": "text box value by user"
},
{
"field_id": 726,
"field_value": 2
}
]
}
Response sample:
{ "links": [ { "rel": "self", "href": "http://localhost:8080/api/v3/projects/1/builds/219" } ], "id": 219, "name": "Build from API 3", "order": 3, "pid": "BL-29", "properties": [ { "field_id": -5, "field_value": "401" }, { "field_id": -1, "field_value": "2014-01-30T14:00:00+00:00" }, { "field_id": -4, "field_value": "Build Note" }, { "field_id": 725, "field_value": "text box value by user" }, { "field_id": 726, "field_value": "2" }, { "field_id": 727, "field_value": "2014-12-02T04:38:06+00:00" }, { "field_id": 728, "field_value": "8" }, { "field_id": 729, "field_value": "100.0" } ] }
Update A Build
PUT /api/v3/projects/{projectId}/builds/{buildId}
qTest version: 6+
Description: To update properties of an existing Build.
Path variable:
- projectId: ID of the project
- buildId: ID of the build which needs to be updated
Request body:
Attribute Name | Required | Type | Description |
---|---|---|---|
name | True | String | Build name |
properties | False | JSONArray | An array of field-value pairs |
Request sample:
PUT /api/v3/projects/19949/builds/186989 HTTP/1.1 Host: linhdang.qtestnet.com Authorization: bearer [token] Content-Type: application/json Cache-Control: no-cache { "name": "Build created via API - Name has been modified", "properties":[ { "field_id": -66, "field_value": "2017-01-31T00:00:00+00:00" } ] }
Response sample:
{ "links": [ { "rel": "self", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/builds/186989" } ], "id": 186989, "name": "Build created via API - Name has been modified", "order": 1, "pid": "BL-2", "properties": [ { "field_id": -65, "field_value": "400" }, { "field_id": -66, "field_value": "2017-01-31T00:00:00+00:00" }, { "field_id": -67 } ] }
Delete A Build
DELETE /api/v3/projects/{projectId}/builds/{buildId}
qTest version: 6+
Description: To delete an existing build.
Path variable:
- projectId: ID of the project
- buildId: ID of the build which needs to be deleted