Back to QMetry All Products Help Page
API for Requirement
- 1 Get Requirement list along with Custom Fields
- 2 Get Details of a Requirement
- 3 List Requirement version detail
- 4 List Requirements for Bulk Operation
- 5 Fetch Requirement List For Issue
- 6 Get List of Requirements while Linking to a Test suite
- 7 Fetch Requirement List For Test Case
- 8 View Requirement Details
- 9 View Requirement's Version Information
- 10 Create Requirement
- 11 Update Requirement
- 12 Archive Requirement
- 13 Delete Requirement
- 14 Delete Requirement Version
- 15 List Requirement Folders for selected folder
- 16 Create Requirement Folder
- 17 Archive Requirement Folder
- 18 Unarchive Requirement Folder
- 19 Update Requirement Folder
- 20 Delete Requirement Folder
- 21 Get List of Testcase in Requirement
- 22 Link Test Cases to Requirement
- 23 Unlink Testcase from Requirement
- 24 Link Issues to Requirement
- 25 Unlink Issue from Requirement
- 26 View Release & Cycle of Requirement
- 27 Add Release & Cycle Requirement
- 28 Remove Release & Cycle from Requirement
- 29 Get List of Users for Project
- 30 Get BDD Branch List
- 31 Pull File from Repository
- 32 Push File to Repository
- 33 Update Requirements with BDD data
- 34 Get BDD Folder Tree
Get Requirement list along with Custom Fields
POST /rest/requirements/list/viewColumns
Description
Fetch data of Requirements along with custom fields. Returns data from latest version.
Request
Content-Type: application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
viewId | body | yes | View ID of the user for that particular project and Requirement module. View ID can be fetched from latestViews section of Getinfo API. | - | integer |
folderPath | body | yes | Path of folder whose Requirements are to be fetched | - | string |
start | body | no | Start index of records | - | integer |
limit | body | no | Number of records per page | - | integer |
page | body | no | Page number to be displayed | - | integer |
Response
Content-Type: application/json
Status Code | Reason | Response Model |
---|---|---|
200 | Requirement list fetched successfully | |
400 | Invalid json object or mandatory fields missing | - |
401 | Unauthorised or session expired | - |
500 | Returned when server connection times out | - |
Get Details of a Requirement
POST /rest/requirements/list
Description
Get details of a requirement by providing ID of requirement, requirement version ID or requirement folder.
Request
Content-Type: application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
start | body | no | Start index of records | - | integer |
limit | body | no | Number of records per page | - | integer |
page | body | no | Page number to be displayed | - | integer |
id | body | yes | Id of Requirement | - | integer |
filter | body | no | Filter to be applied | - | string |
Response
Content-Type:application/json
Status Code | Reason | Response Model |
---|---|---|
200 | Requirement list fetch successfully | ResponseEntityString |
400 | Invalid json object or mandatory fields missing | - |
401 | Unauthorised or session expired | - |
500 | Returned when server connection times out | - |
List Requirement version detail
POST /rest/requirements/getVersionDetail
Request
Content-Type: application/json
Parameters
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
rqID | body | yes | Id of Requirement | - | integer |
start | body | no | Start index of records | - | integer |
limit | body | no | Number of records per page | - | integer |
page | body | no | Page number to be displayed | - | integer |
Response
Content-Type: application/json
Status Code | Reason | Response Model |
---|---|---|
200 | Requirement version detail list fetch successfully. | |
400 | Invalid json object or mandatory fields missing | - |
401 | Unauthorised or session expired | - |
500 | Returned when server connection times out | - |
List Requirements for Bulk Operation
POST /rest/requirements/listForBulkOperation
Request
Content-Type: application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
folderPath | body | yes | FolderPath of folder whose requirements are to be listed | - | string |
start | body | no | Start index of records | - | integer |
limit | body | no | Number of records per page | - | integer |
page | body | no | Page number to be displayed | - | integer |
filter | body | no | Filters to apply | - | Array[Filter] |
Response
Content-Type: application/json
Status Code | Reason | Response Model |
---|---|---|
200 | Requirement list fetch successfully | |
400 | Invalid json object or mandatory fields missing | - |
401 | Unauthorised or session expired | - |
500 | Returned when server connection times out | - |
Fetch Requirement List For Issue
POST /rest/requirements/list/forIS
Description
Get Requirement list based on particular id of issue.
Request
Content-Type: application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
dfID | body | no | Id of issue | - | integer |
start | body | no | Start index of records | - | integer |
getLinked | body | no | True to get only those requirements that are linked with this Issue, false to get those requirements which are not linked with this Issue | - | boolean |
limit | body | no | Number of records per page | - | integer |
page | body | no | Page number to be displayed | - | integer |
getColumns | body | no | True to get list of all available filters(System + UDF) in 'filterTemplate' field | - | boolean |
udfFilter | body | no | Apply filter on user defined fields' values | - | Array[UdfFilter] |
filter | body | no | System filters to be applied | - | Array[Filter] |
viewId | body | yes | View ID of the user for that particular project and Requirement module. View ID can be fetched from latestViews section of Getinfo API. | - | integer |
Response
Content-Type: application/json
Status Code | Reason | Response Model |
---|---|---|
200 | Requirement list fetch successfully | |
400 | Invalid json object or mandatory fields missing | - |
401 | Unauthorised or session expired | - |
500 | Returned when server connection times out | - |
Get List of Requirements while Linking to a Test suite
POST /rest/requirements/list/forTS
Description
Requirement list for Test Suite.
Request
Content-Type: application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
start | body | no | Start index of records | - | integer |
limit | body | no | Number of records per page | - | integer |
page | body | no | Page number to be displayed | - | integer |
scope | body | yes | Scope of the Requirement, possible values project, release, cycle, build | - | string |
getColumns | body | no | True to get list of all available filters(System + UDF) in 'filterTemplate' field | - | boolean |
viewId | body | yes | View ID of the user for that particular project and Requirement module. View ID can be fetched from latestViews section of Getinfo API. | - | integer |
Response
Content-Type: application/json
Status Code | Reason | Response Model |
---|---|---|
200 | Requirement list fetch successfully | |
400 | Invalid json object or mandatory fields missing | - |
401 | Unauthorised or session expired | - |
500 | Returned when server connection times out | - |
Fetch Requirement List For Test Case
POST /rest/requirements/list/forTC
Description
Get Requirement list based on particular id of test case.
Request
Content-Type: application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
tcID | body | no | Id of testcase | - | integer |
start | body | no | Start index of records | - | integer |
getLinked | body | no | True to get only those requirements that are linked with this Testcase, false to get those requirements which are not linked with this Testcase | - | boolean |
showEntityWithReleaseCycle | body | no | List only Requirement which have given tcID's release and cycle | - | boolean |
limit | body | no | Number of records per page | - | integer |
page | body | no | Page number to be displayed | - | integer |
getColumns | body | no | True to get list of all available filters(System + UDF) in 'filterTemplate' field | - | boolean |
udfFilter | body | no | Apply filter on user defined fields' values | - | Array[UdfFilter] |
filter | body | no | System filters to be applied | - | Array[Filter] |
viewId | body | yes | View ID of the user for that particular project and Requirement module. View ID can be fetched from latestViews section of Getinfo API. | - | integer |
Response
Content-Type: application/json
Status Code | Reason | Response Model |
---|---|---|
200 | Requirement list fetch successfully | |
400 | Invalid json object or mandatory fields missing | - |
401 | Unauthorised or session expired | - |
500 | Returned when server connection times out | - |
View Requirement Details
POST /rest/requirements/detail/data
Description
To view particular requirement's all fields
Request
Content-Type: application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
version | body | yes | Version number of Requirement | - | integer |
id | body | yes | Id of Requirement | - | integer |
Response
Content-Type: application/json
Status Code | Reason | Response Model |
---|---|---|
200 | Requirement fetch successfully | |
400 | Invalid json object or mandatory fields missing | - |
401 | Unauthorised or session expired | - |
500 | Returned when server connection times out | - |
View Requirement's Version Information
POST /rest/requirements/versions/{id}
Request
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
entityId | body | yes | Id of Requirement | - | integer |
filter | body | no | filters to apply | - | Array[Filter] |
id | path | yes | Id of Requirement | - | integer |
Response
Content-Type: application/json
Status Code | Reason | Response Model |
---|---|---|
200 | Requirement Version detail fetch successfully | |
400 | Invalid json object or mandatory fields missing | - |
401 | Unauthorised or session expired | - |
500 | Returned when server connection times out |
|
Create Requirement
POST /rest/requirements
Request
Content-Type:application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
rqFolderId | body | yes | FolderId of Requirement | - | string |
name | body | yes | Summary of the Requirement | - | string |
priority | body | no | Priority of Requirement | - | Array[integer] |
component | body | no | Label of Requirement | - | Array[integer] |
requirementState | body | no | Status of Requirement | - | Array[integer] |
description | body | no | Description of Requirement | - | string |
requirementOwner | body | no | Owner of Requirement | - | integer |
scope | body | yes | Scope of the Requirement, possible values project,release,cycle,build | - | string |
Response
Content-Type: application/json
Status Code | Reason | Response Model |
---|---|---|
200 | Requirement created successfully | |
400 | Returned in case of- Invalid json/project/client | - |
500 | Returned when server connection times out | - |
Update Requirement
PUT /rest/requirements
Request
Content-Type: application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
updateVersionFlag | body | no | Version number of Requirement(value = 3) | - | integer |
updateWithVersion | body | no | Flag for the requirement update with version or not | - | boolean |
description | body | no | Description of the Requirement | - | string |
rqId | body | yes | Id of Requirement | - | integer |
rqVersionId | body | yes | VersionId of Requirement | - | integer |
requirementState | body | no | Status of Requirement | - | Array[integer] |
priority | body | no | Priority of Requirement | - | Array[integer] |
owner | body | no | Owner of Requirement | - | integer |
name | body | no | Summary of Requirement | - | string |
component | body | no | Label of Requirement | - | Array[integer] |
versionComment | body | no | Comment about new version while creating it | - | string |
bddData | body | no | Content which needs to save to QMetry. | - | string |
fileName | body | no | Name of file from repository. | - | string |
bddConfigrationID | body | no | BDD Configuration ID | - | integer |
bddBranch | body | no | Branch name of repository. | - | string |
bddFolderPath | body | no | Folder path of repository where file located. | - | string |
Response
Content-Type: application/json
Status Code | Reason | Response Model |
---|---|---|
200 | Requirement updated successfully | |
400 | Returned in case of- Invalid json object or invalid UDF | - |
401 | Unautorised, insufficient privileges or session expired | - |
500 | Returned when server connection times out | - |
RequirementRepository
name | type | required | description | example |
---|---|---|---|---|
manager | Entity Manager | optional | - |
Archive Requirement
POST /rest/requirements/archiveEntity
Description
API To archive requirement based on specific version or all version
Request
Content-Type: application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
entityIds | body | yes | An array of requirementId or requirementVersionId | - | Array[integer] |
isArchived | body | yes | True for archive, false for unarchive | - | boolean |
isEntityVersion | body | no | True for archive specific version of Requirement otherwise false | - | boolean |
Response
Content-Type: application/json
Status Code | Reason | Response Model |
---|---|---|
200 | Requirement archive successfully | |
400 | Invalid json object or mandatory fields missing | - |
401 | Unauthorised or session expired | - |
500 | Returned when server connection times out | - |
Delete Requirement
POST /rest/requirements/deleteEntity
Description
API To Delete Requirement
Request
Content-Type: application/json
Parameters
Name | Located in | Required | Description | Default | Schema |
---|---|---|---|---|---|
entityIds | body | yes | An array of RequirementId | - | Array[integer] |
Response
Content-Type: application/json