Requirements
This chapter focuses on services for the requirements.
Get all requirements
A GET
to /requirements
returns all the requirements that the user is allowed to read.
HTTP request
GET /api/rest/latest/requirements?page=2&size=1 HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
which type of the element should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1192
{
"_embedded" : {
"requirements" : [ {
"_type" : "requirement",
"id" : 60,
"name" : "sample requirement",
"current_version" : {
"_type" : "requirement-version",
"id" : 12,
"reference" : "REQ_SAMP",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/12"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/60"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/requirements?page=0&size=1"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/requirements?page=1&size=1"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements?page=2&size=1"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/requirements?page=3&size=1"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/requirements?page=5&size=1"
}
},
"page" : {
"size" : 1,
"totalElements" : 6,
"totalPages" : 6,
"number" : 2
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements the user is allowed to read |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Create requirement
A POST
to /requirements
creates a new requirement.
HTTP request
POST /api/rest/latest/requirements HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 592
Host: localhost:8080
{
"_type" : "requirement",
"current_version" : {
"_type" : "requirement-version",
"name" : "new age",
"criticality" : "MINOR",
"category" : {
"code" : "CAT_USER_STORY"
},
"status" : "UNDER_REVIEW",
"description" : "<p>leave a comment please</p>",
"custom_fields" : [ {
"code" : "cuf_txt_note",
"value" : "Star Trek style welcomed but not mandatory"
}, {
"code" : "cuf_tags_see_also",
"value" : [ "smart home", "sensors", "hand gesture" ]
} ]
},
"parent" : {
"_type" : "requirement-folder",
"id" : 300
}
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity (mandatory), either "requirement" or "high-level-requirement". Note that "high-level-requirements" are a premium-locked feature. |
|
|
the current requirement version of this requirement |
|
|
the parent node of this requirement |
Query parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 2193
{
"_type" : "requirement",
"id" : 456,
"name" : "new age",
"project" : {
"_type" : "project",
"id" : 15,
"name" : "Winter will be gone",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"parent" : {
"_type" : "requirement-folder",
"id" : 300,
"name" : "root-level folder",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/300"
}
}
},
"mode" : "NATIVE",
"current_version" : {
"_type" : "requirement-version",
"id" : 333,
"name" : "new age",
"reference" : "SAMP_REQ_VER",
"version_number" : 1,
"created_by" : "admin",
"created_on" : "2017-06-15T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-06-15T10:00:00.000+00:00",
"criticality" : "MINOR",
"category" : {
"code" : "CAT_USER_STORY"
},
"status" : "UNDER_REVIEW",
"description" : "<p>leave a comment please</p>",
"custom_fields" : [ {
"code" : "cuf_txt_note",
"label" : "note",
"value" : "Star Trek style welcomed but not mandatory"
}, {
"code" : "cuf_tags_see_also",
"label" : "see also",
"value" : [ "smart home", "sensors", "hand gesture" ]
} ],
"verifying_test_cases" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/333"
}
}
},
"versions" : [ {
"_type" : "requirement-version",
"id" : 333,
"name" : "new age",
"version_number" : 1,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/333"
}
}
} ],
"remote_req_id" : "null",
"remote_req_url" : "null",
"remote_req_perimeter_status" : "null",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/456"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"current_version" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/333"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the requirement |
|
|
the name of the current (latest) requirement version of this requirement |
|
|
the project which this requirement belongs to |
|
|
the management mode of the requirement |
|
|
the requirement versions of this requirement |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this requirement |
|
link to the project this requirement belongs to |
|
link to the current version of this requirement |
Modify requirement
A PATCH
to /requirements/{id}
modifies the requirement with the given id. The properties that you can modify are the name, reference, description, category, criticality and status. Some fields may be restricted from modification if they are managed by synchronization, depending on the plugin’s configuration.
Note that modifying a requirement means modifying its current version : this is why those attributes must be enclosed in a section "current_version"
(see the example).
Path parameters
Parameter | Description |
---|---|
|
the id of the requirement. |
HTTP request
PATCH /api/rest/latest/requirements/60 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 562
Host: localhost:8080
{
"_type" : "requirement",
"current_version" : {
"_type" : "requirement-version",
"name" : "new age after modify",
"reference" : "SAMP_REQ_VER",
"criticality" : "MAJOR",
"category" : {
"code" : "CAT_USER_STORY"
},
"status" : "APPROVED",
"description" : "<p>Comment after modify</p>",
"custom_fields" : [ {
"code" : "cuf_txt_note",
"value" : "Star Trek style welcomed but not mandatory"
}, {
"code" : "cuf_tags_see_also",
"value" : [ "smart home", "sensors", "hand gesture" ]
} ]
}
}
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2226
{
"_type" : "requirement",
"id" : 60,
"name" : "new age after modify",
"project" : {
"_type" : "project",
"id" : 14,
"name" : "sample project",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
},
"parent" : {
"_type" : "requirement-folder",
"id" : 300,
"name" : "sample folder",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/300"
}
}
},
"mode" : "NATIVE",
"current_version" : {
"_type" : "requirement-version",
"id" : 36,
"name" : "new age after modify",
"reference" : "SAMP_REQ_VER",
"version_number" : 1,
"created_by" : "admin",
"created_on" : "2017-06-15T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-06-15T10:00:00.000+00:00",
"criticality" : "MAJOR",
"category" : {
"code" : "CAT_USER_STORY"
},
"status" : "APPROVED",
"description" : "<p>Comment after modify</p>",
"custom_fields" : [ {
"code" : "cuf_txt_note",
"label" : "note",
"value" : "Star Trek style welcomed but not mandatory"
}, {
"code" : "cuf_tags_see_also",
"label" : "see also",
"value" : [ "smart home", "sensors", "hand gesture" ]
} ],
"verifying_test_cases" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/36"
}
}
},
"versions" : [ {
"_type" : "requirement-version",
"id" : 36,
"name" : "new age after modify",
"version_number" : 1,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/36"
}
}
} ],
"remote_req_id" : "null",
"remote_req_url" : "null",
"remote_req_perimeter_status" : "null",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/60"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"current_version" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/36/current_version"
}
}
}
Convert requirement
A PATCH
to /requirements/{id}/convert
modifies the requirement with the given id. Converting a high level requirement to a standard one will also remove links between the high level requirement and linked requirement. The conversion is forbidden if the requirement is synchronized.
This functionality is only available with premium license.
Path parameters
Parameter | Description |
---|---|
|
the id of the requirement. |
HTTP request
PATCH /api/rest/latest/requirements/60/convert HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 57
Host: localhost:8080
{
"convert_requirement_to" : "HIGH_LEVEL_REQUIREMENT"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the nature of the requirement: entry should be "STANDARD_REQUIREMENT" or "HIGH_LEVEL_REQUIREMENT" |
Example response
See the response example from the modify requirement endpoint.
Get requirement
A GET
to /requirements/{id}
returns the requirement with the given id.
Get requirement
Path parameters
Parameter | Description |
---|---|
|
the id of the requirement |
HTTP request
GET /api/rest/latest/requirements/624 HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Get a native requirement
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3792
{
"_type" : "high-level-requirement",
"id" : 624,
"name" : "sample requirement 98-3",
"project" : {
"_type" : "project",
"id" : 44,
"name" : "sample project",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/44"
}
}
},
"path" : "/sample project/domain 1/sample requirement 98-3",
"parent" : {
"_type" : "requirement-folder",
"id" : 6,
"name" : "domain 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/6"
}
}
},
"mode" : "NATIVE",
"current_version" : {
"_type" : "requirement-version",
"id" : 98,
"name" : "sample requirement 98-3",
"reference" : "REQ01",
"version_number" : 3,
"created_by" : "User-1",
"created_on" : "2017-07-17T10:00:00.000+00:00",
"last_modified_by" : "User-1",
"last_modified_on" : "2017-07-17T10:00:00.000+00:00",
"criticality" : "MAJOR",
"category" : {
"code" : "CAT_FUNCTIONAL"
},
"status" : "WORK_IN_PROGRESS",
"description" : "<p>Description of the sample requirement.</p>",
"custom_fields" : [ {
"code" : "CF_TXT",
"label" : "cuf text",
"value" : "text value"
}, {
"code" : "CF_TAG",
"label" : "cuf tag",
"value" : [ "tag_1", "tag_2" ]
} ],
"verifying_test_cases" : [ {
"_type" : "test-case",
"id" : 100,
"name" : "sample test case 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/100"
}
}
}, {
"_type" : "scripted-test-case",
"id" : 102,
"name" : "sample scripted test case 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/102"
}
}
}, {
"_type" : "keyword-test-case",
"id" : 103,
"name" : "sample keyword test case 3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/103"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/98"
}
}
},
"versions" : [ {
"_type" : "requirement-version",
"id" : 78,
"name" : "sample requirement 98-1",
"version_number" : 1,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/78"
}
}
}, {
"_type" : "requirement-version",
"id" : 88,
"name" : "sample requirement 98-2",
"version_number" : 2,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/88"
}
}
}, {
"_type" : "requirement-version",
"id" : 98,
"name" : "sample requirement 98-3",
"version_number" : 3,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/98"
}
}
} ],
"remote_req_id" : "null",
"remote_req_url" : "null",
"remote_req_perimeter_status" : "null",
"linked_requirements" : [ {
"_type" : "requirement",
"id" : 1337,
"name" : "linked requirement",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/1337"
}
}
} ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/624"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/44"
},
"current_version" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/98"
},
"issues" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/624/issues"
}
}
}
Get a synchronized requirement
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2211
{
"_type" : "requirement",
"id" : 624,
"name" : "sample requirement 98-3",
"project" : {
"_type" : "project",
"id" : 44,
"name" : "sample project",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/44"
}
}
},
"path" : "/sample project/domain 1/sample requirement 98-3",
"parent" : {
"_type" : "high-level-requirement",
"id" : 6,
"name" : "High level requirement",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/6"
}
}
},
"mode" : "SYNCHRONIZED",
"current_version" : {
"_type" : "requirement-version",
"id" : 98,
"name" : "sample requirement 98-3",
"reference" : "REQ01",
"version_number" : 3,
"created_by" : "User-1",
"created_on" : "2017-07-17T10:00:00.000+00:00",
"last_modified_by" : "User-1",
"last_modified_on" : "2017-07-17T10:00:00.000+00:00",
"criticality" : "MAJOR",
"category" : {
"code" : "CAT_FUNCTIONAL"
},
"status" : "WORK_IN_PROGRESS",
"description" : "<p>Description of the sample requirement.</p>",
"custom_fields" : [ ],
"verifying_test_cases" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/98"
}
}
},
"versions" : [ {
"_type" : "requirement-version",
"id" : 98,
"name" : "sample requirement 98-3",
"version_number" : 3,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/98"
}
}
} ],
"remote_req_id" : "any string",
"remote_req_url" : "https://gitlab.com/custom-endpoint",
"remote_req_perimeter_status" : "IN_CURRENT_PERIMETER",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/624"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/44"
},
"current_version" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/98"
},
"issues" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/624/issues"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the requirement |
|
|
the type of the entity |
|
|
the name of the current (latest) requirement version of this requirement |
|
|
the project which this requirement belongs to |
|
|
the path of this requirement |
|
|
the parent node of this requirement |
|
|
the management mode of the requirement |
|
|
distant requirement id, null if mode is native |
|
|
distant requirement url, null if mode is native |
|
|
distant requirement perimeter status, null if mode is native |
|
|
the current requirement version of this requirement |
|
|
the requirement versions of this requirement |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this requirement |
|
link to the project this requirement belongs to |
|
link to the current version of this requirement |
|
link to the issues of this requirement |
Delete requirement
A DELETE
to /requirements/{ids}
deletes one or several requirement(s) with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the requirements |
HTTP request
DELETE /api/rest/latest/requirements/169,189 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Get requirement children
A GET
to /requirements/{id}/children
returns the children of the requirement with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the requirement |
HTTP request
GET /api/rest/latest/requirements/99/children?page=2&size=2 HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
level of depth of the content that should be returned (optional), available values : root or nested (more info in Parameter 'include' section) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1645
{
"_embedded" : {
"children" : [ {
"_type" : "requirement",
"id" : 47,
"name" : "sample requirement 1",
"current_version" : {
"_type" : "requirement-version",
"id" : 33,
"reference" : "REQ_SAMP_1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/33"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/47"
}
}
}, {
"_type" : "requirement",
"id" : 88,
"name" : "sample requirement 2",
"current_version" : {
"_type" : "requirement-version",
"id" : 11,
"reference" : "REQ_SAMP_2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/11"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/88"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/99/children?page=0&size=2"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/99/children?page=1&size=2"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/99/children?page=2&size=2"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/99/children?page=2&size=2"
}
},
"page" : {
"size" : 2,
"totalElements" : 6,
"totalPages" : 3,
"number" : 2
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements the user is allowed to read |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get issues of a requirement
A GET
to /requirements/{id}/issues
returns all the issues of the requirement with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the requirement |
HTTP request
GET /api/rest/latest/requirements/624/issues HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 860
{
"_embedded" : {
"issues" : [ {
"remoteIssueId" : "165",
"url" : "http://192.175.1.51/bugzilla/show_bug.cgi?id=165",
"executions" : [ {
"_type" : "execution",
"id" : 2,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/2"
}
}
} ],
"requirement-versions" : [ {
"_type" : "requirement-version",
"id" : 88,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/88"
}
}
} ]
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/624/issues?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the issues of this requirement |
|
|
the remote issue id of the issue linked to the entity. |
|
|
the URL of the issue linked to the entity. |
|
|
the executions linked to the entity. |
|
|
the requirement versions linked to the issue. |
|
|
the page size for that query |
|
|
total number of elements the user is allowed to read |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Link test cases to a requirement
A POST
to /requirements/{id}/coverages/{testCaseIds}
link the test cases to the requirement.
Path parameters
Parameter | Description |
---|---|
|
the id of the requirement |
|
the ids of the test cases to associate |
HTTP request
POST /api/rest/latest/requirements/543/coverages/350,351,352 HTTP/1.1
Accept: application/json
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
Query parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2739
{
"_type" : "requirement",
"id" : 543,
"name" : "User friendly interface",
"project" : {
"_type" : "project",
"id" : 5,
"name" : "Application-5",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/5"
}
}
},
"parent" : {
"_type" : "requirement-folder",
"id" : 305,
"name" : "User Interface Folder",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/305"
}
}
},
"mode" : "NATIVE",
"current_version" : {
"_type" : "requirement-version",
"id" : 658,
"name" : "User friendly interface",
"reference" : "UX-5",
"version_number" : 1,
"created_by" : "admin",
"created_on" : "2017-06-15T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-06-15T10:00:00.000+00:00",
"criticality" : "MAJOR",
"category" : {
"code" : "CAT_ERGONOMIC"
},
"status" : "WORK_IN_PROGRESS",
"description" : "<p>User interface is minimalist and easy to use.</p>",
"custom_fields" : [ {
"code" : "AUTOMATED",
"label" : "test_is_automated",
"value" : "false"
} ],
"verifying_test_cases" : [ {
"_type" : "test-case",
"id" : 350,
"name" : "Verify click number",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/350"
}
}
}, {
"_type" : "test-case",
"id" : 351,
"name" : "Verify element number",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/351"
}
}
}, {
"_type" : "test-case",
"id" : 352,
"name" : "Verify page space",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/352"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/658"
}
}
},
"versions" : [ {
"_type" : "requirement-version",
"id" : 658,
"name" : "User friendly interface",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/658"
}
}
} ],
"remote_req_id" : "null",
"remote_req_url" : "null",
"remote_req_perimeter_status" : "null",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/543"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/5"
},
"current_version" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/658"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
type of the entity |
|
|
the id of the requirement |
|
|
the name of the current (latest) requirement version of this requirement |
|
|
the management mode of the requirement |
|
|
distant requirement id, null if mode is native |
|
|
distant requirement url, null if mode is native |
|
|
distant requirement perimeter status, null if mode is native |
|
|
the project the requirement belongs to |
|
|
the parent of this requirement |
|
|
the current requirement version of this requirement |
|
|
the requirement versions of this requirement |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this requirement |
|
link to the project this requirement belongs to |
|
link to the current version of this requirement |
Unlink test cases from a requirement
A DELETE
to /requirements/{id}/coverages/{testCaseIds}
unlink the test cases from the requirement.
Path parameters
Parameter | Description |
---|---|
|
the id of the requirement |
|
the ids of the test cases to disassociate |
HTTP request
DELETE /api/rest/latest/requirements/543/coverages/350,351 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Link requirements to a high level requirement
A POST
to /high-level-requirements/{id}/requirements/{requirementIds}
links the standard requirements to the high level requirement.
Path parameters
Parameter | Description |
---|---|
|
the id of the high level requirement |
|
the ids of the requirements to link |
HTTP request
POST /api/rest/latest/high-level-requirements/543/requirements/61 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Unlink requirements from a high level requirement
A DELETE
to /high-level-requirements/{id}/requirements/{requirementIds}
unlink the standard requirements from the high level requirement.
Path parameters
Parameter | Description |
---|---|
|
the id of the high level requirement |
|
the ids of the requirements to unlink |
HTTP request
DELETE /api/rest/latest/high-level-requirements/543/requirements/350,351 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080