Returns a filtered list of requirements declared in the specified QAComplete project.
Use the operation to get a list of all the requirements registered in a QAComplete project. This operation is equivalent to the /project/{ProjectId}/requirements (GET) operation, but this one allows you to send a large filter string.
To get parameters of an individual requirement by its ID, use the …/requirements/{Id} (GET)
operation.
Authentication
Basic authentication using a user’s login and password. See Authentication for details.
Security Rights
The authenticating user must belong to a security group that has the Read privilege for Requirements.
Request Format
To get a filtered list of requirements, send a POST request to the following URL:
URL parameters
ProjectId : integer, required
The ID of the project.
offset : integer, default: 0
The number of requirements to skip before counting the returned requirements. The default value is 0, which is the offset of the first item. For details, see Paging Through Results Using Offset and Limit.
limit : integer, default: 25
The maximum number of requirements to return in the response.
Body parameters
In the request body, pass the RequestRequirementsAllPost
object that describes the requirements to search for.
"Filter": "string"
}
Some string property values (for example, Status
) are based on the choice lists defined in your QAComplete project. You can find these values in the Requirements > Show Requirements > Actions > Manage Choice Lists panel in QAComplete.
Filter : string
The filter expression to apply to the returned list. See Search Filters.
A sample request:
POST http://yourserver.com/rest-api/service/api/v1/projects/11873/requirements/search HTTP/1.1
Host: yourserver.com
Connection: keep-alive
Content-Type: application/json
Accept: application/json
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==
Content-Length: 61
{
"Filter": "(title is not empty) OR (status != 'Active')"
}
A sample request made by using cURL:
curl -u [email protected]:p@ssword -d @requirements.txt -H "Content-Type: application/json" -H "Accept: application/json" http://yourserver.com/rest-api/service/api/v1/projects/11873/requirements/search
Response Format
If successful, the operation responds with HTTP status code 200 and returns a JSON object with information about the requirements.
A sample response:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1502
{
"metadata": {
"result_set": {
"count": 1,
"offset": 0,
"limit": 25,
"total": 1
},
"permissions": {
"acl": 7
}
},
"results": [
{
"id": 1,
"title": "Add Visual Studio Integration",
"status": "On Hold",
"active": "true",
"project_id": 11873,
"__permissions": {
"acl": 7
},
"act_finish": "2015-08-22T17:00:00.0000000",
"act_hrs": 36.100,
"act_start": "2015-08-14T08:00:00.0000000",
"assigned_to_name": "Smith, John",
"assignee_user_id": 25263,
"business_rule": "br1",
"comments": "comment 1",
"custom_fields": [
{
"id": "Custom1",
"name": "Area",
"value": "Integration"
}
],
"date_created": "2015-08-10T09:19:39.8030000",
"date_last_escalated": "2015-08-16T08:30:00.0000000",
"date_opened": "2015-08-14T10:28:36.7130000",
"date_updated": "2015-08-15T10:19:39.8030000",
"description": "Add integration with Microsoft Visual Studio",
"est_finish": "2015-08-14T17:00:00.0000000",
"est_hrs": 20.000,
"est_hrs_remaining": 2,
"est_start": "2015-08-12T08:00:00.0000000",
"folder_id": 10,
"folder_name": "Integration",
"grouping": "IDE",
"import_id": 0,
"keywords": "Integration",
"last_escalation_rule": "rule1",
"last_escalation_rule_id": 271,
"nbr_escalations": 1,
"nbr_events": 0,
"nbr_files": 0,
"nbr_files_not_secured": 0,
"nbr_notes": 1,
"nbr_tasks": 0,
"notes_description": "note 1",
"opened_by": 25263,
"opened_by_company": "EDGB",
"opened_by_email": "[email protected]",
"opened_by_name": "Smith, John",
"owner_name": "Smith, John",
"owner_user_id": 24661,
"original_id": 0,
"pct_complete": 90,
"subgrouping": "Other",
"update_user_id": 24661,
"user_name": "Smith, John"
}
]
}
Metadata about the requirement list.
Pagination information about the requirement list. (See Paging Through Results Using Offset and Limit).
The number of returned requirements.
The offset of the first requirement requested.
The maximum number of requirements requested.
The total number of requirements.
The authenticating user’s rights to access requirements.
Access rights:
- 0 - None
- 1 - Read
- 2 - Update
- 3 - Read and update
- 4 - Delete
- 5 - Read and delete
- 7 - Full access
The array of requirements.
The unique identifier of the requirement.
The ID of the QAComplete project that contains the requirement.
The requirement title (name).
The requirement status based on a choice list.
Specifies whether the requirement is enabled (active).
Keywords of the requirement.
The group that contains the requirement.
The sub group that contains the requirement.
The long description of the requirement. Can include an HTML markup.
The business rule associated with the requirement. Can include an HTML markup.
The estimated hours to finish the requirement.
The estimated start date for working on the requirement.
The estimated date for finishing the requirement.
The actual hours spent working on the requirement.
The actual start date for working on the requirement.
The actual date when the requirement was completed.
The date and time when the requirement was last updated.
The date and time when the requirement was created.
The date and time when the requirement was opened.
The ID of the last user who updated the requirement.
For importing: the original key that was imported.
The ID of the import session, in which the requirement was imported. If the requirement was created in QAComplete, the ImportId property is equal to 0.
The ID of the user who owns the requirement.
The ID of the user the requirement is assigned to, or 0 if the requirement is not assigned to anyone.
The ID of the folder containing the requirement, or 0 if the requirement is not in any folder.
The percentage complete of requirement completion.
The estimated remaining hours for finishing the requirement.
The ID of the user who opened the requirement.
The name of the last user who updated the requirement, in the Lastname, Firstname format.
The name of the user who owns the requirement, in the Lastname, Firstname format.
The name of the user to whom the requirement is assigned, in the Lastname, Firstname format.
The latest note attached to the requirement. Can include an HTML markup.
The number of files attached to the requirement.
The number of notes attached to the requirement.
The number of scheduled events associated with the requirement.
The number of tasks linked to the requirement.
The name of the folder containing the requirement, in the format ParentFolder/Subfolder/Subfolder.
The name of the user who opened the requirement, in the Lastname, Firstname format.
The e-mail address of the user who registered the requirement.
The company name of the user who registered the requirement.
Reserved.
The number of times the requirement was processed by escalation rules.
The date when the requirement was last processed by an escalation rule.
The ID of the escalation rule that processed the requirement last. 0 if no escalation rule processed the requirement.
The name of the escalation rule that processed the requirement last.
An array of objects that describe custom fields and their values.
The comments to the requirement. Can include an HTML markup.
The unique identifier of a custom field.
The field name.
The field value.
Error responses
If the operation fails, it returns the appropriate status code and (optionally) the error description in the response body.
If the project with the specified ProjectId does not exist or the authenticating user does not have rights to access the project, the operation returns the Access is denied
error.