Requirement Version Link Types
This chapter focuses on types of links between requirements.
Get all link type
A GET
to /requirement-link-types
returns all the link types.
HTTP request
GET /api/rest/latest/requirement-link-types HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Request 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: 1066
{
"_embedded" : {
"requirement-version-link-types" : [ {
"_type" : "requirement-version-link-type",
"id" : 1,
"role1" : "Role1 link1",
"role1_code" : "Role1 code link1",
"role2" : "Role2 link1",
"role2_code" : "Role2 code link1",
"default" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-link-types/1"
}
}
}, {
"_type" : "requirement-version-link-type",
"id" : 2,
"role1" : "Role1 link2",
"role1_code" : "Role1 code link2",
"role2" : "Role2 link2",
"role2_code" : "Role2 code link2",
"default" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-link-types/2"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-link-types?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
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 link type by id
A GET
to /requirement-link-types/{id}
returns the link type with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the link type |
HTTP request
GET /api/rest/latest/requirement-link-types/1 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: 307
{
"_type" : "requirement-version-link-type",
"id" : 1,
"role1" : "Role1",
"role1_code" : "Role 1 code",
"role2" : "Role2",
"role2_code" : "Role 2 code",
"default" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-link-types/1"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the link type |
|
|
the first role of the link between requirement |
|
|
the first role code |
|
|
the second role of the link between requirement |
|
|
the second role code |
|
|
the default link type |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this link type |
Get link type by code role
A GET
to /requirement-link-types
returns the link type with the given code role.
HTTP request
GET /api/rest/latest/requirement-link-types?codeRole=Role1code HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
role code of the link to search |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 303
{
"_type" : "requirement-version-link-type",
"id" : 1,
"role1" : "Role1",
"role1_code" : "Role1code",
"role2" : "Role2",
"role2_code" : "Role2code",
"default" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-link-types/1"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the milestone |
|
|
the first role of the link between requirement |
|
|
the first role code |
|
|
the second role of the link between requirement |
|
|
the second role code |
|
|
the default link type |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this link type |
Create link type
A POST
to /requirement-link-types
creates a new link type.
HTTP request
POST /api/rest/latest/requirement-link-types HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 108
Host: localhost:8080
{
"role1" : "Role1",
"role1_code" : "Role 1 code",
"role2" : "Role2",
"role2_code" : "Role 2 code"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the first role of the link between requirement (mandatory) |
|
|
the first role code (mandatory) |
|
|
the second role of the link between requirement (mandatory) |
|
|
the second role code (mandatory) |
Request 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: 307
{
"_type" : "requirement-version-link-type",
"id" : 1,
"role1" : "Role1",
"role1_code" : "Role 1 code",
"role2" : "Role2",
"role2_code" : "Role 2 code",
"default" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-link-types/1"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the milestone |
|
|
the first role of the link between requirement |
|
|
the first role code |
|
|
the second role of the link between requirement |
|
|
the second role code |
|
|
the default link type |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this milestone |
Modify link type
A PATCH
to /requirement-link-types/{id}
modifies the link type with the given id.
HTTP request
PATCH /api/rest/latest/requirement-link-types/1 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 136
Host: localhost:8080
{
"role1" : "Update role1",
"role1_code" : "Update role 1 code",
"role2" : "Update role2",
"role2_code" : "Update role 2 code"
}
Path parameters
Parameter | Description |
---|---|
|
the id of the link type |
Request fields
Path | Type | Description |
---|---|---|
|
|
the first role of the link between requirement |
|
|
the first role code |
|
|
the second role of the link between requirement |
|
|
the second role code |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 335
{
"_type" : "requirement-version-link-type",
"id" : 1,
"role1" : "Update role1",
"role1_code" : "Update role 1 code",
"role2" : "Update role2",
"role2_code" : "Update role 2 code",
"default" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-link-types/1"
}
}
}
Delete link type
A DELETE
to /requirement-link-types/{ids}
deletes one or several link type(s) with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the link type |
HTTP request
DELETE /api/rest/latest/requirement-link-types/11%2012 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
HTTP response
HTTP/1.1 204 No Content