Get all Releases in a Project
GET /api/v3/projects/{projectID}/releases
qTest version: 4+
Description: to get all the releases of a project.
Path variable:
- projectId: ID of the project
Request sample:
GET /api/v3/projects/19949/releases HTTP/1.1 Host: linhdang.qtestnet.com Authorization: bearer [token] Content-Type: application/json Cache-Control: no-cache
Response sample:
[ { "links": [ { "rel": "self", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/releases/99278" }, { "rel": "builds", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/releases/99278/builds" }, { "rel": "test-cycles", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/test-cycles?parentId=99278&parentType=release" }, { "rel": "test-suites", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/test-suites?parentId=99278&parentType=release" }, { "rel": "test-runs", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/test-runs?parentId=99278&parentType=release" } ], "id": 99278, "name": "RL 1", "order": 1, "pid": "RL-1", "properties": [ { "field_id": -122, "field_value": "300" }, { "field_id": -125, "field_value": "2016-05-13T08:15:35+00:00" }, { "field_id": -124, "field_value": "2016-05-13T08:15:35+00:00" }, { "field_id": -121 }, { "field_id": -123 } ], "web_url": "https://linhdang.qtestnet.com/p/19949/portal/project#tab=testplan&object=8&id=99278", "start_date": "2016-05-13T15:15:35+07:00", "end_date": "2016-05-13T15:15:35+07:00" } ]
Get all Release Fields
GET /api/v3/projects/{projectId}/settings/releases/fields
qTest version: 4+
Description: To get all active fields of a Release.
Path variable:
- projectId: ID of the project
Request sample:
GET /api/v3/projects/1/settings/releases/fields HTTP/1.1 Host: 192.168.74.69:8486 Authorization: bearer [token] Cache-Control: no-cache
Response sample:
[ { "links": [ { "rel": "self", "href": "http://192.168.74.69:8486/tc/api/v3/projects/1/2131" } ], "id": 2131, "label": "Status", "required": false, "constrained": true, "order": 1, "multiple": false, "searchable": false, "system_field": true, "attribute_type": "Number", "allowed_values": [ { "links": [], "value": 300, "label": "Planned", "order": 1, "is_default": true, "is_active": true }, { "links": [], "value": 301, "label": "In Progress", "order": 2, "is_default": false, "is_active": true }, { "links": [], "value": 302, "label": "Completed", "order": 3, "is_default": false, "is_active": true }, { "links": [], "value": 303, "label": "Closed", "order": 4, "is_default": false, "is_active": true } ], "data_type": 3, "free_text_search": false, "search_key": "stat" }, { "links": [ { "rel": "self", "href": "http://192.168.74.69:8486/tc/api/v3/projects/1/-21" } ], "id": -21, "label": "Start Date", "required": false, "constrained": false, "order": 2, "multiple": false, "searchable": false, "system_field": true, "attribute_type": "DateTime", "data_type": 4, "free_text_search": false }, { "links": [ { "rel": "self", "href": "http://192.168.74.69:8486/tc/api/v3/projects/1/-18" } ], "id": -18, "label": "End Date", "required": false, "constrained": false, "order": 3, "multiple": false, "searchable": false, "system_field": true, "attribute_type": "DateTime", "data_type": 4, "free_text_search": false }, { "links": [ { "rel": "self", "href": "http://192.168.74.69:8486/tc/api/v3/projects/1/-15" } ], "id": -15, "label": "Description", "required": false, "constrained": false, "order": 4, "multiple": false, "searchable": false, "system_field": true, "attribute_type": "LongText", "data_type": 6, "free_text_search": true, "search_key": "des" }, { "links": [ { "rel": "self", "href": "http://192.168.74.69:8486/tc/api/v3/projects/1/-17" } ], "id": -17, "label": "Release Note", "required": false, "constrained": false, "order": 5, "multiple": false, "searchable": false, "system_field": true, "attribute_type": "LongText", "data_type": 6, "free_text_search": true, "search_key": "note" }, { "links": [ { "rel": "self", "href": "http://192.168.74.69:8486/tc/api/v3/projects/1/2276" } ], "id": 2276, "label": "", "required": false, "constrained": false, "order": 6, "multiple": false, "searchable": false, "system_field": false, "attribute_type": "String", "data_type": 1, "free_text_search": false }, { "links": [ { "rel": "self", "href": "http://192.168.74.69:8486/tc/api/v3/projects/1/2444" } ], "id": 2444, "label": "Date", "required": false, "constrained": false, "order": 7, "multiple": false, "searchable": false, "system_field": false, "attribute_type": "DateTime", "data_type": 4, "free_text_search": false }, { "links": [ { "rel": "self", "href": "http://192.168.74.69:8486/tc/api/v3/projects/1/2445" } ], "id": 2445, "label": "Date & Time picker", "required": false, "constrained": false, "order": 8, "multiple": false, "searchable": false, "system_field": false, "attribute_type": "DateTime", "data_type": 9, "free_text_search": false }, { "links": [ { "rel": "self", "href": "http://192.168.74.69:8486/tc/api/v3/projects/1/3266" } ], "id": 3266, "label": "New check Value", "required": false, "constrained": true, "order": 9, "multiple": true, "searchable": false, "system_field": false, "attribute_type": "ArrayNumber", "allowed_values": [ { "links": [], "value": 1, "label": "New Value", "order": 1, "is_default": false, "is_active": true }, { "links": [], "value": 2, "label": "New Value 1", "order": 2, "is_default": false, "is_active": true }, { "links": [], "value": 3, "label": "New Value 2", "order": 3, "is_default": false, "is_active": true }, { "links": [], "value": 4, "label": "New Value 3", "order": 4, "is_default": false, "is_active": true } ], "data_type": 8, "free_text_search": false } ]
Get a Release by its ID
GET /api/v3/projects/{projectId}/releases/{releaseId}
qTest version: 4+
Description: To retrieve a Release's details using its ID.
Path variable:
- projectId: ID of the project
- releaseId: ID of the release which you want to retrieve
Request sample:
GET /api/v3/projects/19949/releases/99278 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/releases/99278" }, { "rel": "builds", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/releases/99278/builds" }, { "rel": "test-cycles", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/test-cycles?parentId=99278&parentType=release" }, { "rel": "test-suites", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/test-suites?parentId=99278&parentType=release" }, { "rel": "test-runs", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/test-runs?parentId=99278&parentType=release" } ], "id": 99278, "name": "RL 1", "order": 1, "pid": "RL-1", "properties": [ { "field_id": -122, "field_value": "300" }, { "field_id": -125, "field_value": "2016-05-13T08:15:35+00:00" }, { "field_id": -124, "field_value": "2016-05-13T08:15:35+00:00" }, { "field_id": -121 }, { "field_id": -123 } ], "web_url": "https://linhdang.qtestnet.com/p/19949/portal/project#tab=testplan&object=8&id=99278", "start_date": "2016-05-13T15:15:35+07:00", "end_date": "2016-05-13T15:15:35+07:00" }
Create a New Release
POST /api/v3/projects/{projectId}/releases
qTest version: 4+
Description: To create a new Release object. Its properties, including the custom fields, are specified in the request body. You will need to use the above API to get the Release's field IDs and use them in this request.
Path variable:
- projectId: ID of the project
Request body:
Attribute Name | Required | Type | Description |
---|---|---|---|
name | True | String | Release name |
properties | False | JSONArray | An array of field-value pairs |
Request sample:
POST /api/v3/projects/19949/releases HTTP/1.1 Host: linhdang.qtestnet.com Authorization: bearer [token] Content-Type: application/json Cache-Control: no-cache { "name":"Release created via API", "properties": [ { "field_id": -125, "field_value": "2016-09-24T00:00:00+07:00" }, { "field_id": -121, "field_value": "This is the description" } ] }
Response sample:
{ "links": [ { "rel": "self", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/releases/111328" }, { "rel": "builds", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/releases/111328/builds" }, { "rel": "test-cycles", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/test-cycles?parentId=111328&parentType=release" }, { "rel": "test-suites", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/test-suites?parentId=111328&parentType=release" }, { "rel": "test-runs", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/test-runs?parentId=111328&parentType=release" } ], "id": 111328, "name": "Release created via API", "order": 2, "pid": "RL-9", "properties": [ { "field_id": -122, "field_value": "300" }, { "field_id": -125, "field_value": "2016-09-23T17:00:00+00:00" }, { "field_id": -124, "field_value": "2016-09-23T17:00:00+00:00" }, { "field_id": -121, "field_value": "This is the description" }, { "field_id": -123 } ], "web_url": "https://linhdang.qtestnet.com/p/19949/portal/project#tab=testplan&object=8&id=111328", "description": "This is the description", "start_date": "2016-09-24T00:00:00+07:00", "end_date": "2016-09-24T00:00:00+07:00" }
Update A Release
PUT /api/v3/projects/{projectId}/releases/{releaseId}
qTest version: 6+
Description: To update properties of an existing Release.
Path variable:
- projectId: ID of the project
- releaseId: ID of the release which needs to be updated
Request body:
Attribute Name | Required | Type | Description |
---|---|---|---|
name | True | String | Release name |
properties | False | JSONArray | An array of field-value pairs |
Request sample:
PUT /api/v3/projects/19949/releases/111328 HTTP/1.1 Host: linhdang.qtestnet.com Authorization: bearer aa121c8a-ab0d-4956-acb8-9281bfc728b0 Content-Type: application/json Cache-Control: no-cache { "name":"Release created via API - Name has been modified", "properties": [ { "field_id": -125, "field_value": "2016-09-24T00:00:00+07:00" }, { "field_id": -121, "field_value": "Description has been modified" } ] }
Response sample:
{ "links": [ { "rel": "self", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/releases/111328" }, { "rel": "builds", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/releases/111328/builds" }, { "rel": "test-cycles", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/test-cycles?parentId=111328&parentType=release" }, { "rel": "test-suites", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/test-suites?parentId=111328&parentType=release" }, { "rel": "test-runs", "href": "https://linhdang.qtestnet.com/api/v3/projects/19949/test-runs?parentId=111328&parentType=release" } ], "id": 111328, "name": "Release created via API - Name has been modified", "order": 2, "pid": "RL-9", "properties": [ { "field_id": -122, "field_value": "300" }, { "field_id": -125, "field_value": "2016-09-23T17:00:00+00:00" }, { "field_id": -124, "field_value": "2016-09-23T17:00:00+00:00" }, { "field_id": -121, "field_value": "Description has been modified" }, { "field_id": -123 } ], "web_url": "https://linhdang.qtestnet.com/p/19949/portal/project#tab=testplan&object=8&id=111328", "description": "Description has been modified", "start_date": "2016-09-24T00:00:00+07:00", "end_date": "2016-09-24T00:00:00+07:00" }
Delete A Release
DELETE /api/v3/projects/{projectId}/releases/{releaseId}
qTest version: 6+
Description: To delete an existing Release.
Path variable:
- projectId: ID of the project
- releaseId: ID of the release which needs to be deleted