Requirement Versions
This chapter focuses on services for the requirement versions.
Get requirement version
A GET
to /requirement-versions/{id}
returns the requirement version with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the requirement version |
HTTP request
GET /api/rest/latest/requirement-versions/3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request 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: 2016
{
"_type" : "requirement-version",
"id" : 3,
"name" : "sample requirement",
"reference" : "SAMP_REQ_VER",
"version_number" : 2,
"requirement" : {
"_type" : "requirement",
"id" : 64,
"name" : "sample requirement",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/64"
}
}
},
"created_by" : "User-1",
"created_on" : "2017-07-19T10:00:00.000+00:00",
"last_modified_by" : "User-2",
"last_modified_on" : "2017-07-20T10:00:00.000+00:00",
"criticality" : "CRITICAL",
"category" : {
"code" : "CAT_PERFORMANCE"
},
"status" : "APPROVED",
"description" : "<p>Approved performance requirement-version</p>",
"custom_fields" : [ {
"code" : "CUF1",
"label" : "Cuf One",
"value" : "value_1"
}, {
"code" : "CUF2",
"label" : "Cuf Two",
"value" : "value_2"
} ],
"verifying_test_cases" : [ {
"_type" : "test-case",
"id" : 4,
"name" : "verifying test case 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/4"
}
}
}, {
"_type" : "scripted-test-case",
"id" : 9,
"name" : "verifying scripted test case 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/9"
}
}
}, {
"_type" : "keyword-test-case",
"id" : 14,
"name" : "verifying keyword test case 3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/14"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/3"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/85"
},
"requirement" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/64"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/3/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the requirement version |
|
|
the type of the entity |
|
|
the name of the requirement version |
|
|
the reference of the requirement version |
|
|
the version number |
|
|
the requirement of this requirement version |
|
|
user that created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user that modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
the criticality of this requirement version |
|
|
the category of this requirement version |
|
|
the status of this requirement version |
|
|
the description of this requirement version |
|
|
the test cases which cover this requirement version |
|
|
the custom fields of this requirement version |
|
|
the attachments of this requirement version |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this requirement version |
|
link to the project this requirement version belongs to |
|
link to the requirement this requirement version belongs to |
|
link to the attachments this requirement version owns |
Create requirement version
A POST
to /requirement-versions
creates a new requirement version.
Path parameters
Parameter | Description |
---|---|
|
the id of the requirement for which you create a new version |
HTTP request
POST /api/rest/latest/requirement-versions/64?req_link=false&tc_req_link=false HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
true if you want to copy the links between the non-obsolete requirement versions (optional) |
|
true if you want to copy the associated test cases in the new requirement version (optional) |
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2016
{
"_type" : "requirement-version",
"id" : 3,
"name" : "sample requirement",
"reference" : "SAMP_REQ_VER",
"version_number" : 2,
"requirement" : {
"_type" : "requirement",
"id" : 64,
"name" : "sample requirement",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/64"
}
}
},
"created_by" : "User-1",
"created_on" : "2017-07-19T10:00:00.000+00:00",
"last_modified_by" : "User-2",
"last_modified_on" : "2017-07-20T10:00:00.000+00:00",
"criticality" : "CRITICAL",
"category" : {
"code" : "CAT_PERFORMANCE"
},
"status" : "APPROVED",
"description" : "<p>Approved performance requirement-version</p>",
"custom_fields" : [ {
"code" : "CUF1",
"label" : "Cuf One",
"value" : "value_1"
}, {
"code" : "CUF2",
"label" : "Cuf Two",
"value" : "value_2"
} ],
"verifying_test_cases" : [ {
"_type" : "test-case",
"id" : 4,
"name" : "verifying test case 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/4"
}
}
}, {
"_type" : "scripted-test-case",
"id" : 9,
"name" : "verifying scripted test case 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/9"
}
}
}, {
"_type" : "keyword-test-case",
"id" : 14,
"name" : "verifying keyword test case 3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/14"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/3"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/85"
},
"requirement" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/64"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/3/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the requirement for which you create a new version |
|
|
the type of the entity |
|
|
the name of the requirement version |
|
|
the reference of the requirement version |
|
|
the version number |
|
|
the requirement of this requirement version |
|
|
user that created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user that modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
the criticality of this requirement version |
|
|
the category of this requirement version |
|
|
the status of this requirement version |
|
|
the description of this requirement version |
|
|
the custom fields of this requirement version |
|
|
the test cases which cover this requirement version |
|
|
the attachments of this requirement version |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this requirement version |
|
link to the project this requirement version belongs to |
|
link to the requirement this requirement version belongs to |
|
link to the attachments this requirement version owns |
Modify requirement version
A PATCH
to /requirement-versions/{id}
modifies the requirement version with the given id. The properties that you can modify are the name, reference, description, category, criticality,status and custom fields.
Path parameters
Parameter | Description |
---|---|
|
the id of the requirement version |
HTTP request
PATCH /api/rest/latest/requirement-versions/3 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 472
Host: localhost:8080
{
"_type" : "requirement-version",
"name" : "new requirement version 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_note1",
"value" : "Star Trek style welcomed but not mandatory"
}, {
"code" : "cuf_txt_note2",
"value" : "may the force be with you"
} ]
}
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the name of the requirement version |
|
|
the reference of the requirement version |
|
|
the criticality of this requirement version |
|
|
the category of this requirement version |
|
|
the status of this requirement version |
|
|
the description of this requirement version |
|
|
the custom fields of this requirement version |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2099
{
"_type" : "requirement-version",
"id" : 3,
"name" : "new requirement version after modify",
"reference" : "SAMP_REQ_VER",
"version_number" : 2,
"requirement" : {
"_type" : "requirement",
"id" : 64,
"name" : "new requirement version after modify",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/64"
}
}
},
"created_by" : "User-1",
"created_on" : "2017-07-19T10:00:00.000+00:00",
"last_modified_by" : "User-2",
"last_modified_on" : "2017-07-20T10: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_note1",
"label" : "Cuf One",
"value" : "Star Trek style welcomed but not mandatory"
}, {
"code" : "cuf_txt_note2",
"label" : "Cuf Two",
"value" : "may the force be with you"
} ],
"verifying_test_cases" : [ {
"_type" : "test-case",
"id" : 4,
"name" : "verifying test case 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/4"
}
}
}, {
"_type" : "scripted-test-case",
"id" : 9,
"name" : "verifying scripted test case 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/9"
}
}
}, {
"_type" : "keyword-test-case",
"id" : 14,
"name" : "verifying keyword test case 3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/14"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/3"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/85"
},
"requirement" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/64"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/3/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the requirement version |
|
|
the type of the entity |
|
|
the name of the requirement version |
|
|
the reference of the requirement version |
|
|
the version number |
|
|
the requirement of this requirement version |
|
|
user that created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user that modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
the criticality of this requirement version |
|
|
the category of this requirement version |
|
|
the status of this requirement version |
|
|
the description of this requirement version |
|
|
the custom fields of this requirement version |
|
|
the test cases which cover this requirement version |
|
|
the attachments of this requirement version |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this requirement version |
|
link to the project this requirement version belongs to |
|
link to the requirement this requirement version belongs to |
|
link to the attachments this requirement version owns |
Link test cases to a requirement version
A POST
to /requirement-versions/{id}/coverages/{testCaseIds}
link the test cases to the requirement version.
Path parameters
Parameter | Description |
---|---|
|
the id of the requirement version |
|
the ids of the test cases to associate |
HTTP request
POST /api/rest/latest/requirement-versions/658/coverages/350,351,352 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request 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: 1936
{
"_type" : "requirement-version",
"id" : 658,
"name" : "User friendly interface",
"reference" : "UX-5",
"version_number" : 1,
"requirement" : {
"_type" : "requirement",
"id" : 64,
"name" : "User friendly interface",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/64"
}
}
},
"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"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/85"
},
"requirement" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/64"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/658/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the requirement version |
|
|
the type of the entity |
|
|
the name of the requirement version |
|
|
the reference of the requirement version |
|
|
the version number |
|
|
the requirement of this requirement version |
|
|
user that created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user that modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
the criticality of this requirement version |
|
|
the category of this requirement version |
|
|
the status of this requirement version |
|
|
the description of this requirement version |
|
|
the custom fields of this requirement version |
|
|
the test cases which cover this requirement version |
|
|
the attachments of this requirement version |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this requirement version |
|
link to the project this requirement version belongs to |
|
link to the requirement this requirement version belongs to |
|
link to the attachments this requirement version owns |
Unlink test cases from a requirement version
A DELETE
to /requirement-versions/{id}/coverages/{testCaseIds}
unlink the test cases from the requirement version.
Path parameters
Parameter | Description |
---|---|
|
the id of the requirement version |
|
the ids of the test cases to disassociate |
HTTP request
DELETE /api/rest/latest/requirement-versions/543/coverages/350,351 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080