Milestones
This chapter focuses on milestones. Milestones allow you to “version” your test repository and to view only the objects (requirements, test cases and campaigns) associated with them. With milestones, you can in particular organize your object libraries by version, create a new version of the repository from an existing version, synchronize two versions …
Activate / deactivate milestones mode
A POST
to /milestones/activate
activate / deactivate milestones mode, according to the value sent in the parameter.
HTTP request
POST /api/rest/latest/milestones/activate?enabled=true HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
takes the values true/false to activate/deactivate the milestone mode. |
HTTP response
HTTP/1.1 204 No Content
Get all milestones
A GET
to /milestones
returns all the milestones that the user is allowed to read.
HTTP request
GET /api/rest/latest/milestones HTTP/1.1
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: 1030
{
"_embedded" : {
"milestones" : [ {
"_type" : "milestone",
"id" : 11,
"label" : "Milestone 1",
"status" : "PLANNED",
"end_date" : "2020-03-19T00:23:45.000+00:00",
"range" : "GLOBAL",
"description" : "example of milestone creation",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/milestones/11"
}
}
}, {
"_type" : "milestone",
"id" : 12,
"label" : "Milestone 2",
"status" : "PLANNED",
"end_date" : "2020-03-19T00:23:45.000+00:00",
"range" : "GLOBAL",
"description" : "example of milestone creation number 2 ",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/milestones/12"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/milestones?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 milestone
A GET
to /milestones/{id}
returns the milestone with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the milestone |
HTTP request
GET /api/rest/latest/milestones/11 HTTP/1.1
Accept: application/json
Host: localhost:8080
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 486
{
"_type" : "milestone",
"id" : 11,
"label" : "Milestone 1",
"status" : "PLANNED",
"end_date" : "2020-03-19T00:23:45.000+00:00",
"range" : "GLOBAL",
"description" : "example of milestone creation",
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/milestones/11"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the milestone |
|
|
the label of the milestone |
|
|
the description of the milestone |
|
|
the status of the milestone |
|
|
due date of the milestone |
|
|
range of the milestone |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this milestone |
Create milestone
A POST
to /milestones
creates a new milestone.
HTTP request
POST /api/rest/latest/milestones HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 177
Host: localhost:8080
{
"_type" : "milestone",
"label" : "Milestone 1",
"description" : "example of milestone creation",
"end_date" : "2020-03-19T22:00:00.000+00:00",
"status" : "PLANNED"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the label of the milestone (mandatory) |
|
|
the description of the milestone |
|
|
the status of the milestone. |
|
|
due date of the milestone (mandatory) |
HTTP response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 486
{
"_type" : "milestone",
"id" : 11,
"label" : "Milestone 1",
"status" : "PLANNED",
"end_date" : "2020-03-19T00:23:45.000+00:00",
"range" : "GLOBAL",
"description" : "example of milestone creation",
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/milestones/11"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the milestone |
|
|
the label of the milestone |
|
|
the description of the milestone |
|
|
the status of the milestone |
|
|
due date of the milestone |
|
|
range of the milestone |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this milestone |
Modify milestone
A PATCH
to /milestones/{id}
modifies the milestone with the given id.
HTTP request
PATCH /api/rest/latest/milestones/11 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 203
Host: localhost:8080
{
"_type" : "milestone",
"label" : "Milestone 1",
"description" : "example of milestone updating",
"end_date" : "2020-03-19T22:00:00.000+00:00",
"status" : "PLANNED",
"range" : "RESTRICTED"
}
Path parameters
Parameter | Description |
---|---|
|
the id of the milestone |
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the label of the milestone |
|
|
the description of the milestone |
|
|
the status of the milestone. |
|
|
due date of the milestone |
|
|
range of the milestone |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 490
{
"_type" : "milestone",
"id" : 11,
"label" : "Milestone 1",
"status" : "PLANNED",
"end_date" : "2020-03-19T00:23:45.000+00:00",
"range" : "RESTRICTED",
"description" : "example of milestone updating",
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/milestones/11"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the milestone |
|
|
the label of the milestone |
|
|
the description of the milestone |
|
|
the status of the milestone |
|
|
due date of the milestone |
|
|
range of the milestone |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this milestone |
Delete milestone
A DELETE
to /milestones/{ids}
deletes one or several milestone(s) with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the milestones |
HTTP request
DELETE /api/rest/latest/milestones/11,12 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
HTTP response
HTTP/1.1 204 No Content