This plugin provides Squash TM with REST-like services (but not exactly like rest), that is, a set of services implemented with a resource-first approach, that allows you to interact with the business without a GUI, by exchanging json representations of those resources via HTTP requests.
Overview
In few words, here is what you will be able/unable to do with this version (5.0.0) of the API:
What you can do with it
-
read operations on most of the business domains
-
create, update and delete services on some of the business domains
-
setup projects
-
have support for attachments and automated tests
-
benefit from this present documentation
What you cannot do with it
-
explore links or use a self-discovery function
-
have support for issues
The basics
In the following documentation, the words Resource and Entity have the same meaning unless the context uses both. When a distinction is made, we generally mean that:
-
an Entity repesents an actual element of the business model (test case, project, etc)
-
a Resource represents any data exchanged with the server. This includes the entities and other kinds of data (paged collections and other things)
Base URL
The API publishes its services under the root URL {squash root url}/api/rest/latest/
.
So in a common case, it could be http://localhost:8080/squash/api/rest/latest/
.
API versioning
For now, and in a foreseeable future, no versioning of the API is planned. As it stands, the plugin is not ready for multiple
concurrent deployment. The placeholder /latest/
that stands for the version number in the API base URL
does not make much sense for now; but it makes it future-proof if such a feature is implemented down the road.
Supported HTTP methods
The API supports the following methods (verbs):
Method | Usage |
---|---|
|
Requests resource(s) from the server |
|
Submits new resources to the server |
|
Submits modifications of an existing resource |
|
Requests suppression of one or several resources |
HTTP status codes
The system replies with conventional HTTP statuses, here is a short reminder:
Status | Meaning |
---|---|
200 OK |
The operation completed successfully. |
201 Created |
A new resource has been created. The response body returns a representation of that resource. |
204 No Content |
The operation completed successfully and the server returned no response body. |
400 Bad Request |
The request is malformed. |
401 Unauthorized |
The user is not authenticated, or supplied wrong credentials. |
403 Forbidden |
The user’s request is denied. |
404 Not Found |
The resource doesn’t exist. |
412 Preconditions Failed |
The submitted resource creation/modification request is rejected because it would leave the resource in an invalid state. |
500 Internal Server Error |
An error occured while the request was processed. |
Response format
The only format supported by the API is JSON. This implies that HTTP requests to and
from the API may forgo the headers Accept: application/json
and Content-Type: application/json
(even if they are
accepted and formally correct). The naming convention for the attribute is snake_case
.
Rel Names
What we call the rel name (relation name) of an entity is the type of the entity as represented in an URI or in its json
representation. They come in two forms: singular and plural. Both are expressed in lowercase, hyphenated names based on the
entity type. The root path of the URI uses the plural form (e.g. /test-cases
), and the json
representation of an entity uses the singular form (e.g. "type" : "test-case"
).
Conceptually the singular name characterizes a single, actual instance of that entity (this is why it is one of the
identifier properties), while the plural name represents the whole family of
entities. Unless stated otherwise, the plural form is just composed of the singular form suffixed with an 's'. In some cases, the singular
and plural forms are different, and it is often a sign of a polymorphic entity. For instance the script of a test case is composed
of several steps that may either describe an action and expected behavior (action-step
), or describe a reference to another
test case (call-step
), yet both are unified under the family of test-steps
.
See chapter Entity Reference for a list of known rel names.
Identifying and locating an Entity
Business entities, in particular, share three common properties, that tell you or the system how to identify and locate the entity. Those properties are called identifier properties.
{
"_type" : "test-case-folder",
"id" : 10,
"_links" : {
"self" : {
"href" : "http://localhost:8080/squash/api/rest/latest/test-case-folders/10"
}
}
}
![]() |
The _type here is the hyphenated lowercase name of the entity type. |
![]() |
This is the id of that instance of the entity. |
![]() |
These are the related links, which always contain a self-reference. Note that the _links attribute may look like the HAL format, but it is really not similar: the API serves no cURI nor templated URIs. |
The server will always include those attributes when rendering an entity - either as a single response or as part of a deep cluster of entities -, and can never be disabled (see Parameter 'fields').
However, an user posting/ patching a json entity to the server is not required to specify them all. Only the _type
is
always required even when it is implied by the URI (actually the request will fail if the _type
contradicts the
target endpoint URI). On the other hand the id
and _links
are ignored without consequences : the _links
can never change,
and id
is either irrelevant when POSTing a new entity or redundant in other cases (it’s already part of the URI).
![]() |
for REST formalists: the Content-Type is always application/json , there are no dedicated MIME type per resource.
Those three attributes are the only one that exist.
|
Unauthorized resources
When an user requests a resource it is not allowed to read, the server replies with HTTP 403
and a json representation of
the error.
Sometimes the user requests a resource it is allowed to read, but not some related resources. This may happen for instance when two related resources (e.g. a test case and a requirement) belong to different projects yet the user is allowed to read the content for only one of them. In that case, those relations will be rendered as unauthorized resources instead of being omitted or leaked. That way, the user is aware that a relation indeed exists without knowing all the details.
{
"_type" : "test-case",
"id" : 4567,
...,
"verified_requirements": [
{
"_type": "unauthorized-resource",
"resource_type": "requirement-version",
"resource_id": 256,
"_links": {
"self": {
"href": "http://localhost:8080/squash/api/rest/latest/requirement-versions/256"
}
}
}
],
...
}
![]() |
The user can access the content of the test case as usual. |
![]() |
The _type here is the special type unauthorized-resource . |
![]() |
This is the real type of the unauthorized resource. |
![]() |
This is the id of the unauthorized resource. |
![]() |
By following this link, you will result in a proper 403 . |
Entity extensions
Some business entities can be attached with a module that provides support for additional features. Those features are optional and those modules will appear in the json representation only if your projects actually use them. For instance the executions, in a context of test automation, will be attached with a module named AutomatedExecutionExtender that hosts on Squash-TM the test results produced by a remote test server.
Such extenders are commonly named with a -extender
suffix. From the REST API perspective, these extension are managed
like any other entities.
{
"_type" : "execution",
"id" : 56,
"name" : "sample test case 56",
"execution_order" : 4,
"execution_status" : "BLOCKED",
"execution_mode" : "AUTOMATED",
"automated_execution_extender" : {
"_type" : "automated-execution-extender",
"id" : 778,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-execution-extenders/778"
}
}
},
...
}
![]() |
The type here is still execution : although it supports automated testing, the type has
not fundamentally changed (i.e. there is no such thing as an AutomatedExecution). |
![]() |
The property automated_execution_extender is defined here but would not appear in a regular,
manual execution. |
Authentication
REST user should use the Basic Authentication. Remember that this protocol is considered as insecure if it is used without encryption.
![]() |
If you prefer to explore the API using your browser, the session cookie obtained via the login page will also be valid. |
Common query parameters
Throughout this documentation you will often find several recurrent query parameters. Rather than detailing them over and over at each documentation site, we prefer to explain them all here.
Pagination parameters
When the requested resource is a collection of other resources/entities, the underlying service often comes with a pagination feature. We call them the paginated resources. Pagination allows you to define pages of entities and browse from one page to another, instead of simply retrieving all the data in one row. It is actually enabled by default, because neither the server nor you would like to swallow possibly several thousands elements at once!
Pagination is driven by a couple of parameters appended to the resource URI:
-
size
: it is an integer that defines how many elements should be returned by page. Of course it should be of at least 1 and may have arbitrary large value. The default value is 20. -
page
: it shows you the page you are requesting. Pages are numbered from 0 onward. Negative value will be treated as 0. Default value is 0 (which corresponds to the first page).
Paginated resources are often served with extra attributes _links
and page
to guide you through your navigation.
curl 'http://localhost:8080/squash/api/rest/latest/test-cases?page=2&size=1' -i -H 'Accept: application/json'
{
"_embedded": {
"test-cases": [
{
"_type": "test-case",
"id": 239,
"name": "Defensive opening",
"reference": "",
"_links": {
"self": {
"href": "http://localhost:8080/squash/api/rest/latest/test-cases/239"
}
}
}
]
},
"_links": {
"first": {
"href": "http://localhost:8080/squash/api/rest/latest/test-cases?page=0&size=1"
},
"prev": {
"href": "http://localhost:8080/squash/api/rest/latest/test-cases?page=1&size=1"
},
"self": {
"href": "http://localhost:8080/squash/api/rest/latest/test-cases?page=2&size=1"
},
"next": {
"href": "http://localhost:8080/squash/api/rest/latest/test-cases?page=3&size=1"
},
"last": {
"href": "http://localhost:8080/squash/api/rest/latest/test-cases?page=5&size=1"
}
},
"page": {
"size": 1,
"totalElements": 6,
"totalPages": 6,
"number": 2
}
}
![]() |
It represents the links to the first, previous, current, next and last page. Other query parameters (such as the size ) are
left untouched. |
![]() |
It represents the attributes of the current page. It also states how many elements you can read this way, and therefore how many pages can be viewed in total. |
The content of _links
is contextual, and only links with sense will be proposed. Consider, for instance, a page
large enough to gather all the available entities; this page would be the one and only page available. In that case the only
link would be a self-reference, because it would be the first and the last page, and there are no existing pages before nor after.
Sorting paginated resources
![]() |
That feature is so unsupported that it should be considered as a side effect. |
The query parameter sort
allows you to specify one or several attributes of the entity under consideration, followed
by the (optional) sorting direction. Eg, &sort=attr1[,attr2…][,asc|desc]
. It may work for certain attributes and
not for others.
Also note that sorting is disabled for certain paginated resources because the order of the content is important and must be kept. This is
the case for a test script for example: it makes no sense to sort it by, id
or action
, for example.
Parameter 'include'
That parameter, when possible, lets you choose how to deal with hierarchies of entities. Squash TM primarily organizes its business domain in several file tree (one per project) of arbitrary depth. When requesting the content of a container, you may choose one of the following value:
-
root
: only the direct children nodes are considered by your request. This is the default. -
nested
: the request should also consider any node that belongs to the subtree of the entity under consideration.
You can combine this with other pagination parameters to limit the returned content.
curl 'http://localhost:8080/squash/api/rest/latest/test-case-folders/15/content?page=0&size=10&include=nested' -i -H 'Accept: application/json'
Parameter 'fields'
That query parameter lets you define with a filter expression which attributes of an entity you want to have in the response.
A filter expression is a comma-separated list of property names. A star '*' is a wild card that stands for all the properties. If a property name is prefixed with a minus '-', that property will be excluded from the rendering, overriding the wild card if present.
Filter expressions can be nested using brackets '[' and ']''. If a nested filter is defined for a property, it will apply to the value(s) of that property. It is primarily used when the said value is a complex object, a relation of the current entity, or a collection of such. Primary types will remain unaffected. You can nest filters within nested filters and so on.
If a filter expression remains empty, every property will be rendered if the current entity is the root of the cluster targeted by the request, or none for other entities. This rule prevents the engine to crawl forever through an entity cluster, especially if it holds circular references. However, because of this you must explicitly specify a nested expression for each property that requires it, otherwise they will appear empty (except for the identifier properties, see above). To that end, you may redeclare a nested expression for a property even when a '*' was specified if you wish to see more of the relation accessed to by that property.
In all cases, the identifier properties id
, _type
and _links
of an entity will
always be included: a filter expression never needs to include them explicitly, and they can never be disabled with the '-'
operator.
Expression | Effect |
---|---|
id,label,reference |
Renders the properties |
id,label,steps[action, called_test_case[name,reference]] |
Renders the |
* |
Will render all the properties of the test case. However, relations such as the test steps will be rendered with bare bones properties. |
*,steps[action] |
Will render all the properties of the test case. Its relations will be rendered with bare bones properties, except for the test steps that will also include their actions. |
*,-reference |
Will render all the properties as stated above, minus the |
Expression | Problem |
---|---|
label,steps[action |
A closing bracket is missing, the expression is unbalanced. |
label,steps[action]],reference |
The root filter expression exited early, the expression is unbalanced. |
curl 'http://localhost:8080/squash/api/rest/latest/test-cases?page=0&size=10&fields=label,last_modified_by' -i -H 'Accept: application/json'
Entity Reference
Most resource URIs are built around the pattern /<plural-rel-name>[/<id>[/component]]
(see Rel Names).
The following table is a list of the resources known to help you find the URLs you need.
Entity | Singular name | Plural name | Description |
---|---|---|---|
ActionStep |
action-step |
test-steps |
A unit of test script, that describes a user action and expected response from the app |
Attachment |
attachment |
attachments |
An attachment |
AutomatedExecutionExtender |
automated-execution-extender |
automated-execution-extenders |
An extension of executions for support of automated testing |
AutomatedSuite |
automated-suite |
automated-suites |
A set of automated execution extenders that were executed together |
AutomatedTest |
automated-test |
automated-tests |
The local representation of a remote test script |
CallStep |
call-step |
test-steps |
A unit of test script that inlines a test case into another one |
Campaign |
campaign |
campaigns |
A campaign |
CampaignFolder |
campaign-folder |
campaign-folders |
A entity that helps to organize the content of the campaign workspace |
CampaignTestPlanItem |
campaign-test-plan-item |
campaign-test-plan-items |
An entry in the test plan of a campaign |
Dataset |
dataset |
datasets |
A set of parameter values to use when a test-case is executed |
Execution |
execution |
executions |
A test run of a test case, with reports and remarks |
ExecutionStep |
execution-step |
execution-steps |
A unit of an execution script |
Iteration |
iteration |
iterations |
A round of executing a campaign test plan |
IterationTestPlanItem |
iteration-test-plan-item |
iteration-test-plan-items |
An entry in the test plan of an iteration, that summarizes all the execution results of a test case |
KeywordTestCase |
keyword-test-case |
test-cases |
A Scenario based on action words to run on the system under test in order to qualify one or several requirements |
KeywordTestStep |
keyword-step |
test-steps |
A unit of keyword test case script. It represents the call of an action word in a context given by a keyword (given, when, then, but, and) |
Parameter |
parameter |
parameters |
A variable piece of a test script |
Project |
project |
projects |
A project |
ProjectTemplate |
project-template |
projects |
A template that preconfigures new projects with its settings |
Requirement |
requirement |
requirements |
A unit of test specification, that may come in one or several versions |
RequirementFolder |
requirement-folder |
requirement-folders |
An entity that helps to organize the content of the requirement workspace |
RequirementVersion |
requirement-version |
requirement-versions |
A version of a requirement |
ScriptedTestCase |
scripted-test-case |
test-cases |
A Gherkin feature to run on the system under test in order to qualify one or several requirements |
Team |
team |
teams |
A group of users |
TestAutomationServer |
test-automation-server |
test-automation-servers |
A test automation server |
TestCase |
test-case |
test-cases |
A scenario to run on the system under test in order to qualify one or several requirements |
TestCaseFolder |
test-case-folder |
test-case-folders |
An entity that helps to organize the content of the test case workspace |
TestSuite |
test-suite |
test-suites |
A partition of the test plan of an iteration |
User |
user |
users |
A user |
Attachments
This chapter focuses on services for the attachments.
Get attachment
A GET
to /attachments/{id}
returns the attachment with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the attachment |
HTTP request
GET /api/rest/latest/attachments/3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 374
{
"_type" : "attachment",
"id" : 3,
"name" : "sample attachment",
"size" : 413168,
"file_type" : "pdf",
"added_on" : "2018-06-15T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/attachments/3"
},
"content" : {
"href" : "http://localhost:8080/api/rest/latest/attachments/3/content"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the attachment |
|
|
the type of the entity |
|
|
the name of the attachment |
|
|
the file type of the attachment |
|
|
the size of the attachment |
|
|
the date this attachment was uploaded |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this attachment |
|
link to download this attachment |
Rename attachment
A PATCH
to /attachments/{id}
with new name in request parameters renames the attachment with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the attachment |
HTTP request
PATCH /api/rest/latest/attachments/3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
the new name for this attachment |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 383
{
"_type" : "attachment",
"id" : 3,
"name" : "same stuff with a new name",
"size" : 413168,
"file_type" : "pdf",
"added_on" : "2018-06-15T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/attachments/3"
},
"content" : {
"href" : "http://localhost:8080/api/rest/latest/attachments/3/content"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the attachment |
|
|
the type of the entity |
|
|
the name of the attachment |
|
|
the file type of the attachment |
|
|
the size of the attachment |
|
|
the date this attachment was uploaded |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this attachment |
|
link to download this attachment |
Download attachment
A GET
to /attachments/{id}/content
downloads the attachment with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the attachment |
HTTP request
GET /api/rest/latest/attachments/3/content HTTP/1.1
Content-Type: application/json
Accept: application/octet-stream
Host: localhost:8080
Upload attachment
A POST
to /api/rest/latest/{owner}/{ownerId}/attachments/
uploads attachments in request body to the owner with the given id. The key of these attachments should always named as "files"
.
The possible {owners}
are campaigns
, campaign-folders
, executions
, execution-steps
, iterations
, projects
,
requirement-folders
, requirement-versions
, test-cases
, test-case-folders
, test-steps
, test-suites
Path parameters
Parameter | Description |
---|---|
|
the owner of the attachment |
|
the id of the owner |
HTTP request
POST /api/rest/latest/campaigns/1/attachments HTTP/1.1
Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Accept: application/json
Host: localhost:8080
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=files; filename=new attachment 1.docx
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
something right
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=files; filename=new attachment 2.pdf
Content-Type: application/pdf
even more
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 541
{
"_embedded" : {
"attachments" : [ {
"_type" : "attachment",
"id" : 5,
"name" : "new attachment 1",
"file_type" : "docx",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/attachments/5"
}
}
}, {
"_type" : "attachment",
"id" : 6,
"name" : "new attachment 2",
"file_type" : "pdf",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/attachments/6"
}
}
} ]
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the attachments just uploaded |
Delete attachment
A DELETE
to /api/rest/latest/{owner}/{ownerId}/attachments/
with attachmentIds in request parameters removes these attachments from their owner with the given id.
The possible {owners}
are campaigns
, campaign-folders
, executions
, execution-steps
, iterations
, projects
,
requirement-folders
, requirement-versions
, test-cases
, test-case-folders
, test-steps
, test-suites
Path parameters
Parameter | Description |
---|---|
|
the owner of the attachment |
|
the id of the owner |
HTTP request
DELETE /api/rest/latest/campaigns/1/attachments?attachmentIds=7,8,9 HTTP/1.1
Content-Type: multipart/form-data
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
the ids of the attachments to delete |
Automated Execution Extenders
This chapter focuses on services for the automated execution extenders.
Get automated execution extender
A GET
to /automated-execution-extenders/{id}
returns the automated execution extender with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the automated execution extender |
HTTP request
GET /api/rest/latest/automated-execution-extenders/778 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 786
{
"_type" : "automated-execution-extender",
"id" : 778,
"result_url" : "http://1234:4567/jenkins/report",
"result_summary" : "all right",
"result_status" : "BLOCKED",
"execution_node" : "no root",
"execution" : {
"_type" : "execution",
"id" : 56,
"name" : "sample test case 56",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/56"
}
}
},
"automated_test" : {
"_type" : "automated-test",
"id" : 569,
"name" : "auto test",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-tests/569"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-execution-extenders/778"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the automated execution extender |
|
|
the type of the entity |
|
|
the execution associated to this automated execution extender |
|
|
the automated test associated to this automated execution extender |
|
|
the result url of the automated execution extender |
|
|
the result summary of the automated execution extender |
|
|
the result status of the automated execution extender |
|
|
the node name of the automated execution extender |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this automated test |
Automated Suites
This chapter focuses on services for the automated suites.
Get all automated suites
A GET
to /automated-suites
returns all the automated suites that the user is allowed to read.
HTTP request
GET /api/rest/latest/automated-suites?size=3&page=1 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1845
{
"_embedded" : {
"automated-suites" : [ {
"id" : "4028b88161e64f290161e6d832460019",
"_type" : "automated-suite",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019"
},
"executions" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019/executions"
}
}
}, {
"id" : "4028b881620b2a4a01620b31f2c60000",
"_type" : "automated-suite",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b881620b2a4a01620b31f2c60000"
},
"executions" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b881620b2a4a01620b31f2c60000/executions"
}
}
}, {
"id" : "4028b88161e64f290161e6704c37000f",
"_type" : "automated-suite",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6704c37000f"
},
"executions" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6704c37000f/executions"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites?page=0&size=3"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites?page=0&size=3"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites?page=1&size=3"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites?page=1&size=3"
}
},
"page" : {
"size" : 3,
"totalElements" : 6,
"totalPages" : 2,
"number" : 1
}
}
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 automated suite
A GET
to /automated-suites/{id}
returns the automated suite with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the automated suite |
HTTP request
GET /api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 368
{
"id" : "4028b88161e64f290161e6d832460019",
"_type" : "automated-suite",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019"
},
"executions" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019/executions"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the uuid of the automated suite |
|
|
the type of the entity |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this automated test |
|
link to the associated executions |
Get automated execution extenders of automated suite
A GET
to /automated-suites/{id}/executions
returns all the automated execution extenders related to the automated suite with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the automated suite |
HTTP request
GET /api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019/executions 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2036
{
"_embedded" : {
"automated-execution-extenders" : [ {
"_type" : "automated-execution-extender",
"id" : 778,
"result_url" : "http://1234:4567/jenkins/report",
"result_summary" : "all right",
"result_status" : "BLOCKED",
"execution_node" : "no root",
"execution" : {
"_type" : "execution",
"id" : 56,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/56"
}
}
},
"automated_test" : {
"_type" : "automated-test",
"id" : 569,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-tests/569"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-execution-extenders/778"
}
}
}, {
"_type" : "automated-execution-extender",
"id" : 338,
"result_url" : "http://1234:4567/jenkins/report",
"result_summary" : "all wrong",
"result_status" : "BLOCKED",
"execution_node" : "your are right",
"execution" : {
"_type" : "execution",
"id" : 56,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/56"
}
}
},
"automated_test" : {
"_type" : "automated-test",
"id" : 569,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-tests/569"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-execution-extenders/338"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019/executions?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the automated execution extenders of this automated suite |
|
|
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 automated suite from iteration
A POST
to /automated-suite-utils/from-iteration
creates a new automated suite with the given iteration id in request parameters.
HTTP request
POST /api/rest/latest/automated-suite-utils/from-iteration HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
iterationId=486
Request parameters
Parameter | Description |
---|---|
|
the id of the iteration |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 368
{
"id" : "4028b88161e64f290161e6d832460019",
"_type" : "automated-suite",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019"
},
"executions" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019/executions"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the uuid of the automated suite |
|
|
the type of the entity |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this automated test |
|
link to the associated executions |
Create automated suite from iteration test plan items
A POST
to /automated-suite-utils/from-iteration-test-plan-items
creates a new automated suite with the given the list of item id in request parameters.
HTTP request
POST /api/rest/latest/automated-suite-utils/from-iteration-test-plan-items HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
itemIds=888%2C777%2C555
Request parameters
Parameter | Description |
---|---|
|
the ids of the iteration test plan items |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 368
{
"id" : "4028b88161e64f290161e6d832460019",
"_type" : "automated-suite",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019"
},
"executions" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019/executions"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the uuid of the automated suite |
|
|
the type of the entity |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this automated test |
|
link to the associated executions |
Create automated suite from test suite
A POST
to /automated-suite-utils/from-test-suite
creates a new automated suite with the given test suite id in request parameters.
HTTP request
POST /api/rest/latest/automated-suite-utils/from-test-suite HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
testSuiteId=888
Request parameters
Parameter | Description |
---|---|
|
the id of the test suite |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 368
{
"id" : "4028b88161e64f290161e6d832460019",
"_type" : "automated-suite",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019"
},
"executions" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019/executions"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the uuid of the automated suite |
|
|
the type of the entity |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this automated test |
|
link to the associated executions |
Execute automated suite
A POST
to /automated-suite-utils/{suiteId}/executor
executes the automated suite with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the automated suite |
HTTP request
POST /api/rest/latest/automated-suite-utils/4028b88161e64f290161e6d832460019/executor HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 368
{
"id" : "4028b88161e64f290161e6d832460019",
"_type" : "automated-suite",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019"
},
"executions" : {
"href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019/executions"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the uuid of the automated suite |
|
|
the type of the entity |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this automated test |
|
link to the associated executions |
Automated Test Technologies
This chapter focuses on services for automated test technologies, they are only authorized for administrators.
Get automated test technology
A GET
to /automated-test-technologies/{id}
returns the automated test technology with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the technology |
HTTP request
GET /api/rest/latest/automated-test-technologies/3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 247
{
"_type" : "automated-test-technology",
"id" : 3,
"name" : "JUnit",
"action_provider_key" : "junit/execute@v1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-test-technologies/3"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the technology |
|
|
the name of the technology |
|
|
the action provider key of the technology |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this technology |
Get all automated test technologies
A GET
to /automated-test-technologies
returns all the automated test technologies.
HTTP request
GET /api/rest/latest/automated-test-technologies 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1192
{
"_embedded" : {
"automated-test-technologies" : [ {
"_type" : "automated-test-technology",
"id" : 1,
"name" : "Robot Framework",
"action_provider_key" : "robotframework/execute@v1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-test-technologies/1"
}
}
}, {
"_type" : "automated-test-technology",
"id" : 2,
"name" : "Cypress",
"action_provider_key" : "cypress/execute@v1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-test-technologies/2"
}
}
}, {
"_type" : "automated-test-technology",
"id" : 3,
"name" : "JUnit",
"action_provider_key" : "junit/execute@v1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-test-technologies/3"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-test-technologies?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 3,
"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 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) |
Add an automated test technology
A POST
to /automated-test-technologies
inserts a new technology.
HTTP request
POST /api/rest/latest/automated-test-technologies HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 125
Host: localhost:8080
{
"_type" : "automated-test-technology",
"name" : "NewTechnology",
"action_provider_key" : "newtechnology/execute@v1"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the name of the technology |
|
|
the action provider key of the technology |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 263
{
"_type" : "automated-test-technology",
"id" : 4,
"name" : "NewTechnology",
"action_provider_key" : "newtechnology/execute@v1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-test-technologies/4"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the entity |
|
|
the type of the entity |
|
|
the name of the technology |
|
|
the action provider key of the technology |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this technology |
Automated Tests
This chapter focuses on services for the automated tests.
Get automated test
A GET
to /automated-tests/{id}
returns the automated test with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the automated test |
HTTP request
GET /api/rest/latest/automated-tests/123 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 348
{
"_type" : "automated-test",
"id" : 123,
"name" : "auto test/class A",
"test_automation_project" : {
"_type" : "test-automation-project",
"id" : "569",
"remote_name" : "job 1",
"local_name" : "wan wan"
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-tests/123"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the automated test |
|
|
the type of the entity |
|
|
the name of the automated test |
|
|
the TA project associated to this automated test |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this automated test |
Campaigns
This chapter focuses on services for the campaigns.
Get all campaigns
A GET
to /campaigns
returns all the campaigns that the user is allowed to read.
HTTP request
GET /api/rest/latest/campaigns?size=2&page=1 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1074
{
"_embedded" : {
"campaigns" : [ {
"_type" : "campaign",
"id" : 41,
"name" : "sample campaign 1",
"reference" : "SAMP_CAMP_1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/41"
}
}
}, {
"_type" : "campaign",
"id" : 46,
"name" : "sample campaign 2",
"reference" : "SAMP_CAMP_2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/46"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns?page=0&size=2"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns?page=0&size=2"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns?page=1&size=2"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns?page=1&size=2"
}
},
"page" : {
"size" : 2,
"totalElements" : 4,
"totalPages" : 2,
"number" : 1
}
}
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 campaign
A POST
to /campaigns
creates a new campaign.
HTTP request
POST /api/rest/latest/campaigns HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 723
Host: localhost:8080
{
"_type" : "campaign",
"name" : "Campaign Test",
"reference" : "ABCD",
"status" : "PLANNED",
"description" : "<p>Sed eget rhoncus sapien. Nam et pulvinar nisi. su Do</p>",
"scheduled_start_date" : "2021-08-31T22:00:00.000+00:00",
"scheduled_end_date" : "2031-09-29T22:00:00.000+00:00",
"actual_start_date" : "2034-09-29T22:00:00.000+00:00",
"actual_end_date" : "2035-09-29T22:00:00.000+00:00",
"actual_start_auto" : false,
"actual_end_auto" : false,
"custom_fields" : [ {
"code" : "CUF_A",
"label" : "Cuf A",
"value" : "value of A"
}, {
"code" : "CUF_B",
"label" : "Cuf B",
"value" : "value of B"
} ],
"parent" : {
"_type" : "campaign-folder",
"id" : 104
}
}
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1438
{
"_type" : "campaign",
"id" : 332,
"name" : "Campaign Test",
"reference" : "ABCD",
"description" : "<p>Sed eget rhoncus sapien. Nam et pulvinar nisi. su Do</p>",
"status" : "PLANNED",
"project" : {
"_type" : "project",
"id" : 44,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/44"
}
}
},
"path" : "/sample project/campaign folder/Campaign Test",
"parent" : {
"_type" : "campaign-folder",
"id" : 7,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/7"
}
}
},
"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",
"scheduled_start_date" : "2021-08-31T10:00:00.000+00:00",
"scheduled_end_date" : "2031-09-29T10:00:00.000+00:00",
"actual_start_date" : "2034-09-29T10:00:00.000+00:00",
"actual_end_date" : "2035-09-29T10:00:00.000+00:00",
"actual_start_auto" : false,
"actual_end_auto" : false,
"custom_fields" : [ {
"code" : "CUF_A",
"label" : "Cuf A",
"value" : "value of A"
}, {
"code" : "CUF_B",
"label" : "Cuf B",
"value" : "value of B"
} ],
"iterations" : [ ],
"test_plan" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/332"
}
}
}
Get campaign
A GET
to /campaigns/{id}
returns the campaign with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the campaign |
HTTP request
GET /api/rest/latest/campaigns/112 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2987
{
"_type" : "campaign",
"id" : 112,
"name" : "sample campaign",
"reference" : "SAMP_CAMP",
"description" : "<p>This is a sample campaign.</p>",
"status" : "UNDEFINED",
"project" : {
"_type" : "project",
"id" : 44,
"name" : "sample project",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/44"
}
}
},
"path" : "/sample project/campaign folder/sample campaign",
"parent" : {
"_type" : "campaign-folder",
"id" : 7,
"name" : "campaign folder",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/7"
}
}
},
"created_by" : "User-1",
"created_on" : "2017-07-20T10:00:00.000+00:00",
"last_modified_by" : "User-2",
"last_modified_on" : "2017-07-21T10:00:00.000+00:00",
"scheduled_start_date" : "2017-08-01T10:00:00.000+00:00",
"scheduled_end_date" : "2017-08-31T10:00:00.000+00:00",
"actual_start_date" : "2017-08-01T10:00:00.000+00:00",
"actual_end_date" : "2017-08-31T10:00:00.000+00:00",
"actual_start_auto" : false,
"actual_end_auto" : false,
"custom_fields" : [ {
"code" : "CUF_A",
"label" : "Cuf A",
"value" : "value of A"
}, {
"code" : "CUF_B",
"label" : "Cuf B",
"value" : "value of B"
} ],
"iterations" : [ {
"_type" : "iteration",
"id" : 91,
"name" : "iteration 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/91"
}
}
}, {
"_type" : "iteration",
"id" : 92,
"name" : "iteration 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/92"
}
}
} ],
"test_plan" : [ {
"_type" : "campaign-test-plan-item",
"id" : 41,
"referenced_test_case" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-test-plan-items/41"
}
}
}, {
"_type" : "campaign-test-plan-item",
"id" : 42,
"referenced_test_case" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-test-plan-items/42"
}
}
}, {
"_type" : "campaign-test-plan-item",
"id" : 43,
"referenced_test_case" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-test-plan-items/43"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/112"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/44"
},
"iterations" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/112/iterations"
},
"test-plan" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/112/test-plan"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/112/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of this entity |
|
|
the id of this campaign |
|
|
the name of this campaign |
|
|
the reference of this campaign |
|
|
the description of this campaign |
|
|
the status of this campaign |
|
|
the project of this campaign |
|
|
the path of this campaign |
|
|
the parent entity of this campaign |
|
|
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) |
|
|
actual start date |
|
|
actual end date |
|
|
whether the actual start date is automatically computed |
|
|
whether the actual end date is automatically computed |
|
|
scheduled start date |
|
|
scheduled end date |
|
|
the custom fields of this campaign |
|
|
the iterations of this campaign |
|
|
the test-plan of this campaign |
|
|
the attachments of this campaign |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this campaign |
|
link to the project of this campaign |
|
link to the iterations of this campaign |
|
link to the test plan of this campaign |
|
link to the attachments of this campaign |
Get campaigns by name
A GET
to /campaignsByName
with a given campaignName
returns the campaigns with the given name.
Be careful, both the name of the parameter campaignName
and the value of the campaign name are case-sensitive.
HTTP request
GET /api/rest/latest/campaignsByName/sample%20campaign 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 792
{
"_embedded" : {
"campaigns" : [ {
"_type" : "campaign",
"id" : 41,
"name" : "sample campaign",
"reference" : "SAMP_CAMP_1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/41"
}
}
}, {
"_type" : "campaign",
"id" : 46,
"name" : "sample campaign",
"reference" : "SAMP_CAMP_2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/46"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaignsByName/sample%20campaign?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 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) |
Modify campaign
A Patch
to /campaigns/{id}
modifies the campaign with the given id.
HTTP request
PATCH /api/rest/latest/campaigns/332 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 417
Host: localhost:8080
{
"_type" : "campaign",
"name" : "Campaign Test",
"reference" : "ABCD",
"status" : "IN_PROGRESS",
"description" : "<p>Sed eget rhoncus sapien. Nam et pulvinar nisi. su Do</p>",
"scheduled_start_date" : "2021-08-31T22:00:00.000+00:00",
"scheduled_end_date" : "2031-09-29T22:00:00.000+00:00",
"actual_start_date" : "2034-09-29T22:00:00.000+00:00",
"actual_end_date" : "2035-09-29T22:00:00.000+00:00"
}
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1285
{
"_type" : "campaign",
"id" : 332,
"name" : "Campaign Test",
"reference" : "ABCD",
"description" : "<p>Sed eget rhoncus sapien. Nam et pulvinar nisi. su Do</p>",
"status" : "IN_PROGRESS",
"project" : {
"_type" : "project",
"id" : 44,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/44"
}
}
},
"path" : "/sample project/campaign folder/Campaign Test",
"parent" : {
"_type" : "campaign-folder",
"id" : 7,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/7"
}
}
},
"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",
"scheduled_start_date" : "2021-08-31T10:00:00.000+00:00",
"scheduled_end_date" : "2031-09-29T10:00:00.000+00:00",
"actual_start_date" : "2034-09-29T10:00:00.000+00:00",
"actual_end_date" : "2035-09-29T10:00:00.000+00:00",
"actual_start_auto" : false,
"actual_end_auto" : false,
"custom_fields" : [ ],
"iterations" : [ ],
"test_plan" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/332"
}
}
}
Delete campaign
A DELETE
to /campaigns/{ids}
deletes one or several campaign(s) with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the campaigns |
HTTP request
DELETE /api/rest/latest/campaigns/169,189 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Get iterations of campaign
A GET
to /campaigns/{id}/iterations
returns all the iterations of the campaign with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the campaign |
HTTP request
GET /api/rest/latest/campaigns/36/iterations?size=1&page=1 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2760
{
"_embedded" : {
"iterations" : [ {
"_type" : "iteration",
"id" : 10,
"name" : "sample iteration 1",
"reference" : "SAMP_IT_1",
"description" : "<p>This iteration is a sample one...</p>",
"uuid" : "2f7194ca-eb2e-4379-f82d-ddc207c866bd",
"parent" : {
"_type" : "campaign",
"id" : 36,
"name" : "sample parent campaign",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/36"
}
}
},
"created_by" : "User-1",
"created_on" : "2017-07-21T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-22T10:00:00.000+00:00",
"scheduled_start_date" : null,
"scheduled_end_date" : null,
"actual_start_date" : "2017-08-01T10:00:00.000+00:00",
"actual_end_date" : "2017-08-30T10:00:00.000+00:00",
"actual_start_auto" : false,
"actual_end_auto" : false,
"custom_fields" : [ {
"code" : "CUF_Z",
"label" : "Cuf Z",
"value" : "value of Z"
}, {
"code" : "CUF_Y",
"label" : "Cuf Y",
"value" : "value of Y"
} ],
"test_suites" : [ {
"_type" : "test-suite",
"id" : 88,
"name" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/88"
}
}
}, {
"_type" : "test-suite",
"id" : 11,
"name" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/11"
}
}
}, {
"_type" : "test-suite",
"id" : 14,
"name" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/14"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/10"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/36/iterations?page=0&size=1"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/36/iterations?page=0&size=1"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/36/iterations?page=1&size=1"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/36/iterations?page=2&size=1"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/36/iterations?page=2&size=1"
}
},
"page" : {
"size" : 1,
"totalElements" : 3,
"totalPages" : 3,
"number" : 1
}
}
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 test plans of campaign
A GET
to /campaigns/{id}/test-plan
returns all the test-plans of the campaign with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the campaign |
HTTP request
GET /api/rest/latest/campaigns/64/test-plan?size=2&page=1 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3949
{
"_embedded" : {
"campaign-test-plan-items" : [ {
"_type" : "campaign-test-plan-item",
"id" : 4,
"referenced_test_case" : {
"_type" : "test-case",
"id" : 8,
"name" : "sample test case 8",
"reference" : "TC-8",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/8"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 90,
"name" : "sample dataset 90",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/90"
}
}
},
"assigned_to" : "User-1",
"campaign" : {
"_type" : "campaign",
"id" : 64,
"name" : "sample campaign 64",
"reference" : "SAMP_CAMP_64",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/64"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-test-plan-items/4"
}
}
}, {
"_type" : "campaign-test-plan-item",
"id" : 70,
"referenced_test_case" : {
"_type" : "scripted-test-case",
"id" : 10,
"name" : "sample test case 10",
"reference" : "TC-10",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/10"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 2,
"name" : "sample dataset 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/2"
}
}
},
"assigned_to" : "User-1",
"campaign" : {
"_type" : "campaign",
"id" : 64,
"name" : "sample campaign 64",
"reference" : "SAMP_CAMP_64",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/64"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-test-plan-items/70"
}
}
}, {
"_type" : "campaign-test-plan-item",
"id" : 71,
"referenced_test_case" : {
"_type" : "keyword-test-case",
"id" : 11,
"name" : "sample test case 11",
"reference" : "TC-11",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/11"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 3,
"name" : "sample dataset 3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/3"
}
}
},
"assigned_to" : "User-1",
"campaign" : {
"_type" : "campaign",
"id" : 64,
"name" : "sample campaign 64",
"reference" : "SAMP_CAMP_64",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/64"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-test-plan-items/71"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/64/test-plan?page=0&size=2"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/64/test-plan?page=0&size=2"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/64/test-plan?page=1&size=2"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/64/test-plan?page=1&size=2"
}
},
"page" : {
"size" : 2,
"totalElements" : 4,
"totalPages" : 2,
"number" : 1
}
}
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) |
Campaign Folders
This chapter focuses on services for the campaign folders.
Get all campaign folders
A GET
to /campaign-folders
returns all the campaigns folders that the user is allowed to read.
HTTP request
GET /api/rest/latest/campaign-folders?page=1&size=3 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1390
{
"_embedded" : {
"campaign-folders" : [ {
"_type" : "campaign-folder",
"id" : 100,
"name" : "qualification",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/100"
}
}
}, {
"_type" : "campaign-folder",
"id" : 101,
"name" : "CP-18.01",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/101"
}
}
}, {
"_type" : "campaign-folder",
"id" : 102,
"name" : "DX-U17",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/102"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders?page=0&size=3"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders?page=0&size=3"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders?page=1&size=3"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders?page=2&size=3"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders?page=3&size=3"
}
},
"page" : {
"size" : 3,
"totalElements" : 10,
"totalPages" : 4,
"number" : 1
}
}
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 campaign folders tree by project
A GET
to /campaign-folders/tree/{ids}
returns the campaigns folders tree by projects that the user is allowed to read.
HTTP request
GET /api/rest/latest/campaign-folders/tree/10,11 HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 691
[ {
"_type" : "project",
"id" : 10,
"name" : "project-1",
"folders" : [ {
"_type" : "campaign-folder",
"id" : 100,
"name" : "folder1",
"url" : "http://localhost:8080/api/rest/latest/campaign-folders/100",
"children" : [ ]
}, {
"_type" : "campaign-folder",
"id" : 101,
"name" : "folder2",
"url" : "http://localhost:8080/api/rest/latest/campaign-folders/101",
"children" : [ ]
} ]
}, {
"_type" : "project",
"id" : 11,
"name" : "project-2",
"folders" : [ {
"_type" : "campaign-folder",
"id" : 102,
"name" : "folder3",
"url" : "http://localhost:8080/api/rest/latest/campaign-folders/102",
"children" : [ ]
} ]
} ]
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
id of project |
|
|
name of project |
|
|
all folders for the given project |
|
|
the type of the entity |
|
|
id of the campaign folder |
|
|
name of the campaign folder |
|
|
url of the campaign folder |
|
|
children folders |
Create campaign folder
A POST
to /campaign-folders
creates a new campaign folder. The parent object and the name are required; refer to the complete reference of Get campaign folder for the other attributes.
HTTP request
POST /api/rest/latest/campaign-folders HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 203
Host: localhost:8080
{
"_type" : "campaign-folder",
"name" : "Campaign folder 1",
"custom_fields" : [ {
"code" : "cuf1",
"value" : "Cuf1 Value"
} ],
"parent" : {
"_type" : "project",
"id" : 14
}
}
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1366
{
"_type" : "campaign-folder",
"id" : 33,
"name" : "Campaign folder 1",
"project" : {
"_type" : "project",
"id" : 14,
"name" : "Test Project 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
},
"path" : "/Test Project 1/Campaign folder 1",
"parent" : {
"_type" : "project",
"id" : 14,
"name" : "Test Project 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
},
"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",
"description" : null,
"custom_fields" : [ {
"code" : "cuf1",
"label" : "Lib Cuf1",
"value" : "Cuf1 Value"
}, {
"code" : "cuf2",
"label" : "Lib Cuf2",
"value" : "true"
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/33"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"content" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/33/content"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/33/attachments"
}
}
}
Get campaign folder
A GET
to /campaign-folders/{id}
returns the campaign folder with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the campaign case folder |
HTTP request
GET /api/rest/latest/campaign-folders/24 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1380
{
"_type" : "campaign-folder",
"id" : 24,
"name" : "old",
"project" : {
"_type" : "project",
"id" : 10,
"name" : "Mangrove",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/10"
}
}
},
"path" : "/Mangrove/old",
"parent" : {
"_type" : "project",
"id" : 10,
"name" : "Mangrove",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/10"
}
}
},
"created_by" : "User-1",
"created_on" : "2011-09-30T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-06-16T10:00:00.000+00:00",
"description" : "<p>where all the old campaigns go</p>",
"custom_fields" : [ {
"code" : "CF_TXT",
"label" : "test level",
"value" : "mandatory"
}, {
"code" : "CF_TAGS",
"label" : "see also",
"value" : [ "walking", "bipedal" ]
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/24"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/10"
},
"content" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/24/content"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/24/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the entity |
|
|
the type of the entity |
|
|
name of the entity |
|
|
project of the entity |
|
|
the location of the entity (either a folder or the project if located at the root of the library) |
|
|
the path of the entity |
|
|
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) |
|
|
description of that entity (html) |
|
|
the attachments of that entity |
|
|
related links |
|
|
the custom fields of that campaign folder |
|
|
the label of the custom field |
|
|
the code of the custom field |
|
|
the value of the custom field. The value is either a string (for most custom fields), or an array of strings (for multivalued custom fields eg a tag list) |
Links
Relation | Description |
---|---|
|
the link to this folder |
|
the link to its project |
|
the link to its content |
|
the link to its attachments |
Modify campaign folder
A Patch
to /campaign-folders/{id}
modifies the campaign folder with the given id.
HTTP request
PATCH /api/rest/latest/campaign-folders/33 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 232
Host: localhost:8080
{
"_type" : "campaign-folder",
"name" : "Update - Campaign folder 1",
"description" : "Update - Description Campaign folder 1",
"custom_fields" : [ {
"code" : "cuf2",
"label" : "Cuf-CaC",
"value" : "true"
} ]
}
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1420
{
"_type" : "campaign-folder",
"id" : 33,
"name" : "Update - Campaign folder 1",
"project" : {
"_type" : "project",
"id" : 14,
"name" : "Test Project 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
},
"path" : "/Test Project 1/Update - Campaign folder 1",
"parent" : {
"_type" : "project",
"id" : 14,
"name" : "Test Project 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
},
"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",
"description" : "Update - Description Campaign folder 1",
"custom_fields" : [ {
"code" : "cuf1",
"label" : "Lib Cuf1",
"value" : "Cuf1 Value"
}, {
"code" : "cuf2",
"label" : "Lib Cuf2",
"value" : "true"
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/33"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"content" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/33/content"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/33/attachments"
}
}
}
Delete campaign folder
A DELETE
to /campaign-folders/{ids}
deletes one or several campaign folder with the given id(s). Remember that deleting a folder entails that its content is deleted as well !
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the campaign folders |
HTTP request
DELETE /api/rest/latest/campaign-folders/51,52 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Get campaign folder contents
A GET
to /campaign-folders/{id}/content
returns the contents of the campaign folder with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the campaign-folder |
HTTP request
GET /api/rest/latest/campaign-folders/180/content 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) |
|
level of depth of the content that should be returned (optional), available values : root or nested (more info in Parameter 'include' section) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1021
{
"_embedded" : {
"content" : [ {
"_type" : "campaign",
"id" : 13,
"name" : "non regression",
"reference" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/13"
}
}
}, {
"_type" : "campaign",
"id" : 150,
"name" : "new features",
"reference" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/150"
}
}
}, {
"_type" : "campaign-folder",
"id" : 1467,
"name" : "non-standard environment acceptance tests",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/1467"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/180/content?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 3,
"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 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) |
Campaign Test Plan Items
This chapter focuses on services for the campaign test plan items. A campaign test plan item represents a test case that has been planned in a campaign test plan. It belongs to a campaign and binds together the test case to execute with a dataset (optional) and an assigned user (optional).
Get campaign test plan item
A GET
to /campaign-test-plan-items/{id}
returns the campaign test plan item with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the campaign test plan item |
HTTP request
GET /api/rest/latest/campaign-test-plan-items/89 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1304
{
"_type" : "campaign-test-plan-item",
"id" : 89,
"referenced_test_case" : {
"_type" : "test-case",
"id" : 12,
"name" : "referenced test case 12",
"reference" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/12"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 9,
"name" : "referenced dataset 9",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/9"
}
}
},
"assigned_to" : "User-1",
"campaign" : {
"_type" : "campaign",
"id" : 8,
"name" : "sample campaign 8",
"reference" : "SAMP_CAMP_8",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/8"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-test-plan-items/89"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/7"
},
"test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/12"
},
"dataset" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/9"
},
"campaign" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/8"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of this campaign test plan item |
|
|
the test case associated with this campaign test plan item |
|
|
the dataset associated with this campaign test plan item |
|
|
the user assigned to this campaign test plan item |
|
|
the campaign this campaign test plan item belongs to |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this campaign test plan item |
|
link to the project of this item |
|
link to the test case referenced by this item |
|
link to the dataset referenced by this item |
|
link to the campaign this item belongs to |
Create campaign test plan item
A POST
to /campaign/{id}/test-plan
creates a new entry in the test plan of the campaign with the given id. The entry must
reference a test case, and optionally for which dataset and which assignee. If specified, the dataset must belong
to the referenced Test Case. The dataset and/or assignee may be undefined or null if you don’t want to set them yet.
Path parameters
Parameter | Description |
---|---|
|
the id of the campaign |
HTTP request
POST /api/rest/latest/campaign/45/test-plan HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 193
Host: localhost:8080
{
"_type" : "campaign-test-plan-item",
"test_case" : {
"_type" : "test-case",
"id" : 238
},
"dataset" : {
"_type" : "dataset",
"id" : 6
},
"assigned_to" : "User-1"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the test case to include in the test plan (as described below) |
|
|
the type of the entity (always 'test-case') |
|
|
the id of the test case |
|
|
the dataset to be used when the test case will be executed (optional) |
|
|
the type of the entity (always 'dataset') |
|
|
the id of the dataset. Remember that the dataset must belong to the planned test case. |
|
|
the username of the user assigned to this test case (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1292
{
"_type" : "campaign-test-plan-item",
"id" : 15,
"referenced_test_case" : {
"_type" : "test-case",
"id" : 238,
"name" : "Test-Case 1",
"reference" : "Ref Test-Case 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 6,
"name" : "JD-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/6"
}
}
},
"assigned_to" : "User-1",
"campaign" : {
"_type" : "campaign",
"id" : 45,
"name" : "AKM - Campaign Test",
"reference" : "ABCD",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/45"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-test-plan-items/15"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/2"
},
"test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238"
},
"dataset" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/6"
},
"campaign" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/45"
}
}
}
Modify campaign test plan item
A Patch
to /campaign-test-plan-items/{id}
modifies the campaign test plan item with the given id. You can modify dataset or assigned_to or both. A property left absent from the json payload will not be altered, if present with a null value they will be reset. You cannot change the planned test case.
Path parameters
Parameter | Description |
---|---|
|
the id of the campaign test plan item |
HTTP request
PATCH /api/rest/latest/campaign-test-plan-items/13 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 128
Host: localhost:8080
{
"_type" : "campaign-test-plan-item",
"dataset" : {
"_type" : "dataset",
"id" : 6
},
"assigned_to" : "User-1"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the dataset to use when the test case is executed (optional). You can remove the dataset by setting this to null. |
|
|
the type of the entity ('dataset') |
|
|
the id of this dataset |
|
|
the username of the user assigned to this test (optional). You can assign this test to nobody by setting this to null. |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1292
{
"_type" : "campaign-test-plan-item",
"id" : 13,
"referenced_test_case" : {
"_type" : "test-case",
"id" : 238,
"name" : "Test-Case 1",
"reference" : "Ref Test-Case 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 6,
"name" : "JD-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/6"
}
}
},
"assigned_to" : "User-1",
"campaign" : {
"_type" : "campaign",
"id" : 45,
"name" : "AKM - Campaign Test",
"reference" : "ABCD",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/45"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-test-plan-items/13"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/2"
},
"test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238"
},
"dataset" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/6"
},
"campaign" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/45"
}
}
}
Delete campaign test plan item
A DELETE
to /campaign-test-plan-items/{testPlanItemsIds}
deletes one or several campaign test plan items with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the campaign test plan items |
HTTP request
DELETE /api/rest/latest/campaign-test-plan-items/44,43 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Datasets
This chapter focuses on services for the datasets.
Get dataset
A GET
to /datasets/{id}
returns the dataset with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the dataset |
HTTP request
GET /api/rest/latest/datasets/7 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 841
{
"_type" : "dataset",
"id" : 7,
"name" : "sample dataset",
"parameters" : [ {
"_type" : "parameter",
"id" : 1,
"name" : "param_1"
}, {
"_type" : "parameter",
"id" : 2,
"name" : "param_2"
} ],
"parameter_values" : [ {
"parameter_test_case_id" : 9,
"parameter_value" : "login_1",
"parameter_name" : "param_1",
"parameter_id" : 1
}, {
"parameter_test_case_id" : 9,
"parameter_value" : "password_1",
"parameter_name" : "param_2",
"parameter_id" : 2
} ],
"test_case" : {
"_type" : "test-case",
"id" : 9,
"name" : "login test",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/9"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/7"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the dataset |
|
|
the type of the entity |
|
|
the name of the dataset |
|
|
the parameters of the dataset |
|
|
the parameter values of the dataset |
|
|
the test case this dataset belongs to |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this dataset |
Create dataset
A POST
to /datasets
creates a new dataset.
HTTP request
POST /api/rest/latest/datasets HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 419
Host: localhost:8080
{
"_type" : "dataset",
"name" : "sample dataset",
"parameter_values" : [ {
"parameter_test_case_id" : 238,
"parameter_value" : "login_1",
"parameter_name" : "param_1",
"parameter_id" : 1
}, {
"parameter_test_case_id" : 238,
"parameter_value" : "password_1",
"parameter_name" : "param_2",
"parameter_id" : 2
} ],
"test_case" : {
"_type" : "test-case",
"id" : 238
}
}
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 873
{
"_type" : "dataset",
"id" : 23,
"name" : "sample dataset",
"parameters" : [ {
"_type" : "parameter",
"id" : 1
}, {
"_type" : "parameter",
"id" : 2
} ],
"parameter_values" : [ {
"parameter_test_case_id" : 238,
"parameter_value" : "login_1",
"parameter_name" : "param_1",
"parameter_id" : 1
}, {
"parameter_test_case_id" : 238,
"parameter_value" : "password_1",
"parameter_name" : "param_2",
"parameter_id" : 2
} ],
"test_case" : {
"_type" : "test-case",
"id" : 238,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/23"
},
"test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238"
}
}
}
Modify dataset
A Patch
to /datasets/{id}
modifies the dataset with the given id. You can modify name or parameter values or the both.
Path parameters
Parameter | Description |
---|---|
|
the id of the dataset |
HTTP request
PATCH /api/rest/latest/datasets/2 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 190
Host: localhost:8080
{
"_type" : "dataset",
"name" : "modified data sample",
"parameter_values" : [ {
"parameter_value" : "new_login_1",
"parameter_name" : "param_1",
"parameter_id" : 1
} ]
}
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 698
{
"_type" : "dataset",
"id" : 23,
"name" : "modified data sample",
"parameters" : [ {
"_type" : "parameter",
"id" : 1
} ],
"parameter_values" : [ {
"parameter_test_case_id" : 238,
"parameter_value" : "new_login_1",
"parameter_name" : "param_1",
"parameter_id" : 1
} ],
"test_case" : {
"_type" : "test-case",
"id" : 238,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/23"
},
"test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238"
}
}
}
Delete dataset
A DELETE
to /datasets/{id}
deletes one or several datasets with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the dataset |
HTTP request
DELETE /api/rest/latest/datasets/44 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Executions
This chapter focuses on services for the executions.
Updates from version 1.2.0:
-
There are 3 types of execution: standard, scripted and keyword.
-
The "script" property is from now available only for scripted execution.
-
There is no longer "language" property in execution. The language for scripted execution is always GHERKIN while there is no defined language for standard and keyword executions.
Get execution
A GET
to /executions/{id}
returns the execution with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the execution |
HTTP request
GET /api/rest/latest/executions/56 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3101
{
"_type" : "execution",
"id" : 56,
"name" : "sample test case 56",
"execution_order" : 4,
"execution_status" : "BLOCKED",
"last_executed_by" : "User-5",
"last_executed_on" : "2017-07-24T10:00:00.000+00:00",
"execution_mode" : "AUTOMATED",
"reference" : "SAMP_EXEC_56",
"dataset_label" : "sample dataset",
"execution_steps" : [ {
"_type" : "execution-step",
"id" : 22,
"execution_status" : "SUCCESS",
"action" : "<p>First action</p>",
"expected_result" : "<p>First result</p>",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/execution-steps/22"
}
}
}, {
"_type" : "execution-step",
"id" : 23,
"execution_status" : "BLOCKED",
"action" : "<p>Second action</p>",
"expected_result" : "<p>Second result</p>",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/execution-steps/23"
}
}
}, {
"_type" : "execution-step",
"id" : 27,
"execution_status" : "SUCCESS",
"action" : "<p>The Action</p>",
"expected_result" : "<p>The Result</p>",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/execution-steps/27"
}
}
} ],
"comment" : "<p>I have no comment</p>",
"prerequisite" : "<p>Being alive.</p>",
"description" : "<p>This is nice.</p>",
"importance" : "LOW",
"nature" : {
"code" : "NAT_SECURITY_TESTING"
},
"type" : {
"code" : "TYP_EVOLUTION_TESTING"
},
"test_case_status" : "APPROVED",
"test_plan_item" : {
"_type" : "iteration-test-plan-item",
"id" : 15,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/15"
}
}
},
"automated_execution_extender" : {
"_type" : "automated-execution-extender",
"id" : 778,
"result_url" : "http://1234:4567/jenkins/report",
"result_status" : "BLOCKED",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-execution-extenders/778"
}
}
},
"custom_fields" : [ {
"code" : "CUF_TXT",
"label" : "cuf text",
"value" : "cuf text value"
}, {
"code" : "CUF_TXT_2",
"label" : "cuf text 2",
"value" : "cuf text value 2"
} ],
"test_case_custom_fields" : [ {
"code" : "TC_CUF_TXT",
"label" : "tc cuf text",
"value" : "tc cuf text value"
}, {
"code" : "TC_CUF_TXT_2",
"label" : "tc cuf text 2",
"value" : "tc cuf text value 2"
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/56"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/87"
},
"test_plan_item" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/15"
},
"execution-steps" : {
"href" : "http://localhost:8080/api/rest/latest/executions/56/execution-steps"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/executions/56/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the execution |
|
|
the name of the execution |
|
|
the order of the execution |
|
|
the status of the execution |
|
|
the user who last executed this execution |
|
|
the date this execution was last executed |
|
|
the execution mode of the execution |
|
|
the reference of this execution |
|
|
the label of the dataset used in this execution |
|
|
the steps of this execution |
|
|
the comment of this execution |
|
|
the prerequisite of this execution |
|
|
the description of this execution |
|
|
the importance of this execution |
|
|
the nature of this execution |
|
|
the type of this execution |
|
|
the status of the test case referenced by this execution |
|
|
the test plan item referenced by this execution |
|
|
the automated execution extender referenced by this execution (will be hidden if execution mode is manual) |
|
|
the denormalized custom fields of this execution |
|
|
the custom fields of the referenced test case |
|
|
the attachments of this execution |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this execution |
|
link to the project of this execution |
|
link to the test plan item of this execution |
|
link to the execution steps of this execution |
|
link to the attachments of this execution |
Create execution for iteration test plan item
A POST
to /iteration-test-plan-items/{id}/executions
creates a new execution for the iteration test plan item with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the test plan element |
HTTP request
POST /api/rest/latest/iteration-test-plan-items/265/executions HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 2206
{
"_type" : "execution",
"id" : 25,
"name" : "Christmas turkey test flight",
"execution_order" : 0,
"execution_status" : "READY",
"last_executed_by" : null,
"last_executed_on" : null,
"execution_mode" : "MANUAL",
"reference" : "CHR-T024",
"dataset_label" : "",
"execution_steps" : [ {
"_type" : "execution-step",
"id" : 50,
"execution_status" : "READY",
"action" : "<p>arm the slingshot</p>",
"expected_result" : "<p>slingshot is armed</p>",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/execution-steps/50"
}
}
}, {
"_type" : "execution-step",
"id" : 51,
"execution_status" : "READY",
"action" : "<p>install the turkey</p>",
"expected_result" : "<p>the turkey groans and is in place</p>",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/execution-steps/51"
}
}
}, {
"_type" : "execution-step",
"id" : 52,
"execution_status" : "READY",
"action" : "<p>release the slingshot</p>",
"expected_result" : "<p>the turkey groans, at a distance though</p>",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/execution-steps/52"
}
}
} ],
"comment" : null,
"prerequisite" : "",
"description" : "<p>Will test the aerodynamic profile of a sample turkey</p>",
"importance" : "LOW",
"nature" : {
"code" : "NAT_PERFORMANCE_TESTING"
},
"type" : {
"code" : "TYP_COMPLIANCE_TESTING"
},
"test_case_status" : "WORK_IN_PROGRESS",
"custom_fields" : [ ],
"test_case_custom_fields" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/25"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"test_plan_item" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/1"
},
"execution-steps" : {
"href" : "http://localhost:8080/api/rest/latest/executions/25/execution-steps"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/executions/25/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity, etc |
Links
Relation | Description |
---|---|
|
the link to this execution |
|
the link to the execution project |
|
the test plan item of this execution |
|
the link to the execution steps |
|
the attachments to the test plan element |
Modify an execution
A PATCH
to /executions/{id}
modifies the execution with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the execution |
HTTP request
PATCH /api/rest/latest/executions/83?fields=execution_status,comment,prerequisite,%20custom_fields,%20test_case_custom_fields HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 347
Host: localhost:8080
{
"_type" : "execution",
"custom_fields" : [ {
"code" : "TXT_STATUS",
"value" : "allright"
}, {
"code" : "TAGS_RELATED",
"value" : [ "see this", "also that" ]
} ],
"execution_status" : "RUNNING",
"comment" : "<p>the comment was modified...</p>",
"prerequisite" : "<p>impossible modification of the prerequisite</p>"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the new status of that execution |
|
|
the new comment of the execution |
|
|
an array of custom fields |
|
|
the code of the custom field to modify |
|
|
the value of the custom field. It should match the type of the field (text, date etc). If the field accepts only a single value the content is a string, if it accepts multiple values (eg, tags) the content is an array of strings. |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1176
{
"_type" : "execution",
"id" : 83,
"execution_status" : "RUNNING",
"comment" : "<p>the comment was modified...</p>",
"prerequisite" : "<p>... but the prerequisite was not</p>",
"custom_fields" : [ {
"code" : "TXT_STATUS",
"label" : "text",
"value" : "allright"
}, {
"code" : "TAGS_RELATED",
"label" : "see also",
"value" : [ "see this", "also that" ]
} ],
"test_case_custom_fields" : [ {
"code" : "TC_TEXT",
"label" : "test case cuf",
"value" : "I'm from the test case"
}, {
"code" : "TC_LABELS",
"label" : "labels",
"value" : [ "was", "not", "updated" ]
} ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/83"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"test_plan_item" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/1"
},
"execution-steps" : {
"href" : "http://localhost:8080/api/rest/latest/executions/83/execution-steps"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/executions/83/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity, etc |
Links
Relation | Description |
---|---|
|
the link to this execution |
|
the link to the execution project |
|
the link to the test plan item of this execution |
|
the link to the execution steps |
|
the link to the attachments |
Delete an execution
A DELETE
to /executions/{id}
delete one execution with the given id.
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the execution |
HTTP request
DELETE /api/rest/latest/executions/44 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Get steps of execution
A GET
to /executions/{id}/execution-steps
returns all the execution steps of the execution with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the execution |
HTTP request
GET /api/rest/latest/executions/10/execution-steps?size=1&page=1 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1918
{
"_embedded" : {
"execution-steps" : [ {
"_type" : "execution-step",
"id" : 10,
"execution_status" : "SUCCESS",
"action" : "<p>This is the first action.</p>",
"expected_result" : "<p>This is the first result.</p>",
"comment" : "<p>And that is the comment</p>",
"last_executed_by" : "User-8U122",
"last_executed_on" : "2017-07-31T10:00:00.000+00:00",
"execution_step_order" : 0,
"referenced_test_step" : null,
"execution" : {
"_type" : "execution",
"id" : 7,
"execution_status" : "SUCCESS",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/7"
}
}
},
"custom_fields" : [ {
"code" : "CUF_TAG",
"label" : "Tag Cuf",
"value" : [ "tag_1", "tag_2", "tag_3" ]
} ],
"test_step_custom_fields" : [ {
"code" : "CUF_TXT",
"label" : "Basic Text Cuf",
"value" : "The Value"
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/execution-steps/10"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/executions/10/execution-steps?page=0&size=1"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/executions/10/execution-steps?page=0&size=1"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/10/execution-steps?page=1&size=1"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/executions/10/execution-steps?page=2&size=1"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/executions/10/execution-steps?page=2&size=1"
}
},
"page" : {
"size" : 1,
"totalElements" : 3,
"totalPages" : 3,
"number" : 1
}
}
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) |
Attach issue to an execution
A POST
to /executions/{id}/issues
attach an issue to an execution with given id. The identifier of the remote issue must be specified; however the bugtracker on which it is hosted is implied by the configuration of the Squash-TM project of the execution.
The actual format of the remote identifier depends on the type of bugtracker you are referencing. For example for issues hosted on Mantis the remote identifier is the ID, while for JIRA the remote identifier is the issue key. You can verify which format is expected in Squash-TM by testing first with the UI, eg in the table of known issues of an iteration.
Note that you cannot declare a new issue this way - post it straight to the bugtracker instead !
Path parameters
Parameter | Description |
---|---|
|
the id of the execution |
HTTP request
POST /api/rest/latest/executions/15/issues HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 51
Host: localhost:8080
{
"_type" : "issue",
"remoteIssueId" : "9999"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the identifier of the issue |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 354
{
"_type" : "issue",
"id" : 30,
"remoteIssueId" : "9999",
"execution" : {
"_type" : "execution",
"id" : 15,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/15"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/issues/30"
}
}
}
Execution Steps
This chapter focuses on services for the execution steps.
Get execution step
A GET
to /execution-steps/{id}
returns the execution step with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the execution step |
HTTP request
GET /api/rest/latest/execution-steps/6 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1432
{
"_type" : "execution-step",
"id" : 6,
"execution_status" : "BLOCKED",
"action" : "<p>Click the button</p>",
"expected_result" : "<p>The page shows up</p>",
"comment" : "<p>This is quite simple.</p>",
"last_executed_by" : "User-J9",
"last_executed_on" : "2015-04-26T10:00:00.000+00:00",
"execution_step_order" : 1,
"referenced_test_step" : {
"_type" : "action-step",
"id" : 2,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/2"
}
}
},
"execution" : {
"_type" : "execution",
"id" : 3,
"execution_status" : "BLOCKED",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/3"
}
}
},
"custom_fields" : [ {
"code" : "CUF_TAG",
"label" : "Tag Cuf",
"value" : [ "tag_1", "tag_2", "tag_3" ]
} ],
"test_step_custom_fields" : [ {
"code" : "CUF_TXT",
"label" : "Basic Text Cuf",
"value" : "The Value"
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/execution-steps/6"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/10"
},
"execution" : {
"href" : "http://localhost:8080/api/rest/latest/executions/3"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/execution-steps/6/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the execution step |
|
|
the status of this execution step |
|
|
the action to be accomplished, format is html |
|
|
the state or behavior that should be observable when the action has been performed, format is html) |
|
|
the comment left after executing the step |
|
|
the date this execution step was last executed |
|
|
the user who last executed this execution |
|
|
the order of the step in the execution |
|
|
the test step referenced by this execution step |
|
|
the execution this step belongs to |
|
|
the custom fields of this execution step |
|
|
the denormalized custom fields of the referenced test step |
|
|
the attachments of the this step |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this execution step |
|
link to the project of this execution step |
|
link to the execution of this execution step |
|
link to the attachments of this execution step |
Modify status of execution step
A PATCH
to /execution-steps/{id}/execution-status/{status}
modifies the execution status of the execution step with the given id to the given status.
Path parameters
Parameter | Description |
---|---|
|
the id of the execution step |
|
the new status of that execution step (success, blocked, ready, running, error, failure, not-found, not-run, settled, untestable or warning) |
HTTP request
PATCH /api/rest/latest/execution-steps/6/execution-status/Success HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1318
{
"_type" : "execution-step",
"id" : 6,
"execution_status" : "SUCCESS",
"action" : "<p>Click the button</p>",
"expected_result" : "<p>The page shows up</p>",
"comment" : "<p>This is quite simple.</p>",
"last_executed_by" : "User-J9",
"last_executed_on" : "2015-04-26T10:00:00.000+00:00",
"execution_step_order" : 1,
"referenced_test_step" : {
"_type" : "action-step",
"id" : 2,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/2"
}
}
},
"execution" : {
"_type" : "execution",
"id" : 3,
"execution_status" : "BLOCKED",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/3"
}
}
},
"custom_fields" : [ {
"code" : "CUF_TAG",
"label" : "Tag Cuf",
"value" : [ "tag_1", "tag_2", "tag_3" ]
} ],
"test_step_custom_fields" : [ {
"code" : "CUF_TXT",
"label" : "Basic Text Cuf",
"value" : "The Value"
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/execution-steps/6"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/10"
},
"execution" : {
"href" : "http://localhost:8080/api/rest/latest/executions/3"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the execution step |
|
|
the status of this execution step |
|
|
the action to be accomplished, format is html |
|
|
the state or behavior that should be observable when the action has been performed, format is html) |
|
|
the comment left after executing the step |
|
|
the date this execution step was last executed |
|
|
the user who last executed this execution |
|
|
the order of the step in the execution |
|
|
the test step referenced by this execution step |
|
|
the execution this step belongs to |
|
|
the custom fields of this execution step |
|
|
the denormalized custom fields of the referenced test step |
|
|
the attachments of the test step |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this execution step |
|
link to the project of this execution step |
|
link to the execution of this execution step |
Modify an execution step
A PATCH
to /execution-steps/{id}
modifies the execution step with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the execution step |
HTTP request
PATCH /api/rest/latest/execution-steps/6 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 180
Host: localhost:8080
{
"_type" : "execution-step",
"comment" : "<p>Updated comment.</p>",
"custom_fields" : [ {
"code" : "TXT_STATUS",
"value" : "Updated execution step CUF value"
} ]
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the new comment of the execution step |
|
|
an array of custom fields |
|
|
the code of the custom field to modify |
|
|
the value of the custom field. It should match the type of the field (text, date etc). If the field accepts only a single value the content is a string, if it accepts multiple values (eg, tags) the content is an array of strings. |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1377
{
"_type" : "execution-step",
"id" : 6,
"execution_status" : "SUCCESS",
"action" : "<p>Click the button</p>",
"expected_result" : "<p>The page shows up</p>",
"comment" : "<p>Updated comment.</p>",
"last_executed_by" : "User-J9",
"last_executed_on" : "2015-04-26T10:00:00.000+00:00",
"execution_step_order" : 1,
"referenced_test_step" : null,
"execution" : {
"_type" : "execution",
"id" : 3,
"execution_status" : "BLOCKED",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/3"
}
}
},
"custom_fields" : [ {
"code" : "TXT_STATUS",
"label" : "text",
"value" : "Updated execution step CUF value"
}, {
"code" : "TAGS_RELATED",
"label" : "see also",
"value" : [ "see this", "also that" ]
} ],
"test_step_custom_fields" : [ {
"code" : "TC_TEXT",
"label" : "test case cuf",
"value" : "Updated test case step value"
}, {
"code" : "TC_LABELS",
"label" : "labels",
"value" : [ "was", "not", "updated" ]
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/execution-steps/6"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/10"
},
"execution" : {
"href" : "http://localhost:8080/api/rest/latest/executions/3"
}
}
}
Iterations
This chapter focuses on services for iterations.
Create iteration
A POST
to /campaigns/{campaignId}/iterations
creates a new iteration.
HTTP request
POST /api/rest/latest/campaigns/2/iterations HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 576
Host: localhost:8080
{
"_type" : "iteration",
"name" : "new iteration",
"reference" : "NEW_IT",
"description" : "<p>A new iteration</p>",
"parent" : {
"_type" : "campaign",
"id" : 2
},
"scheduled_start_date" : "2017-04-09T22:00:00.000+00:00",
"scheduled_end_date" : "2017-04-14T23:00:00.000+00:00",
"actual_start_date" : "2017-04-10T22:00:00.000+00:00",
"actual_end_date" : "2017-04-15T22:00:00.000+00:00",
"actual_start_auto" : false,
"actual_end_auto" : true,
"custom_fields" : [ {
"code" : "CUF_A",
"label" : "Cuf A",
"value" : "value of A"
} ]
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the name of the iteration |
|
|
the reference of the iteration |
|
|
the description of the iteration |
|
|
the parent campaign of this iteration |
|
|
actual start date |
|
|
actual end date |
|
|
whether the actual start date is automatically computed |
|
|
whether the actual end date is automatically computed |
|
|
scheduled start date |
|
|
scheduled end date |
|
|
the custom fields of this iteration |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1613
{
"_type" : "iteration",
"id" : 22,
"name" : "new iteration",
"reference" : "NEW_IT",
"description" : "<p>A new iteration</p>",
"uuid" : "2f7194ca-eb2e-4379-f82d-ddc207c866bd",
"parent" : {
"_type" : "campaign",
"id" : 2,
"name" : "parent campaign",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/2"
}
}
},
"created_by" : "User-A",
"created_on" : "2017-04-07T10:00:00.000+00:00",
"last_modified_by" : "User-A",
"last_modified_on" : "2017-04-07T10:00:00.000+00:00",
"scheduled_start_date" : "2017-04-09T10:00:00.000+00:00",
"scheduled_end_date" : "2017-04-14T10:00:00.000+00:00",
"actual_start_date" : "2017-04-10T10:00:00.000+00:00",
"actual_end_date" : "2017-04-15T10:00:00.000+00:00",
"actual_start_auto" : false,
"actual_end_auto" : true,
"custom_fields" : [ {
"code" : "CUF",
"label" : "cuf",
"value" : "value"
} ],
"test_suites" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/22"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/4"
},
"campaign" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/2"
},
"test-suites" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/22/test-suites"
},
"test-plan" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/22/test-plan"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/22/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of this entity |
|
|
the id of this iteration |
|
|
the name of this iteration |
|
|
the reference of this iteration |
|
|
the description of this iteration |
|
|
the uuid of this iteration |
|
|
the parent campaign of this iteration |
|
|
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) |
|
|
actual start date |
|
|
actual end date |
|
|
whether the actual start date is automatically computed |
|
|
whether the actual end date is automatically computed |
|
|
scheduled start date |
|
|
scheduled end date |
|
|
the custom fields of this iteration |
|
|
the test-suites of this iteration |
|
|
the attachments of this iteration |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this iteration |
|
link to the project of this iteration |
|
link to the campaign of this iteration |
|
link to the test suites of this iteration |
|
link to the test plan of this iteration |
|
link to the attachments of this iteration |
Get iteration
A GET
to /iterations/{id}
returns the iteration with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the iteration |
HTTP request
GET /api/rest/latest/iterations/22 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2003
{
"_type" : "iteration",
"id" : 22,
"name" : "sample iteration",
"reference" : "SAMP_IT",
"description" : "<p>A sample iteration</p>",
"uuid" : "2f7194ca-eb2e-4379-f82d-ddc207c866bd",
"parent" : {
"_type" : "campaign",
"id" : 2,
"name" : "sample campaign",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/2"
}
}
},
"created_by" : "User-A",
"created_on" : "2017-04-07T10:00:00.000+00:00",
"last_modified_by" : "User-B",
"last_modified_on" : "2017-04-15T10:00:00.000+00:00",
"scheduled_start_date" : "2017-04-09T10:00:00.000+00:00",
"scheduled_end_date" : "2017-04-14T10:00:00.000+00:00",
"actual_start_date" : "2017-04-10T10:00:00.000+00:00",
"actual_end_date" : "2017-04-15T10:00:00.000+00:00",
"actual_start_auto" : false,
"actual_end_auto" : true,
"custom_fields" : [ {
"code" : "CUF",
"label" : "cuf",
"value" : "value"
} ],
"test_suites" : [ {
"_type" : "test-suite",
"id" : 1,
"name" : "Suite_1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/1"
}
}
}, {
"_type" : "test-suite",
"id" : 2,
"name" : "Suite_2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/2"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/22"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/4"
},
"campaign" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/2"
},
"test-suites" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/22/test-suites"
},
"test-plan" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/22/test-plan"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/22/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of this entity |
|
|
the id of this iteration |
|
|
the name of this iteration |
|
|
the reference of this iteration |
|
|
the description of this iteration |
|
|
the uuid of this iteration |
|
|
the parent campaign of this iteration |
|
|
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) |
|
|
actual start date |
|
|
actual end date |
|
|
whether the actual start date is automatically computed |
|
|
whether the actual end date is automatically computed |
|
|
scheduled start date |
|
|
scheduled end date |
|
|
the custom fields of this iteration |
|
|
the test-suites of this iteration |
|
|
the attachments of this iteration |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this iteration |
|
link to the project of this iteration |
|
link to the campaign of this iteration |
|
link to the test suites of this iteration |
|
link to the test plan of this iteration |
|
link to the attachments of this iteration |
Get iteration by name
A GET
to /iterations
with a request parameter iterationName
returns the iteration with the given name.
Be careful, both the name of the parameter iterationName
and the value of the iteration name are case-sensitive.
HTTP request
GET /api/rest/latest/iterations?iterationName=sample+iteration HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
the name of the iteration |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2003
{
"_type" : "iteration",
"id" : 22,
"name" : "sample iteration",
"reference" : "SAMP_IT",
"description" : "<p>A sample iteration</p>",
"uuid" : "2f7194ca-eb2e-4379-f82d-ddc207c866bd",
"parent" : {
"_type" : "campaign",
"id" : 2,
"name" : "sample campaign",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/2"
}
}
},
"created_by" : "User-A",
"created_on" : "2017-04-07T10:00:00.000+00:00",
"last_modified_by" : "User-B",
"last_modified_on" : "2017-04-15T10:00:00.000+00:00",
"scheduled_start_date" : "2017-04-09T10:00:00.000+00:00",
"scheduled_end_date" : "2017-04-14T10:00:00.000+00:00",
"actual_start_date" : "2017-04-10T10:00:00.000+00:00",
"actual_end_date" : "2017-04-15T10:00:00.000+00:00",
"actual_start_auto" : false,
"actual_end_auto" : true,
"custom_fields" : [ {
"code" : "CUF",
"label" : "cuf",
"value" : "value"
} ],
"test_suites" : [ {
"_type" : "test-suite",
"id" : 1,
"name" : "Suite_1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/1"
}
}
}, {
"_type" : "test-suite",
"id" : 2,
"name" : "Suite_2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/2"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/22"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/4"
},
"campaign" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/2"
},
"test-suites" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/22/test-suites"
},
"test-plan" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/22/test-plan"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/22/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of this entity |
|
|
the id of this iteration |
|
|
the name of this iteration |
|
|
the reference of this iteration |
|
|
the description of this iteration |
|
|
the uuid of this iteration |
|
|
the parent campaign of this iteration |
|
|
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) |
|
|
actual start date |
|
|
actual end date |
|
|
whether the actual start date is automatically computed |
|
|
whether the actual end date is automatically computed |
|
|
scheduled start date |
|
|
scheduled end date |
|
|
the custom fields of this iteration |
|
|
the test-suites of this iteration |
|
|
the attachments of this iteration |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this iteration |
|
link to the project of this iteration |
|
link to the campaign of this iteration |
|
link to the test suites of this iteration |
|
link to the test plan of this iteration |
|
link to the attachments of this iteration |
Modify iteration
A PATCH
to /iterations/{id}
modifies the iteration with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the iteration |
HTTP request
PATCH /api/rest/latest/iterations/332 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 481
Host: localhost:8080
{
"_type" : "patched iteration",
"name" : "new iteration",
"reference" : "NEW_IT",
"description" : "<p>A new iteration</p>",
"parent" : {
"_type" : "campaign",
"id" : 2
},
"scheduled_start_date" : "2017-04-09T22:00:00.000+00:00",
"scheduled_end_date" : "2017-04-14T23:00:00.000+00:00",
"actual_start_date" : "2017-04-10T22:00:00.000+00:00",
"actual_end_date" : "2017-04-15T22:00:00.000+00:00",
"actual_start_auto" : false,
"actual_end_auto" : true
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the name of the iteration |
|
|
the reference of the iteration |
|
|
the description of the iteration |
|
|
the parent campaign of this iteration |
|
|
actual start date |
|
|
actual end date |
|
|
whether the actual start date is automatically computed |
|
|
whether the actual end date is automatically computed |
|
|
scheduled start date |
|
|
scheduled end date |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1548
{
"_type" : "iteration",
"id" : 22,
"name" : "patched iteration",
"reference" : "NEW_IT",
"description" : "<p>A new iteration</p>",
"uuid" : "2f7194ca-eb2e-4379-f82d-ddc207c866bd",
"parent" : {
"_type" : "campaign",
"id" : 2,
"name" : "parent campaign",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/2"
}
}
},
"created_by" : "User-A",
"created_on" : "2017-04-07T10:00:00.000+00:00",
"last_modified_by" : "User-B",
"last_modified_on" : "2017-04-15T10:00:00.000+00:00",
"scheduled_start_date" : "2017-04-09T10:00:00.000+00:00",
"scheduled_end_date" : "2017-04-14T10:00:00.000+00:00",
"actual_start_date" : "2017-04-10T10:00:00.000+00:00",
"actual_end_date" : "2017-04-15T10:00:00.000+00:00",
"actual_start_auto" : false,
"actual_end_auto" : true,
"custom_fields" : [ ],
"test_suites" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/22"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/4"
},
"campaign" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/2"
},
"test-suites" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/22/test-suites"
},
"test-plan" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/22/test-plan"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/22/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of this entity |
|
|
the id of this iteration |
|
|
the name of this iteration |
|
|
the reference of this iteration |
|
|
the description of this iteration |
|
|
the uuid of this iteration |
|
|
the parent campaign of this iteration |
|
|
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) |
|
|
actual start date |
|
|
actual end date |
|
|
whether the actual start date is automatically computed |
|
|
whether the actual end date is automatically computed |
|
|
scheduled start date |
|
|
scheduled end date |
|
|
the custom fields of this iteration |
|
|
the test-suites of this iteration |
|
|
the attachments of this iteration |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this iteration |
|
link to the project of this iteration |
|
link to the campaign of this iteration |
|
link to the test suites of this iteration |
|
link to the test plan of this iteration |
|
link to the attachments of this iteration |
Get test plans of an iteration
A GET
to /iterations/{id}/test-plan
returns the test plans of the iteration with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the iteration |
HTTP request
GET /api/rest/latest/iterations/1/test-plan?size=2&page=1 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 6579
{
"_embedded" : {
"test-plan" : [ {
"_type" : "iteration-test-plan-item",
"id" : 4,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 8,
"name" : "sample test case 8",
"reference" : "TC-8",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/8"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 90,
"name" : "sample dataset 90",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/90"
}
}
},
"last_executed_by" : "User-1",
"last_executed_on" : "2017-06-25T10:00:00.000+00:00",
"assigned_to" : "User-1",
"executions" : [ {
"_type" : "execution",
"id" : 2,
"execution_status" : "BLOCKED",
"last_executed_by" : "User-1",
"last_executed_on" : "2017-06-24T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/2"
}
}
}, {
"_type" : "execution",
"id" : 3,
"execution_status" : "SUCCESS",
"last_executed_by" : "User-1",
"last_executed_on" : "2017-06-25T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/3"
}
}
} ],
"iteration" : {
"_type" : "iteration",
"id" : 1,
"name" : "sample iteration",
"reference" : "IT1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/4"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 12,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "scripted-test-case",
"id" : 16,
"name" : "scripted test case 16",
"reference" : "TC-16",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/16"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 12,
"name" : "sample dataset 12",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/12"
}
}
},
"last_executed_by" : "User-1",
"last_executed_on" : "2017-06-28T10:00:00.000+00:00",
"assigned_to" : "User-1",
"executions" : [ {
"_type" : "scripted-execution",
"id" : 9,
"execution_status" : "FAILURE",
"last_executed_by" : "User-1",
"last_executed_on" : "2017-06-26T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/9"
}
}
}, {
"_type" : "scripted-execution",
"id" : 35,
"execution_status" : "SUCCESS",
"last_executed_by" : "User-1",
"last_executed_on" : "2017-06-28T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/35"
}
}
} ],
"iteration" : {
"_type" : "iteration",
"id" : 1,
"name" : "sample iteration",
"reference" : "IT1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/12"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 13,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "keyword-test-case",
"id" : 17,
"name" : "keyword test case 17",
"reference" : "TC-17",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/17"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 13,
"name" : "sample dataset 13",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/13"
}
}
},
"last_executed_by" : "User-1",
"last_executed_on" : "2017-06-28T10:00:00.000+00:00",
"assigned_to" : "User-1",
"executions" : [ {
"_type" : "keyword-execution",
"id" : 9,
"execution_status" : "FAILURE",
"last_executed_by" : "User-1",
"last_executed_on" : "2017-06-26T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/9"
}
}
}, {
"_type" : "keyword-execution",
"id" : 35,
"execution_status" : "SUCCESS",
"last_executed_by" : "User-1",
"last_executed_on" : "2017-06-28T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/35"
}
}
} ],
"iteration" : {
"_type" : "iteration",
"id" : 1,
"name" : "sample iteration",
"reference" : "IT1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/13"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1/test-plan?page=0&size=2"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1/test-plan?page=0&size=2"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1/test-plan?page=1&size=2"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1/test-plan?page=2&size=2"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1/test-plan?page=2&size=2"
}
},
"page" : {
"size" : 2,
"totalElements" : 6,
"totalPages" : 3,
"number" : 1
}
}
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 test suites of an iteration
A GET
/iterations/{id}/test-suites
returns all the test-suites of the iteration with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the iteration |
HTTP request
GET /api/rest/latest/iterations/1/test-suites?size=2&page=1 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 5292
{
"_embedded" : {
"test-suites" : [ {
"_type" : "test-suite",
"id" : 9,
"name" : "Suite 1",
"description" : "<p>The first test suite.</p>",
"uuid" : "2f7198zd-eb2e-4379-f82d-ddc207c866bd",
"status" : "READY",
"parent" : {
"_type" : "iteration",
"id" : 1,
"name" : "Iteration 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1"
}
}
},
"created_by" : "User 2B93",
"created_on" : "2017-02-04T10:00:00.000+00:00",
"last_modified_by" : "User 1Z45",
"last_modified_on" : "2017-03-02T10:00:00.000+00:00",
"custom_fields" : [ {
"code" : "MY_CUF",
"label" : "My Custom Field",
"value" : "yellow"
} ],
"test_plan" : [ {
"_type" : "iteration-test-plan-item",
"id" : 7,
"execution_status" : "SUCCESS",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 3,
"name" : "test case 3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/3"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 2,
"name" : "dataset 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/2"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/7"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 8,
"execution_status" : "RUNNING",
"referenced_test_case" : {
"_type" : "scripted-test-case",
"id" : 11,
"name" : "scripted test case 11",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/11"
}
}
},
"referenced_dataset" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/8"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9"
}
}
}, {
"_type" : "test-suite",
"id" : 10,
"name" : "Suite 2",
"description" : "<p>The second test suite.</p>",
"uuid" : "2f7198zd-eb2e-4379-f82d-ddc207c866bd",
"status" : "READY",
"parent" : {
"_type" : "iteration",
"id" : 1,
"name" : "Iteration 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1"
}
}
},
"created_by" : "User 2B93",
"created_on" : "2017-02-04T10:05:42.000+00:00",
"last_modified_by" : "User 2B93",
"last_modified_on" : "2017-03-04T12:00:00.000+00:00",
"custom_fields" : [ {
"code" : "MY_CUF",
"label" : "My Custom Field",
"value" : "blue"
} ],
"test_plan" : [ {
"_type" : "iteration-test-plan-item",
"id" : 15,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 11,
"name" : "test case 11",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/11"
}
}
},
"referenced_dataset" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/15"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 13,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "keyword-test-case",
"id" : 17,
"name" : "keyword test case 17",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/17"
}
}
},
"referenced_dataset" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/13"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/10"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1/test-suites?page=0&size=2"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1/test-suites?page=0&size=2"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1/test-suites?page=1&size=2"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1/test-suites?page=2&size=2"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1/test-suites?page=2&size=2"
}
},
"page" : {
"size" : 2,
"totalElements" : 6,
"totalPages" : 3,
"number" : 1
}
}
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) |
Iteration Test Plan Items
This chapter focuses on services for iteration test plan items. An iteration test plan item represents a test case that has been planned in an iteration test plan. It belongs to an iteration, and binds together the test case to execute with a dataset (optional) and an assigned user (optional).
Get iteration test plan item
A GET
to /iteration-test-plan-items/{id}
returns the iteration test plan item with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the iteration test plan item |
HTTP request
GET /api/rest/latest/iteration-test-plan-items/4 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1835
{
"_type" : "iteration-test-plan-item",
"id" : 6,
"execution_status" : "SUCCESS",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 3,
"name" : "Test Case 3",
"reference" : "TC3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/3"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 2,
"name" : "Dataset 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/2"
}
}
},
"last_executed_by" : "User 6",
"last_executed_on" : "2017-02-04T11:00:00.000+00:00",
"assigned_to" : "User 6",
"executions" : [ {
"_type" : "execution",
"id" : 10,
"execution_status" : "SUCCESS",
"last_executed_by" : "User 6",
"last_executed_on" : "2017-02-04T11:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/10"
}
}
} ],
"iteration" : {
"_type" : "iteration",
"id" : 1,
"name" : "Iteration 1",
"reference" : "IT1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/6"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/1"
},
"test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/3"
},
"dataset" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/2"
},
"iteration" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1"
},
"executions" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/6/executions"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of this entity |
|
|
the id of this iteration test plan item |
|
|
the execution status of this item |
|
|
the corresponding test case of this item |
|
|
the referenced dataset of this item |
|
|
the login of the user who last executed this item |
|
|
the date this item was last executed |
|
|
the login of the user this item is assigned to |
|
|
all the executions of this item |
|
|
the iteration this item belongs to |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this iteration test plan item |
|
link to the project this item belongs to |
|
link to the test case corresponding to this item |
|
link to the dataset used in this item |
|
link to the iteration this item belongs to |
|
link to the executions of this item |
Create iteration test plan item
A POST
to /iterations/{iterationId}/test-plan
creates a new entry in the test plan of the iteration with the given id. The entry must
reference a test case, and optionally for which dataset and which assignee. If specified, the dataset must belong to the referenced Test Case.
The dataset and/or assignee may be undefined or null if you don’t want to set them yet.
Path parameters
Parameter | Description |
---|---|
|
the id of the iteration |
HTTP request
POST /api/rest/latest/iterations/4/test-plan HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 193
Host: localhost:8080
{
"_type" : "iteration-test-plan-item",
"test_case" : {
"_type" : "test-case",
"id" : 25
},
"dataset" : {
"_type" : "dataset",
"id" : 3
},
"assigned_to" : "User-1"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the test case to include in the test plan (as described below) |
|
|
the type of the entity (always 'test-case') |
|
|
the id of the test case |
|
|
the dataset to be used when the test case will be executed (optional) |
|
|
the type of the entity (always 'dataset') |
|
|
the id of the dataset. Remember that the dataset must belong to the planned test case. |
|
|
the username of the user assigned to this test case (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1381
{
"_type" : "iteration-test-plan-item",
"id" : 38,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 25,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/25"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 3,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/3"
}
}
},
"last_executed_by" : null,
"last_executed_on" : null,
"assigned_to" : "User-1",
"executions" : [ ],
"iteration" : {
"_type" : "iteration",
"id" : 4,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/4"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/38"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/25"
},
"dataset" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/3"
},
"iteration" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/4"
},
"executions" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/38/executions"
}
}
}
Modify iteration test plan item
A Patch
to /iteration-test-plan-items/{id}
modifies the iteration test plan item with the given id. You can modify the planned dataset, the assignee, or both. A property left absent from the json payload will not be altered, if present with a null value they will be reset. You cannot change the planned test case.
Path parameters
Parameter | Description |
---|---|
|
the id of the iteration test plan item |
HTTP request
PATCH /api/rest/latest/iteration-test-plan-items/50 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 129
Host: localhost:8080
{
"_type" : "iteration-test-plan-item",
"dataset" : {
"_type" : "dataset",
"id" : 3
},
"assigned_to" : "User-1"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the dataset to use when the test case is executed (optional). You can remove the dataset by setting this to null. |
|
|
the type of the entity ('dataset') |
|
|
the id of this dataset |
|
|
the username of the user assigned to this test (optional). You can assign this test to nobody by setting this to null. |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1497
{
"_type" : "iteration-test-plan-item",
"id" : 50,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 25,
"name" : "AKM-Test case 1",
"reference" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/25"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 3,
"name" : "Jeu2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/3"
}
}
},
"last_executed_by" : null,
"last_executed_on" : null,
"assigned_to" : "User-1",
"executions" : [ ],
"iteration" : {
"_type" : "iteration",
"id" : 4,
"name" : null,
"reference" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/4"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/50"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/25"
},
"dataset" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/3"
},
"iteration" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/4"
},
"executions" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/50/executions"
}
}
}
Delete iteration test plan item
A DELETE
to /iteration-test-plan-items/{testPlanItemsIds}
deletes one or several iteration test plan items with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the iteration test plan items |
HTTP request
DELETE /api/rest/latest/iteration-test-plan-items/45,46 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Get executions of iteration test plan item
A GET
to /iteration-test-plan-items/{id}/executions
returns all the executions of the iteration test plan item with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the iteration-test-plan-item |
HTTP request
GET /api/rest/latest/iteration-test-plan-items/1/executions?size=3&page=1 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1837
{
"_embedded" : {
"executions" : [ {
"_type" : "execution",
"id" : 10,
"name" : "TC1 - Test Case 1",
"execution_order" : 0,
"execution_status" : "FAILURE",
"last_executed_by" : "User 8",
"last_executed_on" : "2017-06-12T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/10"
}
}
}, {
"_type" : "execution",
"id" : 11,
"name" : "TC1 - Test Case 1",
"execution_order" : 1,
"execution_status" : "BLOCKED",
"last_executed_by" : "User 8",
"last_executed_on" : "2017-06-13T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/11"
}
}
}, {
"_type" : "execution",
"id" : 12,
"name" : "TC1 - Test Case 1",
"execution_order" : 2,
"execution_status" : "SUCCESS",
"last_executed_by" : "User 8",
"last_executed_on" : "2017-06-14T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/12"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/1/executions?page=0&size=3"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/1/executions?page=0&size=3"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/1/executions?page=1&size=3"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/1/executions?page=1&size=3"
}
},
"page" : {
"size" : 3,
"totalElements" : 6,
"totalPages" : 2,
"number" : 1
}
}
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) |
Parameters
This chapter focuses on services for the parameters.
Get parameter
A GET
to /parameters/{id}
returns the parameter with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the parameter |
HTTP request
GET /api/rest/latest/parameters/47 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 440
{
"_type" : "parameter",
"id" : 47,
"name" : "sampleParameter",
"description" : "<p>My parameter</p>",
"test_case" : {
"_type" : "test-case",
"id" : 102,
"name" : "sample test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/102"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/parameters/47"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the parameter |
|
|
the type of the entity |
|
|
the name of the parameter |
|
|
the description of the parameter |
|
|
the test case this parameter belongs to |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this parameter |
Create parameter
A POST
to /parameters
creates a new parameter.
HTTP request
POST /api/rest/latest/parameters HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 164
Host: localhost:8080
{
"_type" : "parameter",
"name" : "sampleParameter",
"description" : "<p>My parameter</p> ",
"test_case" : {
"_type" : "test-case",
"id" : 102
}
}
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 522
{
"_type" : "parameter",
"id" : 47,
"name" : "sampleParameter",
"description" : "<p>My parameter</p>",
"test_case" : {
"_type" : "test-case",
"id" : 102,
"name" : "sample test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/102"
}
}
},
"_links" : {
"self" : [ {
"href" : "http://localhost:8080/api/rest/latest/parameters/47"
}, {
"href" : "http://localhost:8080/api/rest/latest/parameters/47"
} ]
}
}
Modify parameter
A Patch
to /parameters/{id}
modifies the parameter with the given id. You can modify name and/or description.
Path parameters
Parameter | Description |
---|---|
|
the id of the parameter |
HTTP request
PATCH /api/rest/latest/parameters/47 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 113
Host: localhost:8080
{
"_type" : "parameter",
"name" : "Update-sampleParameter",
"description" : "<p>Update My parameter</p> "
}
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 536
{
"_type" : "parameter",
"id" : 47,
"name" : "Update-sampleParameter",
"description" : "<p>Update My parameter</p>",
"test_case" : {
"_type" : "test-case",
"id" : 102,
"name" : "sample test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/102"
}
}
},
"_links" : {
"self" : [ {
"href" : "http://localhost:8080/api/rest/latest/parameters/47"
}, {
"href" : "http://localhost:8080/api/rest/latest/parameters/47"
} ]
}
}
Delete parameter
A DELETE
to /parameters/{id}
deletes one parameter with the given id.
Path parameters
Parameter | Description |
---|---|
|
the list of id of the parameter |
HTTP request
DELETE /api/rest/latest/parameters/169 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Projects
This chapter focuses on services for the projects.
Get all projects
A GET
to /projects
returns all the projects (standard and template) that the user is allowed to read. A parameter can be specified to retrieve only standard projects or template ones.
-
Get all projects (included project template)
HTTP request
GET /api/rest/latest/projects?page=0&size=4 HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1171
{
"_embedded" : {
"projects" : [ {
"_type" : "project",
"id" : 367,
"name" : "sample project 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367"
}
}
}, {
"_type" : "project",
"id" : 456,
"name" : "sample project 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/456"
}
}
}, {
"_type" : "project",
"id" : 789,
"name" : "sample project 3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/789"
}
}
} ],
"project-templates" : [ {
"_type" : "project-template",
"id" : 971,
"name" : "project template 4",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/971"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects?page=0&size=4"
}
},
"page" : {
"size" : 4,
"totalElements" : 4,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
all the standard projects |
|
|
all the project templates |
|
|
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 only standard projects (without project template)
HTTP request
GET /api/rest/latest/projects?type=STANDARD 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 935
{
"_embedded" : {
"projects" : [ {
"_type" : "project",
"id" : 367,
"name" : "standard project 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367"
}
}
}, {
"_type" : "project",
"id" : 456,
"name" : "standard project 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/456"
}
}
}, {
"_type" : "project",
"id" : 789,
"name" : "standard project 3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/789"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects?type=STANDARD&page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 3,
"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 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 only project templates
HTTP request
GET /api/rest/latest/projects?type=TEMPLATE 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 965
{
"_embedded" : {
"project-templates" : [ {
"_type" : "project-template",
"id" : 367,
"name" : "sample project 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367"
}
}
}, {
"_type" : "project-template",
"id" : 456,
"name" : "sample project 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/456"
}
}
}, {
"_type" : "project-template",
"id" : 789,
"name" : "sample project 3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/789"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects?type=TEMPLATE&page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 3,
"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 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 project
A POST
to /projects
creates a new project.
-
Create new project
HTTP request
POST /api/rest/latest/projects HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 134
Host: localhost:8080
{
"_type" : "project",
"name" : "sample project",
"label" : "no price tag",
"description" : "<p>do something meaningful</p>"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 670
{
"_type" : "project",
"id" : 333,
"description" : "<p>do something meaningful</p>",
"label" : "no price tag",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333"
},
"requirements" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/requirements-library/content"
},
"test-cases" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/test-cases-library/content"
},
"campaigns" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/campaigns-library/content"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the project |
|
|
whether the project is active or not |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this project |
|
link to the content of the requirement library of this project |
|
link to the content of the test case library of this project |
|
link to the content of the campaign library of this project |
-
Create new project using template
HTTP request
POST /api/rest/latest/projects HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 443
Host: localhost:8080
{
"_type" : "project",
"name" : "sample project",
"label" : "no price tag",
"description" : "<p>do something meaningful</p>",
"template_id" : 23,
"params" : {
"copy_permissions" : true,
"copy_cuf" : true,
"copy_bugtracker_binding" : true,
"copy_automated_projects" : true,
"copy_infolists" : true,
"copy_milestone" : true,
"copy_allow_tc_modif_from_exec" : true,
"keep_template_binding" : true
}
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
the id of project template |
|
|
the parameters to create a new project from template |
|
|
whether the project’s permissions will be copied or not |
|
|
whether the project’s custom fields will be copied or not |
|
|
whether the project’s bugtracker will be copied or not |
|
|
whether the project’s test automation management will be copied or not |
|
|
whether the project’s information lists will be copied or not |
|
|
whether the project’s milestones will be copied or not |
|
|
whether the project’s execution option will be copied or not |
|
|
whether the template binding will be kept or not (true by default) |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 670
{
"_type" : "project",
"id" : 333,
"description" : "<p>do something meaningful</p>",
"label" : "no price tag",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333"
},
"requirements" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/requirements-library/content"
},
"test-cases" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/test-cases-library/content"
},
"campaigns" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/campaigns-library/content"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the project |
|
|
whether the project is active or not |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this project |
|
link to the content of the requirement library of this project |
|
link to the content of the test case library of this project |
|
link to the content of the campaign library of this project |
Create project template
A POST
to /projects
creates a new project template.
-
Create new template
HTTP request
POST /api/rest/latest/projects HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 152
Host: localhost:8080
{
"_type" : "project-template",
"name" : "sample project template",
"label" : "no price tag",
"description" : "<p>do something meaningful</p>"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the name of the project template |
|
|
the label of the project template |
|
|
the description of the project template |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 688
{
"_type" : "project-template",
"id" : 333,
"description" : "<p>do something meaningful</p>",
"label" : "no price tag",
"name" : "sample project template",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333"
},
"requirements" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/requirements-library/content"
},
"test-cases" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/test-cases-library/content"
},
"campaigns" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/campaigns-library/content"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the project template |
|
|
whether the project template is active or not |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this project |
|
link to the content of the requirement library of this project template |
|
link to the content of the test case library of this project template |
|
link to the content of the campaign library of this project template |
-
Create new template from existing project
HTTP request
POST /api/rest/latest/projects HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 424
Host: localhost:8080
{
"_type" : "project-template",
"name" : "sample project template",
"label" : "no price tag",
"description" : "<p>do something meaningful</p>",
"project_id" : 55,
"params" : {
"copy_permissions" : true,
"copy_cuf" : true,
"copy_bugtracker_binding" : true,
"copy_automated_projects" : true,
"copy_infolists" : true,
"copy_milestone" : true,
"copy_allow_tc_modif_from_exec" : true
}
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
the id of project template |
|
|
the parameters to create a new project from template |
|
|
whether the project’s permissions will be copied or not |
|
|
whether the project’s custom fields will be copied or not |
|
|
whether the project’s bugtracker will be copied or not |
|
|
whether the project’s test automation management will be copied or not |
|
|
whether the project’s information lists will be copied or not |
|
|
whether the project’s milestones will be copied or not |
|
|
whether the project’s execution option will be copied or not |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 688
{
"_type" : "project-template",
"id" : 333,
"description" : "<p>do something meaningful</p>",
"label" : "no price tag",
"name" : "sample project template",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333"
},
"requirements" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/requirements-library/content"
},
"test-cases" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/test-cases-library/content"
},
"campaigns" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/campaigns-library/content"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the project template |
|
|
whether the project template is active or not |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this project |
|
link to the content of the requirement library of this project template |
|
link to the content of the test case library of this project template |
|
link to the content of the campaign library of this project template |
Get project
A GET
to /projects/{id}
returns the project with the given id. This retrieves a project administration data and is only authorized to administrators.
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/367 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 911
{
"_type" : "project",
"id" : 367,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367"
},
"requirements" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/requirements-library/content"
},
"test-cases" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/test-cases-library/content"
},
"campaigns" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/campaigns-library/content"
},
"permissions" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/permissions"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the project |
|
|
the type of the entity |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
whether the project is active or not |
|
|
the attachments of the project |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this project |
|
link to the content of the requirement library of this project |
|
link to the content of the test case library of this project |
|
link to the content of the campaign library of this project |
|
link to the permission list of this project |
|
link to the attachments of this project |
Get project by name
A GET
to /projects
with a request parameter projectName
returns the project with the given name.
This retrieves a project administration data and is only authorized to administrators.
Be careful, both the name of the parameter projectName
and the value of the project name are case-sensitive.
HTTP request
GET /api/rest/latest/projects?projectName=sample+project HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
the name of the project |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 907
{
"_type" : "project",
"id" : 367,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367"
},
"requirements" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/requirements-library/content"
},
"test-cases" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/test-cases-library/content"
},
"campaigns" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/campaigns-library/content"
},
"permissions" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/permissions"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/projects/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the project |
|
|
the type of the entity |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
whether the project is active or not |
|
|
the attachments of the project |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this project |
|
link to the content of the requirement library of this project |
|
link to the content of the test case library of this project |
|
link to the content of the campaign library of this project |
|
link to the permission list of this project |
|
link to the attachments of this project |
Get project permissions
A GET
to /projects/{id}/permissions
returns the permission groups of the project with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/367/permissions HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1026
{
"content" : {
"validator" : [ {
"_type" : "team",
"id" : 852,
"name" : "Team B",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/852"
}
}
} ],
"project_viewer" : [ {
"_type" : "user",
"id" : 486,
"login" : "User-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486"
}
}
}, {
"_type" : "user",
"id" : 521,
"login" : "User-2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/521"
}
}
} ],
"advanced_tester" : [ {
"_type" : "team",
"id" : 567,
"name" : "Team A",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/567"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/permissions"
}
}
}
Links
Relation | Description |
---|---|
|
the link to this project permissions |
Add permissions to project
A POST
to /projects/{id}/permissions/{permissionGroup}
adds certain users or teams to the permission group of the project with the given id.
The possible {permissionGroup} are test_editor, project_viewer, project_manager, test_runner, test_designer, advanced_tester and validator.
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
|
the permission group of which the users/teams will be add in |
HTTP request
POST /api/rest/latest/projects/367/permissions/advanced_tester?ids=486,521 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
the ids of the users/teams |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 575
{
"content" : {
"advanced_tester" : [ {
"_type" : "user",
"id" : 486,
"login" : "User-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486"
}
}
}, {
"_type" : "user",
"id" : 521,
"login" : "User-2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/521"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/permissions"
}
}
}
Links
Relation | Description |
---|---|
|
the link to this project permissions |
Get campaigns of project
A GET
to /projects/{id}/campaigns
returns the campaigns in the project with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/14/campaigns?page=2&size=3&sort=name,desc 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1525
{
"_embedded" : {
"campaigns" : [ {
"_type" : "campaign",
"id" : 255,
"name" : "campaign 1",
"reference" : "C-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/255"
}
}
}, {
"_type" : "campaign",
"id" : 122,
"name" : "campaign 2",
"reference" : "C-2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/122"
}
}
}, {
"_type" : "campaign",
"id" : 147,
"name" : "campaign 3",
"reference" : "C-3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/147"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns?page=0&size=3&sort=name,desc"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns?page=1&size=3&sort=name,desc"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns?page=2&size=3&sort=name,desc"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns?page=3&size=3&sort=name,desc"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns?page=3&size=3&sort=name,desc"
}
},
"page" : {
"size" : 3,
"totalElements" : 10,
"totalPages" : 4,
"number" : 2
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the test cases of this project |
|
|
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 requirements of project
A GET
to /projects/{id}/requirements
returns the requirements in the project with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/14/requirements?page=2&size=3&sort=id,desc 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1479
{
"_embedded" : {
"requirements" : [ {
"_type" : "requirement",
"id" : 122,
"name" : "requirement 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/122"
}
}
}, {
"_type" : "requirement",
"id" : 147,
"name" : "requirement 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/147"
}
}
}, {
"_type" : "requirement",
"id" : 255,
"name" : "requirement 3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/255"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/requirements?page=0&size=3&sort=id,desc"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/requirements?page=1&size=3&sort=id,desc"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/requirements?page=2&size=3&sort=id,desc"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/requirements?page=3&size=3&sort=id,desc"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/requirements?page=3&size=3&sort=id,desc"
}
},
"page" : {
"size" : 3,
"totalElements" : 10,
"totalPages" : 4,
"number" : 2
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the requirements of this project |
|
|
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 test cases of project
A GET
to /projects/{id}/test-cases
returns the test cases in the project with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/14/test-cases?page=2&size=3&sort=name,desc 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1579
{
"_embedded" : {
"test-cases" : [ {
"_type" : "test-case",
"id" : 122,
"name" : "test case 1",
"reference" : "TC-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/122"
}
}
}, {
"_type" : "scripted-test-case",
"id" : 222,
"name" : "scripted test case 1",
"reference" : "STC-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/222"
}
}
}, {
"_type" : "keyword-test-case",
"id" : 322,
"name" : "keyword test case 1",
"reference" : "KTC-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/322"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases?page=0&size=3&sort=name,desc"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases?page=1&size=3&sort=name,desc"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases?page=2&size=3&sort=name,desc"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases?page=3&size=3&sort=name,desc"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases?page=3&size=3&sort=name,desc"
}
},
"page" : {
"size" : 3,
"totalElements" : 10,
"totalPages" : 4,
"number" : 2
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the test cases of this project |
|
|
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 campaign library contents
A GET
to /projects/{id}/campaigns-library/content
returns the contents of the campaign library in the project with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/14/campaigns-library/content?page=2&size=3&sort=name,desc&fields=name,reference&include=nested 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) |
|
level of depth of the content that should be returned (optional), available values : root or nested (more info in Parameter 'include' section) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1826
{
"_embedded" : {
"campaign-library-content" : [ {
"_type" : "campaign",
"id" : 122,
"name" : "root-level campaign",
"reference" : "C-R",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/122"
}
}
}, {
"_type" : "campaign-folder",
"id" : 255,
"name" : "root-level folder",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaign-folders/255"
}
}
}, {
"_type" : "campaign",
"id" : 147,
"name" : "content of root-level folder",
"reference" : "C-N",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/campaigns/147"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns-library/content?fields=name,reference&include=nested&page=0&size=3&sort=name,desc"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns-library/content?fields=name,reference&include=nested&page=1&size=3&sort=name,desc"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns-library/content?fields=name,reference&include=nested&page=2&size=3&sort=name,desc"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns-library/content?fields=name,reference&include=nested&page=3&size=3&sort=name,desc"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns-library/content?fields=name,reference&include=nested&page=3&size=3&sort=name,desc"
}
},
"page" : {
"size" : 3,
"totalElements" : 10,
"totalPages" : 4,
"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 requirement library contents
A GET
to /projects/{id}/requirements-library/content
returns the contents of the requirement library in the project with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/14/requirements-library/content?page=2&size=3&include=nested&sort=id,desc 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) |
|
level of depth of the content that should be returned (optional), available values : root or nested (more info in Parameter 'include' section) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1691
{
"_embedded" : {
"requirement-library-content" : [ {
"_type" : "requirement-folder",
"id" : 255,
"name" : "root-level folder",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/255"
}
}
}, {
"_type" : "requirement",
"id" : 147,
"name" : "content of root-level folder",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/147"
}
}
}, {
"_type" : "requirement",
"id" : 122,
"name" : "root-level requirement",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/122"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/requirements-library/content?include=nested&page=0&size=3&sort=id,desc"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/requirements-library/content?include=nested&page=1&size=3&sort=id,desc"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/requirements-library/content?include=nested&page=2&size=3&sort=id,desc"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/requirements-library/content?include=nested&page=3&size=3&sort=id,desc"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/requirements-library/content?include=nested&page=3&size=3&sort=id,desc"
}
},
"page" : {
"size" : 3,
"totalElements" : 10,
"totalPages" : 4,
"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 test case library contents
A GET
to /projects/{id}/test-cases-library/content
returns the contents of the test case library in the project with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/14/test-cases-library/content?page=2&size=3&sort=name,desc&fields=name,reference&include=nested 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) |
|
level of depth of the content that should be returned (optional), available values : root or nested (more info in Parameter 'include' section) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2119
{
"_embedded" : {
"test-case-library-content" : [ {
"_type" : "test-case",
"id" : 122,
"name" : "root-level test case",
"reference" : "TC-R",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/122"
}
}
}, {
"_type" : "test-case-folder",
"id" : 255,
"name" : "root-level folder",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/255"
}
}
}, {
"_type" : "scripted-test-case",
"id" : 147,
"name" : "content of root-level folder",
"reference" : "TC-N",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/147"
}
}
}, {
"_type" : "keyword-test-case",
"id" : 148,
"name" : "content of root-level folder",
"reference" : "TC-N",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/148"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases-library/content?fields=name,reference&include=nested&page=0&size=3&sort=name,desc"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases-library/content?fields=name,reference&include=nested&page=1&size=3&sort=name,desc"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases-library/content?fields=name,reference&include=nested&page=2&size=3&sort=name,desc"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases-library/content?fields=name,reference&include=nested&page=3&size=3&sort=name,desc"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases-library/content?fields=name,reference&include=nested&page=3&size=3&sort=name,desc"
}
},
"page" : {
"size" : 3,
"totalElements" : 10,
"totalPages" : 4,
"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) |
Delete permission(s) in project
A DELETE
to /projects/{projectId}/users/{partyIds}
deletes one or several user(s) with the given id(s) (separated with comma).
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
|
the list of user/team ids to be deleted |
HTTP request
DELETE /api/rest/latest/projects/44/users/77,99 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
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
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) |
Example 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) |
|
|
the current requirement version of this requirement |
|
|
the parent node of this requirement |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 2094
{
"_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"
}
}
} ],
"_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.
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" ]
} ]
}
}
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2127
{
"_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"
}
}
} ],
"_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"
}
}
}
Get requirement
A GET
to /requirements/{id}
returns the requirement with the given id.
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
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3338
{
"_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" : "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"
}
}
} ],
"_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"
}
}
}
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 |
|
|
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 |
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
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) |
|
level of depth of the content that should be returned (optional), available values : root or nested (more info in Parameter 'include' section) |
Example 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) |
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
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2640
{
"_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"
}
}
} ],
"_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 |
|
|
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
Requirement Folders
This chapter focuses on services for the requirement folders.
Get all requirement folders
A GET
to /requirement-folders
returns all the requirement folders that the user is allowed to read.
HTTP request
GET /api/rest/latest/requirement-folders?page=1&size=3 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1438
{
"_embedded" : {
"requirement-folders" : [ {
"_type" : "requirement-folder",
"id" : 23,
"name" : "sample folder 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/23"
}
}
}, {
"_type" : "requirement-folder",
"id" : 26,
"name" : "sample folder 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/26"
}
}
}, {
"_type" : "requirement-folder",
"id" : 31,
"name" : "sample folder 3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/31"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders?page=0&size=3"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders?page=0&size=3"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders?page=1&size=3"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders?page=2&size=3"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders?page=3&size=3"
}
},
"page" : {
"size" : 3,
"totalElements" : 10,
"totalPages" : 4,
"number" : 1
}
}
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 requirement folders tree by projects
A GET
to /requirement-folders/tree/{ids}
returns the requirement folders tree by projects that the user is allowed to read.
HTTP request
GET /api/rest/latest/requirement-folders/tree/10,11 HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 709
[ {
"_type" : "project",
"id" : 10,
"name" : "project-1",
"folders" : [ {
"_type" : "requirement-folder",
"id" : 100,
"name" : "folder1",
"url" : "http://localhost:8080/api/rest/latest/requirement-folders/100",
"children" : [ ]
}, {
"_type" : "requirement-folder",
"id" : 110,
"name" : "folder2",
"url" : "http://localhost:8080/api/rest/latest/requirement-folders/110",
"children" : [ ]
} ]
}, {
"_type" : "project",
"id" : 11,
"name" : "project-2",
"folders" : [ {
"_type" : "requirement-folder",
"id" : 120,
"name" : "folder3",
"url" : "http://localhost:8080/api/rest/latest/requirement-folders/120",
"children" : [ ]
} ]
} ]
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
id of project |
|
|
name of project |
|
|
all folders for the given project |
|
|
the type of the entity |
|
|
id of the requirement folder |
|
|
name of the requirement folder |
|
|
url of the requirement folder |
|
|
children folders |
Create requirement folder
A POST
to /requirement-folders
creates a new requirement folder. The parent object and the name are required; refer to the complete reference of Get requirement folder for the other attributes.
HTTP request
POST /api/rest/latest/requirement-folders HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 223
Host: localhost:8080
{
"_type" : "requirement-folder",
"name" : "Requirement subfolder 1",
"custom_fields" : [ {
"code" : "cuf1",
"value" : "Cuf1 Value"
} ],
"parent" : {
"_type" : "requirement-folder",
"id" : 11
}
}
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1394
{
"_type" : "requirement-folder",
"id" : 33,
"project" : {
"_type" : "project",
"id" : 14,
"name" : "Test Project 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
},
"path" : "/Folder 1/Requirement subfolder 1",
"parent" : {
"_type" : "requirement-folder",
"id" : 11,
"name" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/11"
}
}
},
"custom_fields" : [ {
"code" : "cuf1",
"label" : "Lib Cuf1",
"value" : "Cuf1 Value"
}, {
"code" : "cuf2",
"label" : "Lib Cuf2",
"value" : "true"
} ],
"name" : "Requirement subfolder 1",
"created_by" : "admin",
"created_on" : "2017-07-19T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-19T10:00:00.000+00:00",
"description" : null,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/33"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"content" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/33/content"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/33/attachments"
}
}
}
Get requirement folder
A GET
to /requirement-folders/{id}
returns the requirement folder with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the requirement folder |
HTTP request
GET /api/rest/latest/requirement-folders/356 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1300
{
"_type" : "requirement-folder",
"id" : 356,
"project" : {
"_type" : "project",
"id" : 12,
"name" : "sample project",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/12"
}
}
},
"path" : "/sample project/sample parent folder/embedded folder",
"parent" : {
"_type" : "requirement-folder",
"id" : 34,
"name" : "sample parent folder",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/34"
}
}
},
"custom_fields" : [ ],
"name" : "embedded folder",
"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",
"description" : "<p>An embedded folder...</p>",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/356"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/12"
},
"content" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/356/content"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/356/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the entity |
|
|
the type of the entity |
|
|
name of the entity |
|
|
project of the entity |
|
|
the location of the entity (either a folder or the project if located at the root of the library) |
|
|
the path of the entity |
|
|
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) |
|
|
description of that entity (html) |
|
|
the attachments of that entity |
|
|
related links |
|
|
the custom fields of this execution step |
Links
Relation | Description |
---|---|
|
the link of the folder |
|
the link of its project |
|
the link of its content |
|
the link of its attachments |
Modify requirement folder
A Patch
to /requirement-folders/{id}
modifies the requirement folder with the given id.
HTTP request
PATCH /api/rest/latest/requirement-folders/33 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 258
Host: localhost:8080
{
"_type" : "requirement-folder",
"name" : "Update - Requirement subfolder 1",
"description" : "Update - Description Requirement subfolder 1",
"custom_fields" : [ {
"code" : "cuf1",
"label" : "Lib Cuf1",
"value" : "Cuf1 new value"
} ]
}
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1454
{
"_type" : "requirement-folder",
"id" : 33,
"project" : {
"_type" : "project",
"id" : 14,
"name" : "Test Project 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
},
"path" : "/Folder 1/Update - Requirement subfolder 1",
"parent" : {
"_type" : "requirement-folder",
"id" : 11,
"name" : null,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/11"
}
}
},
"custom_fields" : [ {
"code" : "cuf1",
"label" : "Lib Cuf1",
"value" : "Cuf1 Value"
}, {
"code" : "cuf2",
"label" : "Lib Cuf2",
"value" : "true"
} ],
"name" : "Update - Requirement subfolder 1",
"created_by" : "admin",
"created_on" : "2017-07-19T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-19T10:00:00.000+00:00",
"description" : "Update - Description Requirement subfolder 1",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/33"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"content" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/33/content"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/33/attachments"
}
}
}
Delete requirement folder
A DELETE
to /requirement-folders/{ids}
deletes one or several requirement folder with the given id(s). Remember that deleting a folder entails that its content is deleted as well !
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the requirement folders |
HTTP request
DELETE /api/rest/latest/requirement-folders/21,22 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Get requirement folder contents
A GET
to /requirement-folders/{id}/content
returns the content of the requirement folder with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the requirement-folder |
HTTP request
GET /api/rest/latest/requirement-folders/71/content?size=3&page=1 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) |
|
level of depth of the content that should be returned (optional), available values : root or nested (more info in Parameter 'include' section) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1344
{
"_embedded" : {
"content" : [ {
"_type" : "requirement",
"id" : 78,
"name" : "embedded requirement 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/78"
}
}
}, {
"_type" : "requirement",
"id" : 44,
"name" : "embedded requirement 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirements/44"
}
}
}, {
"_type" : "requirement-folder",
"id" : 12,
"name" : "embedded folder",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/12"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/71/content?page=0&size=3"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/71/content?page=0&size=3"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/71/content?page=1&size=3"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-folders/71/content?page=1&size=3"
}
},
"page" : {
"size" : 3,
"totalElements" : 6,
"totalPages" : 2,
"number" : 1
}
}
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) |
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) |
Example 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) |
Example 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 |
Example 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) |
Example 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
Teams
This chapter focuses on services for the teams.
Get all teams
A GET
to /teams
returns all the teams.
HTTP request
GET /api/rest/latest/teams?page=2&size=1 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 846
{
"_embedded" : {
"teams" : [ {
"_type" : "team",
"id" : 567,
"name" : "Team A",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/567"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/teams?page=0&size=1"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/teams?page=1&size=1"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams?page=2&size=1"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/teams?page=3&size=1"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/teams?page=4&size=1"
}
},
"page" : {
"size" : 1,
"totalElements" : 5,
"totalPages" : 5,
"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 team
A POST
to /teams
creates a new team.
HTTP request
POST /api/rest/latest/teams HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 85
Host: localhost:8080
{
"_type" : "team",
"name" : "Team A",
"description" : "<p>black panther</p>"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the name of the team |
|
|
the description of the team |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 388
{
"_type" : "team",
"id" : 332,
"name" : "Team A",
"description" : "<p>black panther</p>",
"members" : [ ],
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/332"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the team |
|
|
the members of this team |
|
|
the user who created this team |
|
|
the date of this team account was created |
|
|
the user who last modified this team |
|
|
the date of this team was last modified |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this user |
Get team
A GET
to /teams/{id}
returns the team with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the team |
HTTP request
GET /api/rest/latest/teams/567 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 388
{
"_type" : "team",
"id" : 567,
"name" : "Team A",
"description" : "<p>black panther</p>",
"members" : [ ],
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/567"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the team |
|
|
the name of the team |
|
|
the description of the team |
|
|
the members of this team |
|
|
the user who created this team |
|
|
the date of this team account was created |
|
|
the user who last modified this team |
|
|
the date of this team was last modified |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this user |
Modify team
A PATCH
to /teams/{id}
modifies the team with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the team |
HTTP request
PATCH /api/rest/latest/teams/567 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 85
Host: localhost:8080
{
"_type" : "team",
"name" : "Team A",
"description" : "<p>black panther</p>"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the name of the team |
|
|
the description of the team |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 388
{
"_type" : "team",
"id" : 332,
"name" : "Team A",
"description" : "<p>black panther</p>",
"members" : [ ],
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/332"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the team |
|
|
the members of this team |
|
|
the user who created this team |
|
|
the date of this team account was created |
|
|
the user who last modified this team |
|
|
the date of this team was last modified |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this user |
Delete team
A DELETE
to /teams/{ids}
deletes one or several team(s) with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the teams |
HTTP request
DELETE /api/rest/latest/teams/169,189 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Get team members
A GET
to /teams/{id}/members
returns all the members of the team with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the team |
HTTP request
GET /api/rest/latest/teams/888/members 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 fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2147
{
"_embedded" : {
"members" : [ {
"_type" : "user",
"id" : 1,
"first_name" : "Charles",
"last_name" : "Dupond",
"login" : "User-1",
"email" : "charlesdupond@aaaa.aa",
"active" : true,
"group" : "User",
"can_delete_from_front" : true,
"last_connected_on" : "2018-02-11T11:00:00.000+00:00",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/1"
}
}
}, {
"_type" : "user",
"id" : 2,
"first_name" : "Chris",
"last_name" : "Dupond",
"login" : "User-2",
"email" : "chrisdupond@aaaa.aa",
"active" : true,
"group" : "User",
"can_delete_from_front" : true,
"last_connected_on" : "2018-03-11T11:00:00.000+00:00",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/2"
}
}
}, {
"_type" : "user",
"id" : 3,
"first_name" : "Victor",
"last_name" : "Dupond",
"login" : "User-3",
"email" : "victordupond@aaaa.aa",
"active" : true,
"group" : "User",
"can_delete_from_front" : true,
"last_connected_on" : "2018-03-11T11:00:00.000+00:00",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/3"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/888/members?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 3,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the members of this team |
|
|
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) |
Add members
A POST
to /teams/{teamId}/members
with userIds in request parameters adds these users to the team with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the team |
HTTP request
POST /api/rest/latest/teams/888/members?userIds=486,521 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
the ids of the members to add |
Remove members
A DELETE
to /teams/{teamId}/members
with userIds in request parameters removes these users from the team with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the team |
HTTP request
DELETE /api/rest/latest/teams/888/members?userIds=486,521 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
the ids of the members to remove |
Test Automation Servers
This chapter focuses on services for the test automation servers.
Get all test automation servers
A GET
to /test-automation-servers
returns all the test automation servers that the user is allowed to read.
HTTP request
GET /api/rest/latest/test-automation-servers?size=2&page=1 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1782
{
"_embedded" : {
"test-automation-servers" : [ {
"_type" : "test-automation-server",
"id" : 569,
"name" : "TA server 1",
"url" : "http://1234:4567/jenkins/",
"kind" : "jenkins",
"manual_agent_selection" : false,
"description" : "<p>nice try</p>",
"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",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers/569"
}
}
}, {
"_type" : "test-automation-server",
"id" : 654,
"name" : "TA server 2",
"url" : "http://1234:4567/jira/",
"kind" : "jenkins",
"manual_agent_selection" : false,
"description" : "<p>second shot</p>",
"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",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers/654"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers?page=0&size=2"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers?page=0&size=2"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers?page=1&size=2"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers?page=1&size=2"
}
},
"page" : {
"size" : 2,
"totalElements" : 4,
"totalPages" : 2,
"number" : 1
}
}
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 test automation server
A GET
to /test-automation-servers/{id}
returns the test automation server with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the test automation server |
HTTP request
GET /api/rest/latest/test-automation-servers/569 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 500
{
"_type" : "test-automation-server",
"id" : 569,
"name" : "TA server",
"url" : "http://1234:4567/jenkins/",
"kind" : "jenkins",
"manual_agent_selection" : false,
"description" : "<p>nice try</p>",
"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",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers/569"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the test automation server |
|
|
the type of the entity |
|
|
the name of the test automation server |
|
|
the url where to reach the test automation server |
|
|
the kind of the test automation server |
|
|
the description of the test automation server |
|
|
whether the test automation server is manual agent or not |
|
|
the user who created the test automation server |
|
|
the date the test automation server was created |
|
|
the user who last modified the test automation server |
|
|
the date the test automation server was last modified |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this test automation server |
Test Cases
This chapter focuses on services for the test cases.
Updates from version 1.2.0:
-
There are 3 types of test case: standard, scripted and keyword.
-
The "kind" property is no longer available in test case. The test case type is, instead, specified/defined by "_type" property.
-
The "script" property is from now available only for scripted test case.
-
There is no longer "language" property in test case. The language for scripted test case is always GHERKIN while there is no defined language for standard and keyword test cases.
Get all test cases
A GET
to /test-cases
returns all the test-cases that the user is allowed to read.
Type ('all', 'standard', 'scripted' or 'keyword') can be added as filter parameter to return the test cases with specific type.
HTTP request
GET /api/rest/latest/test-cases?page=1&size=2&fields=name,reference,script 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1640
{
"_embedded" : {
"test-cases" : [ {
"_type" : "test-case",
"id" : 1,
"name" : "sample standard test case",
"reference" : "TC1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/1"
}
}
}, {
"_type" : "scripted-test-case",
"id" : 2,
"name" : "sample script test case",
"reference" : "TC2",
"script" : "This is a new Gherkin test",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/2"
}
}
}, {
"_type" : "keyword-test-case",
"id" : 3,
"name" : "sample keyword test case",
"reference" : "TC3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/3"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases?fields=name,reference,script&page=0&size=2"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases?fields=name,reference,script&page=0&size=2"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases?fields=name,reference,script&page=1&size=2"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases?fields=name,reference,script&page=2&size=2"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases?fields=name,reference,script&page=2&size=2"
}
},
"page" : {
"size" : 2,
"totalElements" : 5,
"totalPages" : 3,
"number" : 1
}
}
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 test case
A GET
to /test-cases/{id}
returns the test case with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the test case |
HTTP request
GET /api/rest/latest/test-cases/238 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 6177
{
"_type" : "test-case",
"id" : 238,
"name" : "walking test",
"reference" : "TC1",
"project" : {
"_type" : "project",
"id" : 14,
"name" : "sample project",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
},
"path" : "/sample project/sample folder/walking test",
"parent" : {
"_type" : "test-case-folder",
"id" : 237,
"name" : "sample folder",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/237"
}
}
},
"created_by" : "User-1",
"created_on" : "2017-06-15T10:00:00.000+00:00",
"last_modified_by" : "User-1",
"last_modified_on" : "2017-06-15T10:00:00.000+00:00",
"importance" : "LOW",
"status" : "WORK_IN_PROGRESS",
"nature" : {
"code" : "NAT_USER_TESTING"
},
"type" : {
"code" : "TYP_EVOLUTION_TESTING"
},
"prerequisite" : "<p>You must have legs with feet attached to them (one per leg)</p>\n",
"description" : "<p>check that you can walk through the API (literally)</p>\n",
"automated_test" : {
"_type" : "automated-test",
"id" : 2,
"name" : "script_custom_field_params_all.ta",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/automated-tests/2"
}
}
},
"automated_test_technology" : "Cucumber",
"scm_repository_url" : "https://github.com/test/repo01 (master)",
"scm_repository_id" : 2,
"automated_test_reference" : "repo01/src/resources/script_custom_field_params_all.ta#Test_case_238",
"uuid" : "2f7194ca-eb2e-4378-a82d-ddc207c866bd",
"automatable" : "Y",
"automation_status" : "WORK_IN_PROGRESS",
"automation_priority" : 42,
"custom_fields" : [ {
"code" : "CF_TXT",
"label" : "test level",
"value" : "mandatory"
}, {
"code" : "CF_TAGS",
"label" : "see also",
"value" : [ "walking", "bipedal" ]
} ],
"steps" : [ {
"_type" : "action-step",
"id" : 165,
"action" : "<p>move ${first_foot} forward</p>\n",
"expected_result" : "<p>I just advanced by one step</p>\n",
"index" : 0,
"custom_fields" : [ {
"code" : "CF_TXT",
"label" : "test level",
"value" : "mandatory"
}, {
"code" : "CF_TAGS",
"label" : "see also",
"value" : [ "basic", "walking" ]
} ],
"verified_requirements" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/165"
}
}
}, {
"_type" : "action-step",
"id" : 166,
"action" : "<p>move ${second_foot} forward</p>\n",
"expected_result" : "<p>and another step !</p>\n",
"index" : 1,
"custom_fields" : [ {
"code" : "CF_TXT",
"label" : "test level",
"value" : "mandatory"
}, {
"code" : "CF_TAGS",
"label" : "see also",
"value" : [ "basic", "walking" ]
} ],
"verified_requirements" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/166"
}
}
}, {
"_type" : "call-step",
"id" : 167,
"delegate_parameter_values" : false,
"called_test_case" : {
"_type" : "test-case",
"id" : 239,
"name" : "victory dance",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/239"
}
}
},
"called_dataset" : null,
"index" : 2,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/167"
}
}
}, {
"_type" : "call-step",
"id" : 168,
"delegate_parameter_values" : false,
"called_test_case" : {
"_type" : "unauthorized-resource",
"resource_type" : "test-case",
"resource_id" : 240,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240"
}
}
},
"called_dataset" : null,
"index" : 3,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/168"
}
}
} ],
"parameters" : [ {
"_type" : "parameter",
"id" : 1,
"name" : "first_foot",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/parameters/1"
}
}
}, {
"_type" : "parameter",
"id" : 2,
"name" : "second_foot",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/parameters/2"
}
}
} ],
"datasets" : [ {
"_type" : "dataset",
"id" : 1,
"name" : "right handed people",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/1"
}
}
}, {
"_type" : "dataset",
"id" : 2,
"name" : "left handed people",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/2"
}
}
} ],
"verified_requirements" : [ {
"_type" : "requirement-version",
"id" : 255,
"name" : "Must have legs",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/255"
}
}
}, {
"_type" : "unauthorized-resource",
"resource_type" : "requirement-version",
"resource_id" : 256,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/256"
}
}
} ],
"script_auto" : "/ta-tests/script_custom_field_params_all.ta",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"steps" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238/steps"
},
"parameters" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238/parameters"
},
"datasets" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238/datasets"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the entity |
|
|
the type of the entity |
|
|
name of the test case |
|
|
project of the test case |
|
|
the location of the test case (either a folder or the project if located at the root of the library) |
|
|
the path of the test case |
|
|
user that created the test case |
|
|
timestamp of the creation (ISO 8601) |
|
|
user that modified the test case the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
a shorter identifier for that test case |
|
|
code of the importance |
|
|
code of the status |
|
|
code of the nature |
|
|
code of the type of test case |
|
|
description of the test case (html) |
|
|
prerequisites that should be met before the execution of the test script (html) |
|
|
automated test of the test case (optional) |
|
|
automation script of the test case |
|
|
automated test technology of the test case |
|
|
scm repository url of the test case |
|
|
scm repository id of the test case |
|
|
automated test reference of the test case |
|
|
uuid of the test case |
|
|
the eligibility for automation of the test case, one of "Y" (Yes), "N" (No) or "M" (Maybe). |
|
|
the automation priority of the test case |
|
|
the automation status of the test case |
|
|
array of custom fields |
|
|
code of the custom field |
|
|
label of the custom field |
|
|
the value of the custom field. The value is either a string (for most custom fields), or an array of strings (for multivalued custom fields eg a tag list) |
|
|
the step list that constitute the script. Please refer to the test steps documentation. |
|
|
the list of parameters. Please refer to the parameters documentation. |
|
|
the list of datasets. Please refer to the datasets documentation. |
|
|
the list of verified requirements. Please refer to the requirements documentation. |
|
|
the list of attachments. |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this test case |
|
link to its project |
|
link to the test script |
|
link to the parameters |
|
link to the datasets |
|
link to the attachments |
Create test case
A POST
to /test-cases
creates a new test case. By default the created test case will be of "standard" type, to create a "scripted"
or a "keyword" test case, you need to specify additional property in your payload : "_type": "scripted-test-case" or "keyword-test-case".
-
Create a standard test case
HTTP request
POST /api/rest/latest/test-cases HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 129
Host: localhost:8080
{
"_type" : "test-case",
"name" : "Christmas turkey test flight",
"parent" : {
"_type" : "project",
"id" : 15
}
}
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1961
{
"_type" : "test-case",
"id" : 240,
"name" : "Christmas turkey test flight",
"reference" : "",
"project" : {
"_type" : "project",
"id" : 15,
"name" : "Christmas Eve",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"path" : "/Christmas Eve/Christmas turkey test flight",
"parent" : {
"_type" : "project",
"id" : 15,
"name" : "Christmas Eve",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"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",
"importance" : "LOW",
"status" : "WORK_IN_PROGRESS",
"nature" : {
"code" : "NAT_FUNCTIONAL_TESTING"
},
"type" : {
"code" : "TYP_EVOLUTION_TESTING"
},
"prerequisite" : "",
"description" : null,
"automated_test" : null,
"automated_test_technology" : null,
"scm_repository_url" : null,
"scm_repository_id" : null,
"automated_test_reference" : null,
"uuid" : "f0437bc4-5a10-4706-a709-2c7d407c7a34",
"custom_fields" : [ ],
"steps" : [ ],
"parameters" : [ ],
"datasets" : [ ],
"verified_requirements" : [ ],
"script_auto" : "",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"steps" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
},
"parameters" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
},
"datasets" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
}
}
}
-
Create a scripted test case
HTTP request
POST /api/rest/latest/test-cases HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 177
Host: localhost:8080
{
"_type" : "scripted-test-case",
"name" : "Christmas turkey test flight",
"parent" : {
"_type" : "project",
"id" : 15
},
"script" : "this is Gherkin script"
}
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 2009
{
"_type" : "scripted-test-case",
"id" : 240,
"name" : "Christmas turkey test flight",
"reference" : "",
"project" : {
"_type" : "project",
"id" : 15,
"name" : "Christmas Eve",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"path" : "/Christmas Eve/Christmas turkey test flight",
"parent" : {
"_type" : "project",
"id" : 15,
"name" : "Christmas Eve",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"created_by" : "admin",
"created_on" : "2020-04-02T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-02T10:00:00.000+00:00",
"importance" : "LOW",
"status" : "WORK_IN_PROGRESS",
"nature" : {
"code" : "NAT_FUNCTIONAL_TESTING"
},
"type" : {
"code" : "TYP_EVOLUTION_TESTING"
},
"prerequisite" : "",
"description" : null,
"automated_test" : null,
"automated_test_technology" : null,
"scm_repository_url" : null,
"scm_repository_id" : null,
"automated_test_reference" : null,
"uuid" : "86959fd6-330d-4ae7-8930-9c6a7ada6555",
"custom_fields" : [ ],
"steps" : [ ],
"parameters" : [ ],
"datasets" : [ ],
"script" : "this is Gherkin script",
"verified_requirements" : [ ],
"script_auto" : "",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"steps" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
},
"parameters" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
},
"datasets" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
}
}
}
-
Create a keyword test case
HTTP request
POST /api/rest/latest/test-cases HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 154
Host: localhost:8080
{
"_type" : "keyword-test-case",
"name" : "Christmas turkey test flight",
"parent" : {
"_type" : "project",
"id" : 15
},
"steps" : [ ]
}
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1969
{
"_type" : "keyword-test-case",
"id" : 240,
"name" : "Christmas turkey test flight",
"reference" : "",
"project" : {
"_type" : "project",
"id" : 15,
"name" : "Christmas Eve",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"path" : "/Christmas Eve/Christmas turkey test flight",
"parent" : {
"_type" : "project",
"id" : 15,
"name" : "Christmas Eve",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"created_by" : "admin",
"created_on" : "2020-04-03T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-03T10:00:00.000+00:00",
"importance" : "LOW",
"status" : "WORK_IN_PROGRESS",
"nature" : {
"code" : "NAT_FUNCTIONAL_TESTING"
},
"type" : {
"code" : "TYP_EVOLUTION_TESTING"
},
"prerequisite" : "",
"description" : null,
"automated_test" : null,
"automated_test_technology" : null,
"scm_repository_url" : null,
"scm_repository_id" : null,
"automated_test_reference" : null,
"uuid" : "30fa84f0-f743-48e3-96a0-64fdd4b21e50",
"custom_fields" : [ ],
"steps" : [ ],
"parameters" : [ ],
"datasets" : [ ],
"verified_requirements" : [ ],
"script_auto" : "",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"steps" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
},
"parameters" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
},
"datasets" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
}
}
}
-
Create a test case with automation attributes
HTTP request
POST /api/rest/latest/test-cases HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 250
Host: localhost:8080
{
"_type" : "keyword-test-case",
"name" : "Christmas turkey test flight",
"parent" : {
"_type" : "project",
"id" : 15
},
"automated_test_technology" : "Robot Framework",
"scm_repository_id" : 6,
"automated_test_reference" : ""
}
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 2014
{
"_type" : "keyword-test-case",
"id" : 240,
"name" : "Christmas turkey test flight",
"reference" : "",
"project" : {
"_type" : "project",
"id" : 15,
"name" : "Christmas Eve",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"path" : "/Christmas Eve/Christmas turkey test flight",
"parent" : {
"_type" : "project",
"id" : 15,
"name" : "Christmas Eve",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"created_by" : "admin",
"created_on" : "2020-04-03T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-03T10:00:00.000+00:00",
"importance" : "LOW",
"status" : "WORK_IN_PROGRESS",
"nature" : {
"code" : "NAT_FUNCTIONAL_TESTING"
},
"type" : {
"code" : "TYP_EVOLUTION_TESTING"
},
"prerequisite" : "",
"description" : null,
"automated_test" : null,
"automated_test_technology" : "Robot Framework",
"scm_repository_url" : "https://github.com/test/repo01 (master)",
"scm_repository_id" : 6,
"automated_test_reference" : "",
"uuid" : "5c0b0c35-30f2-4707-b264-db4a37c12f4f",
"custom_fields" : [ ],
"steps" : [ ],
"parameters" : [ ],
"datasets" : [ ],
"verified_requirements" : [ ],
"script_auto" : "",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"steps" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
},
"parameters" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
},
"datasets" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
}
}
}
Modify test case
A PATCH
to /test-cases/{id}
modifies the test case with the given id.
-
Modify a standard test case
HTTP request
PATCH /api/rest/latest/test-cases/240 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 70
Host: localhost:8080
{
"_type" : "test-case",
"name" : "Christmas turkey test launch"
}
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1961
{
"_type" : "test-case",
"id" : 240,
"name" : "Christmas turkey test launch",
"reference" : "",
"project" : {
"_type" : "project",
"id" : 15,
"name" : "Christmas Eve",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"path" : "/Christmas Eve/Christmas turkey test launch",
"parent" : {
"_type" : "project",
"id" : 15,
"name" : "Christmas Eve",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"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",
"importance" : "LOW",
"status" : "WORK_IN_PROGRESS",
"nature" : {
"code" : "NAT_FUNCTIONAL_TESTING"
},
"type" : {
"code" : "TYP_EVOLUTION_TESTING"
},
"prerequisite" : "",
"description" : null,
"automated_test" : null,
"automated_test_technology" : null,
"scm_repository_url" : null,
"scm_repository_id" : null,
"automated_test_reference" : null,
"uuid" : "d480e8fe-7d92-484d-9ded-aff57ce00fac",
"custom_fields" : [ ],
"steps" : [ ],
"parameters" : [ ],
"datasets" : [ ],
"verified_requirements" : [ ],
"script_auto" : "",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"steps" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
},
"parameters" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
},
"datasets" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
}
}
}
-
Modify a scripted test case
HTTP request
PATCH /api/rest/latest/test-cases/240 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 117
Host: localhost:8080
{
"_type" : "scripted-test-case",
"name" : "Christmas turkey test launch",
"script" : "this is Christmas Eve"
}
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2008
{
"_type" : "scripted-test-case",
"id" : 240,
"name" : "Christmas turkey test launch",
"reference" : "",
"project" : {
"_type" : "project",
"id" : 15,
"name" : "Christmas Eve",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"path" : "/Christmas Eve/Christmas turkey test launch",
"parent" : {
"_type" : "project",
"id" : 15,
"name" : "Christmas Eve",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"created_by" : "admin",
"created_on" : "2020-04-02T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-02T10:00:00.000+00:00",
"importance" : "LOW",
"status" : "WORK_IN_PROGRESS",
"nature" : {
"code" : "NAT_FUNCTIONAL_TESTING"
},
"type" : {
"code" : "TYP_EVOLUTION_TESTING"
},
"prerequisite" : "",
"description" : null,
"automated_test" : null,
"automated_test_technology" : null,
"scm_repository_url" : null,
"scm_repository_id" : null,
"automated_test_reference" : null,
"uuid" : "b181406c-ba10-4a31-9ec9-bbdfd097781d",
"custom_fields" : [ ],
"steps" : [ ],
"parameters" : [ ],
"datasets" : [ ],
"script" : "this is Christmas Eve",
"verified_requirements" : [ ],
"script_auto" : "",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"steps" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
},
"parameters" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
},
"datasets" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
}
}
}
-
Modify a keyword test case
HTTP request
PATCH /api/rest/latest/test-cases/240 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 78
Host: localhost:8080
{
"_type" : "keyword-test-case",
"name" : "Christmas turkey test launch"
}
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1969
{
"_type" : "keyword-test-case",
"id" : 240,
"name" : "Christmas turkey test launch",
"reference" : "",
"project" : {
"_type" : "project",
"id" : 15,
"name" : "Christmas Eve",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"path" : "/Christmas Eve/Christmas turkey test launch",
"parent" : {
"_type" : "project",
"id" : 15,
"name" : "Christmas Eve",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"created_by" : "admin",
"created_on" : "2020-04-03T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-03T10:00:00.000+00:00",
"importance" : "LOW",
"status" : "WORK_IN_PROGRESS",
"nature" : {
"code" : "NAT_FUNCTIONAL_TESTING"
},
"type" : {
"code" : "TYP_EVOLUTION_TESTING"
},
"prerequisite" : "",
"description" : null,
"automated_test" : null,
"automated_test_technology" : null,
"scm_repository_url" : null,
"scm_repository_id" : null,
"automated_test_reference" : null,
"uuid" : "bb7b5b00-0db1-4d39-ad35-d30f282df5ce",
"custom_fields" : [ ],
"steps" : [ ],
"parameters" : [ ],
"datasets" : [ ],
"verified_requirements" : [ ],
"script_auto" : "",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"steps" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
},
"parameters" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
},
"datasets" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
}
}
}
-
Modify a test case with automation attributes
HTTP request
PATCH /api/rest/latest/test-cases/240 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 262
Host: localhost:8080
{
"_type" : "scripted-test-case",
"name" : "Christmas turkey test launch",
"script" : "this is Christmas Eve",
"automated_test_technology" : "Cucumber 4",
"scm_repository_id" : 6,
"automated_test_reference" : "",
"automation_status" : "AUTOMATED"
}
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2048
{
"_type" : "scripted-test-case",
"id" : 240,
"name" : "Christmas turkey test launch",
"reference" : "",
"project" : {
"_type" : "project",
"id" : 15,
"name" : "Christmas Eve",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"path" : "/Christmas Eve/Christmas turkey test launch",
"parent" : {
"_type" : "project",
"id" : 15,
"name" : "Christmas Eve",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"created_by" : "admin",
"created_on" : "2020-04-02T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-02T10:00:00.000+00:00",
"importance" : "LOW",
"status" : "WORK_IN_PROGRESS",
"nature" : {
"code" : "NAT_FUNCTIONAL_TESTING"
},
"type" : {
"code" : "TYP_EVOLUTION_TESTING"
},
"prerequisite" : "",
"description" : null,
"automated_test" : null,
"automated_test_technology" : "Cucumber 4",
"scm_repository_url" : "https://github.com/test/repo01 (master)",
"scm_repository_id" : 6,
"automated_test_reference" : "",
"uuid" : "ed81755f-c2f9-4c4e-9ded-dce91d5001a3",
"custom_fields" : [ ],
"steps" : [ ],
"parameters" : [ ],
"datasets" : [ ],
"script" : "this is Christmas Eve",
"verified_requirements" : [ ],
"script_auto" : "",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"steps" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
},
"parameters" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
},
"datasets" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
}
}
}
Get datasets of test case
A GET
to /test-cases/{id}/datasets
returns all the datasets of the test case with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the test case |
HTTP request
GET /api/rest/latest/test-cases/238/datasets 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 fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1804
{
"_embedded" : {
"datasets" : [ {
"_type" : "dataset",
"id" : 1,
"name" : "big_cake",
"parameters" : [ {
"_type" : "parameter",
"id" : 1,
"name" : "cocoa_purity"
}, {
"_type" : "parameter",
"id" : 2,
"name" : "number_of_layers"
} ],
"parameter_values" : [ {
"parameter_test_case_id" : 238,
"parameter_value" : "98%",
"parameter_name" : "cocoa_purity",
"parameter_id" : 1
}, {
"parameter_test_case_id" : 238,
"parameter_value" : "4",
"parameter_name" : "number_of_layers",
"parameter_id" : 2
} ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/1"
}
}
}, {
"_type" : "dataset",
"id" : 2,
"name" : "biscuit",
"parameters" : [ {
"_type" : "parameter",
"id" : 1,
"name" : "cocoa_purity"
}, {
"_type" : "parameter",
"id" : 2,
"name" : "number_of_layers"
} ],
"parameter_values" : [ {
"parameter_test_case_id" : 238,
"parameter_value" : "80%",
"parameter_name" : "cocoa_purity",
"parameter_id" : 1
}, {
"parameter_test_case_id" : 238,
"parameter_value" : "1",
"parameter_name" : "number_of_layers",
"parameter_id" : 2
} ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/2"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238/datasets?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the datasets of this test case |
|
|
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 parameters of test case
A GET
to /test-cases/{id}/parameters
returns all the parameters of the test case with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the test case |
HTTP request
GET /api/rest/latest/test-cases/238/parameters 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 fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1396
{
"_embedded" : {
"parameters" : [ {
"_type" : "parameter",
"id" : 1,
"name" : "cocoa_purity",
"description" : "<p>how refined the cocoa cream should be</p>",
"test_case" : {
"_type" : "keyword-test-case",
"id" : 238,
"name" : "Chocolate cake",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/parameters/1"
}
}
}, {
"_type" : "parameter",
"id" : 2,
"name" : "number_of_layers",
"description" : "<p>how many times should the base pattern be repeated</p>",
"test_case" : {
"_type" : "keyword-test-case",
"id" : 238,
"name" : "Chocolate cake",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/parameters/2"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/238/parameters?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the parameters of this test case |
|
|
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 steps of test case
A GET
to /test-cases/{id}/steps
returns all the steps of the test case with the given id.
-
In case of a standard test case :
Path parameters
Parameter | Description |
---|---|
|
the id of the test case |
HTTP request
GET /api/rest/latest/test-cases/239/steps 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 fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2510
{
"_embedded" : {
"steps" : [ {
"_type" : "action-step",
"id" : 167,
"action" : "<p>Quick step forward</p>\n",
"expected_result" : "<p>So does your opponent</p>\n",
"index" : 0,
"custom_fields" : [ {
"code" : "CHK_BODY_FEINT",
"label" : "requires body feint",
"value" : "false"
} ],
"verified_requirements" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/167"
}
}
}, {
"_type" : "action-step",
"id" : 168,
"action" : "<p>Another quick step forward, albeit smaller</p>\n",
"expected_result" : "<p>Opponent doubles his steps too then lunges forward for an attack</p>\n",
"index" : 1,
"custom_fields" : [ {
"code" : "CHK_BODY_FEINT",
"label" : "requires body feint",
"value" : "true"
} ],
"verified_requirements" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/168"
}
}
}, {
"_type" : "action-step",
"id" : 169,
"action" : "<p>Strong Quarte parry, possibly with a slight retreat.</p>\n",
"expected_result" : "<p>Opponent's attack gets blocked by your blade.</p>\n",
"index" : 2,
"custom_fields" : [ {
"code" : "CHK_BODY_FEINT",
"label" : "requires body feint",
"value" : "false"
} ],
"verified_requirements" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/169"
}
}
}, {
"_type" : "call-step",
"id" : 170,
"delegate_parameter_values" : true,
"called_test_case" : {
"_type" : "test-case",
"id" : 240,
"name" : "Compound riposte",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240"
}
}
},
"called_dataset" : null,
"index" : 3,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/170"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/239/steps?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 4,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the steps of this test case |
|
|
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) |
-
In case of a keyword test case :
Path parameters
Parameter | Description |
---|---|
|
the id of the test case |
HTTP request
GET /api/rest/latest/test-cases/2/steps 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 fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1332
{
"_embedded" : {
"steps" : [ {
"_type" : "keyword-step",
"id" : 180,
"keyword" : "GIVEN",
"action" : "first \"good\" action word",
"datatable" : "",
"docstring" : "",
"comment" : "",
"index" : 0,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/180"
}
}
}, {
"_type" : "keyword-step",
"id" : 181,
"keyword" : "WHEN",
"action" : "second action with \"5\" words",
"datatable" : "",
"docstring" : "",
"comment" : "",
"index" : 1,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/181"
}
}
}, {
"_type" : "keyword-step",
"id" : 182,
"keyword" : "THEN",
"action" : "third action <attribute> word",
"datatable" : "",
"docstring" : "",
"comment" : "",
"index" : 2,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/182"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/2/steps?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 3,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the steps of this test case |
|
|
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) |
Delete test case
A DELETE
to /test-cases/{ids}
deletes one or several test cases/folders with the given id(s).
When a lot of test case should be deleted, the system will determine which of them are really deletable according to the business rules. Once this sorting is done only the deletable items will actually be deleted.
The service returns a list of messages that indicates the result of the operation. If everything goes as expected, this list will be empty. In the case where certain elements could not be deleted (for business rules), the service will return one or more messages which will indicate it to you. Note that these messages are the same as those displayed in the user interface.
Optionally we can pass in parameter 'dry-run = true'. In this case only the diagnostics and messages are returned, but no test case will be deleted.
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the test case |
HTTP request
DELETE /api/rest/latest/test-cases/2,3?dry-run=true HTTP/1.1
Content-Type: application/json
Accept: application/json
Accept-Language: fr_FR_FR
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
indicates if you really want to delete the test case or you just want to do a simulation: if dryRun = true : to do just a delete simulation, if dryRun = false or null: for delete test case |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 322
[ "Les cas de test suivants ne seront pas supprimés : Test-Case3<br/>parce qu'ils sont appelés par les cas de test suivants :\",\n Test-Case 1, Test-Case 4, Test-Case2<br/>\",\nLe cas de test :Test-Case3<br/>est référencé dans au moins une itération. Après sa suppression, il ne pourra plus être exécuté.<br/>" ]
Link requirements to a test case
A POST
to test-cases/{id}/coverages/{requirementIds}
links the requirements to the test case.
Path parameters
Parameter | Description |
---|---|
|
the id of the test case |
|
the ids of the requirements to link |
HTTP request
POST /api/rest/latest/test-cases/240/coverages/12,13,14 HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2664
{
"_type" : "test-case",
"id" : 240,
"name" : "My test case",
"reference" : "",
"project" : {
"_type" : "project",
"id" : 15,
"name" : "My project",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
}
}
},
"parent" : {
"_type" : "test-case-folder",
"id" : 305,
"name" : "My folder",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/305"
}
}
},
"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",
"importance" : "LOW",
"status" : "WORK_IN_PROGRESS",
"nature" : {
"code" : "NAT_FUNCTIONAL_TESTING"
},
"type" : {
"code" : "TYP_EVOLUTION_TESTING"
},
"prerequisite" : "",
"description" : null,
"automated_test" : null,
"automated_test_technology" : null,
"scm_repository_url" : null,
"scm_repository_id" : null,
"automated_test_reference" : null,
"uuid" : "fab298f1-2fd5-4d65-a904-de54f8d87ec1",
"custom_fields" : [ {
"code" : "AUTOMATED",
"label" : "test_is_automated",
"value" : "false"
} ],
"steps" : [ ],
"parameters" : [ ],
"datasets" : [ ],
"verified_requirements" : [ {
"_type" : "requirement-version",
"id" : 12,
"name" : "My first requirement",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/12"
}
}
}, {
"_type" : "requirement-version",
"id" : 13,
"name" : "My second requirement",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/13"
}
}
}, {
"_type" : "requirement-version",
"id" : 14,
"name" : "My third requirement",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/14"
}
}
} ],
"script_auto" : "",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"steps" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
},
"parameters" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
},
"datasets" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
}
}
}
Unlink requirements from a test case
A DELETE
to test-cases/{id}/coverages/{requirementIds}
unlinks the requirements from the test case.
Path parameters
Parameter | Description |
---|---|
|
the id of the test case |
|
the ids of the requirements to unlink |
HTTP request
DELETE /api/rest/latest/test-cases/543/coverages/350,351 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Test Case Folders
This chapter focuses on services for the test case folders.
Get all test case folders
A GET
to /test-case-folders
returns all the test case folders that the user is allowed to read.
HTTP request
GET /api/rest/latest/test-case-folders?page=1&size=3 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1414
{
"_embedded" : {
"test-case-folders" : [ {
"_type" : "test-case-folder",
"id" : 100,
"name" : "top-secret",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/100"
}
}
}, {
"_type" : "test-case-folder",
"id" : 101,
"name" : "confidential",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/101"
}
}
}, {
"_type" : "test-case-folder",
"id" : 102,
"name" : "restricted access",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/102"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders?page=0&size=3"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders?page=0&size=3"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders?page=1&size=3"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders?page=2&size=3"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders?page=3&size=3"
}
},
"page" : {
"size" : 3,
"totalElements" : 10,
"totalPages" : 4,
"number" : 1
}
}
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 test case folders tree by project
A GET
to /test-case-folders/tree/{ids}
returns the test case folders by projects that the user is allowed to read.
HTTP request
GET /api/rest/latest/test-case-folders/tree/10,11 HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 697
[ {
"_type" : "project",
"id" : 10,
"name" : "project-1",
"folders" : [ {
"_type" : "test-case-folder",
"id" : 100,
"name" : "folder1",
"url" : "http://localhost:8080/api/rest/latest/test-case-folders/100",
"children" : [ ]
}, {
"_type" : "test-case-folder",
"id" : 101,
"name" : "folder2",
"url" : "http://localhost:8080/api/rest/latest/test-case-folders/101",
"children" : [ ]
} ]
}, {
"_type" : "project",
"id" : 11,
"name" : "project-2",
"folders" : [ {
"_type" : "test-case-folder",
"id" : 102,
"name" : "folder3",
"url" : "http://localhost:8080/api/rest/latest/test-case-folders/102",
"children" : [ ]
} ]
} ]
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
id of project |
|
|
name of project |
|
|
all folders for the given project |
|
|
the type of the entity |
|
|
id of the test case folder |
|
|
name of the test case folder |
|
|
url of the test case folder |
|
|
children folders |
Create test case folder
A POST
to /test-case-folders
creates a new test case folder. The parent object and the name are required; refer to the complete reference of Get test case folder for the other attributes.
HTTP request
POST /api/rest/latest/test-case-folders HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 257
Host: localhost:8080
{
"_type" : "test-case-folder",
"name" : "Test case folder 1",
"description" : "Description Test case folder 1",
"custom_fields" : [ {
"code" : "cuf1",
"value" : "Cuf1 Value"
} ],
"parent" : {
"_type" : "project",
"id" : 14
}
}
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1351
{
"_type" : "test-case-folder",
"id" : 33,
"name" : "Test case folder 1",
"project" : {
"_type" : "project",
"id" : 14,
"name" : "Test Project 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
},
"parent" : {
"_type" : "project",
"id" : 14,
"name" : "Test Project 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
},
"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",
"description" : "Description Test case folder 1",
"custom_fields" : [ {
"code" : "cuf1",
"label" : "Lib Cuf1",
"value" : "Cuf1 Value"
}, {
"code" : "cuf2",
"label" : "Lib Cuf2",
"value" : "true"
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/33"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"content" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/33/content"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/33/attachments"
}
}
}
Get test case folder
A GET
to /test-case-folders/{id}
returns the test case folder with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the test case folder |
HTTP request
GET /api/rest/latest/test-case-folders/24 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1277
{
"_type" : "test-case-folder",
"id" : 24,
"name" : "Recipes : A-F",
"project" : {
"_type" : "project",
"id" : 10,
"name" : "Recipes inventory",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/10"
}
}
},
"path" : "/Recipes inventory/Recipes : A-F",
"parent" : {
"_type" : "project",
"id" : 10,
"name" : "Recipes inventory",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/10"
}
}
},
"created_by" : "User-1",
"created_on" : "2011-09-30T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-06-16T10:00:00.000+00:00",
"description" : "<p>All recipes in alphabetical order from A to F inclusive</p>",
"custom_fields" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/24"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/10"
},
"content" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/24/content"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/24/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the entity |
|
|
the type of the entity |
|
|
name of the entity |
|
|
project of the entity |
|
|
the location of the entity (either a folder or the project if located at the root of the library) |
|
|
the path of the entity |
|
|
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) |
|
|
description of that entity (html) |
|
|
the attachments of that entity |
|
|
related links |
|
|
the custom fields of this execution step |
Links
Relation | Description |
---|---|
|
the link to this folder |
|
the link to its project |
|
the link to its content |
|
the link to its attachments |
Modify test case folder
A Patch
to /test-case-folders/{id}
modifies the test case folder with the given id.
HTTP request
PATCH /api/rest/latest/test-case-folders/33 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 247
Host: localhost:8080
{
"_type" : "test-case-folder",
"name" : "Update - Test case folder 1",
"description" : "Update - Description Test case folder 1",
"custom_fields" : [ {
"code" : "cuf1",
"label" : "Lib Cuf1",
"value" : "Cuf1 new value"
} ]
}
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1369
{
"_type" : "test-case-folder",
"id" : 33,
"name" : "Update - Test case folder 1",
"project" : {
"_type" : "project",
"id" : 14,
"name" : "Test Project 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
},
"parent" : {
"_type" : "project",
"id" : 14,
"name" : "Test Project 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
},
"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",
"description" : "Update - Description Test case folder 1",
"custom_fields" : [ {
"code" : "cuf1",
"label" : "Lib Cuf1",
"value" : "Cuf1 Value"
}, {
"code" : "cuf2",
"label" : "Lib Cuf2",
"value" : "true"
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/33"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"content" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/33/content"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/33/attachments"
}
}
}
Delete test case folder
A DELETE
to /test-case-folders/{ids}
deletes one or several test case folder with the given id(s). Remember that deleting a folder entails that its content is deleted as well. Also note that test cases that are called by other test cases will not be deleted, unless those test cases are deleted in the same batch.
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the test case folders |
HTTP request
DELETE /api/rest/latest/test-case-folders/21,22 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Get test case folder contents
A GET
to /test-case-folders/{id}/content
returns the content of the test case folder with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the test-case-folder |
HTTP request
GET /api/rest/latest/test-case-folders/180/content 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) |
|
level of depth of the content that should be returned (optional), available values : root or nested (more info in Parameter 'include' section) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1259
{
"_embedded" : {
"content" : [ {
"_type" : "test-case",
"id" : 13,
"name" : "walk test",
"reference" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/13"
}
}
}, {
"_type" : "scripted-test-case",
"id" : 150,
"name" : "fly test",
"reference" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/150"
}
}
}, {
"_type" : "keyword-test-case",
"id" : 180,
"name" : "swim test",
"reference" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/180"
}
}
}, {
"_type" : "test-case-folder",
"id" : 1467,
"name" : "other, non-natural motions",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/1467"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-case-folders/180/content?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 4,
"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 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) |
Test Steps
This chapter focuses on services for the test steps.
Get test step
A GET
to /test-steps/{id}
returns the test step with the given id, this step can be either an action step, a call step, or a keyword step.
Path parameters
Parameter | Description |
---|---|
|
the id of the step (optional) |
HTTP request
GET /api/rest/latest/test-steps/235 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
-
In case of an action step :
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 798
{
"_type" : "action-step",
"id" : 235,
"test_case" : {
"_type" : "test-case",
"id" : 120,
"name" : "Door opening system",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/120"
}
}
},
"action" : "<p>Wave your hand</p>",
"expected_result" : "<p>The door opens</p>",
"index" : 0,
"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" ]
} ],
"verified_requirements" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/235"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the step |
|
|
the type of step |
|
|
the action to be accomplished, format is html |
|
|
the state or behavior that should be observable when the action has been performed, format is html) |
|
|
the test case this step is part of |
|
|
the index of current step in the test case |
|
|
the custom fields of that test step |
|
|
the label of the custom field |
|
|
the code of the custom field |
|
|
the value of the custom field. The value is either a string (for most custom fields), or an array of strings (for multivalued custom fields eg a tag list) |
|
|
the attachments of that test step |
|
|
the list of verified requirements. Please refer to the requirements documentation. |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this step |
-
In case of a call step :
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 854
{
"_type" : "call-step",
"id" : 441,
"test_case" : {
"_type" : "test-case",
"id" : 297,
"name" : "Order a meal",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/297"
}
}
},
"delegate_parameter_values" : false,
"called_test_case" : {
"_type" : "test-case",
"id" : 276,
"name" : "Order a coffee",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/276"
}
}
},
"called_dataset" : {
"_type" : "dataset",
"id" : 33,
"name" : "topping",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/33"
}
}
},
"index" : 0,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/441"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the step |
|
|
the type of step |
|
|
the test case this step belongs to |
|
|
the index of the step in the test case |
|
|
the test case called by this step |
|
|
the dataset to use for the called test case, if any (may be null if not) |
|
|
whether the parameters of the called test case should be set by the caller rather than by a dataset of the called. A value of 'true' usually mean that the 'called_dataset' is null. |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this step |
-
In case of a keyword step :
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 610
{
"_type" : "keyword-step",
"id" : 442,
"test_case" : {
"_type" : "keyword-test-case",
"id" : 298,
"name" : "Order a meal",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/298"
}
}
},
"keyword" : "GIVEN",
"action" : "a customer named \"Gustave\"",
"datatable" : "| product | price |\n| Expresso | 0.40 |",
"docstring" : "",
"comment" : "Products are from France.\nPrices are all with tax.",
"index" : 0,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/442"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the step |
|
|
the type of step |
|
|
the test case this step belongs to |
|
|
the part which gives structure and meaning to an action word. Possible values are : GIVEN, WHEN, THEN, BUT, AND |
|
|
the action of the step |
|
|
the datatable of the step |
|
|
the docstring of the step |
|
|
the comment of the step |
|
|
the index of the step in the test case |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this step |
Modify test step
A PATCH
to /test-steps/{id}
modifies the test step with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the step |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
-
In case of an action step :
HTTP request
PATCH /api/rest/latest/test-steps/210 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 314
Host: localhost:8080
{
"_type" : "action-step",
"action" : "<p>hadouken</p>",
"expected_result" : "<p>ko</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" ]
} ]
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of step |
|
|
the action to be accomplished, format is html |
|
|
the state or behavior that should be observable when the action has been performed, format is html) |
|
|
the custom fields of that test step |
|
|
the code of the custom field |
|
|
the value of the custom field. The value is either a string (for most custom fields), or an array of strings (for multivalued custom fields eg a tag list) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 874
{
"_type" : "action-step",
"id" : 210,
"test_case" : {
"_type" : "test-case",
"id" : 240,
"name" : "target test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240"
}
}
},
"action" : "<p>hadouken</p>",
"expected_result" : "<p>ko</p>",
"index" : 0,
"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" ]
} ],
"verified_requirements" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/210"
},
"test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the step |
|
|
the test case this step is part of |
|
|
the index of current step in the test case |
|
|
the label of the custom field |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this step |
|
link to the test case where this step belongs |
-
In case of a call step :
HTTP request
PATCH /api/rest/latest/test-steps/441 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 150
Host: localhost:8080
{
"_type" : "call-step",
"delegate_parameter_values" : "false",
"index" : 0,
"called_dataset" : {
"_type" : "dataset",
"id" : 33
}
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of step |
|
|
whether the parameters of the called test case should be set by the caller rather than by a dataset of the called. A value of 'true' usually mean that the 'called_dataset' is null. |
|
|
the index of the step in the test case |
|
|
the dataset to use for the called test case, if any (may be null if not) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 954
{
"_type" : "call-step",
"id" : 441,
"test_case" : {
"_type" : "test-case",
"id" : 297,
"name" : "target test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/297"
}
}
},
"delegate_parameter_values" : false,
"called_test_case" : {
"_type" : "test-case",
"id" : 365,
"name" : "call me later",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/365"
}
}
},
"called_dataset" : {
"_type" : "dataset",
"id" : 33,
"name" : "topping",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/33"
}
}
},
"index" : 0,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/441"
},
"test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/297"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the step |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this step |
|
link to the test case where this step belongs |
-
In case of a keyword step :
HTTP request
PATCH /api/rest/latest/test-steps/441 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 293
Host: localhost:8080
{
"_type" : "keyword-step",
"index" : 0,
"keyword" : "GIVEN",
"action" : "I am \"happy\"",
"datatable" : "| Product | Price |\n| Espresso | 0.30 |\n| Cappuccino | 0.30 |\n| Macchiato | 0.30 |",
"docstring" : "",
"comment" : "Products are from France.\nPrices are all with tax."
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of step |
|
|
the index of the step in the test case |
|
|
the part which gives structure and meaning to an action word. Possible values are : GIVEN, WHEN, THEN, BUT, AND |
|
|
the action of the step |
|
|
the datatable of the step |
|
|
the docstring of the step |
|
|
the comment of the step |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 748
{
"_type" : "keyword-step",
"id" : 441,
"test_case" : {
"_type" : "keyword-test-case",
"id" : 297,
"name" : "target test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/297"
}
}
},
"keyword" : "AND",
"action" : "I am \"happy\"",
"datatable" : "| Product | Price |\n| Espresso | 0.30 |\n| Cappuccino | 0.30 |\n| Macchiato | 0.30 |",
"docstring" : "",
"comment" : "Products are from France.\nPrices are all with tax.",
"index" : 0,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/441"
},
"keyword-test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/297"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the step |
|
|
the test case this step is part of |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this step |
|
link to the test case where this step belongs |
Delete test step
A DELETE
to /test-steps/{ids}
deletes the test steps with the given ids.
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the steps |
HTTP request
DELETE /api/rest/latest/test-steps/169,180 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Create test step
A POST
to /test-cases/{testCaseId}/steps
creates a new test step (action step or call step).
Path parameters
Parameter | Description |
---|---|
|
the id of the test case of which to add new test step |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
-
In case of an action step :
HTTP request
POST /api/rest/latest/test-cases/240/steps HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 331
Host: localhost:8080
{
"_type" : "action-step",
"action" : "<p>simple test step</p>",
"expected_result" : "<p>action step</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" ]
} ]
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of step |
|
|
the action to be accomplished, format is html |
|
|
the state or behavior that should be observable when the action has been performed, format is html) |
|
|
the custom fields of that test step |
|
|
the code of the custom field |
|
|
the value of the custom field. The value is either a string (for most custom fields), or an array of strings (for multivalued custom fields eg a tag list) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 891
{
"_type" : "action-step",
"id" : 210,
"test_case" : {
"_type" : "test-case",
"id" : 240,
"name" : "target test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240"
}
}
},
"action" : "<p>simple test step</p>",
"expected_result" : "<p>action step</p>",
"index" : 0,
"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" ]
} ],
"verified_requirements" : [ ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/210"
},
"test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/240"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the step |
|
|
the test case this step is part of |
|
|
the index of current step in the test case |
|
|
the label of the custom field |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this step |
|
link to the test case where this step belongs |
-
In case of a call step :
HTTP request
POST /api/rest/latest/test-cases/297/steps HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 267
Host: localhost:8080
{
"_type" : "call-step",
"delegate_parameter_values" : false,
"called_test_case" : {
"_type" : "test-case",
"id" : 276,
"name" : "test case been called"
},
"called_dataset" : {
"_type" : "dataset",
"id" : 33,
"name" : "topping"
}
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of step |
|
|
whether the parameters of the called test case should be set by the caller rather than by a dataset of the called. A value of 'true' usually mean that the 'called_dataset' is null. |
|
|
the test case called by this step |
|
|
the dataset to use for the called test case, if any (may be null if not) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 962
{
"_type" : "call-step",
"id" : 441,
"test_case" : {
"_type" : "test-case",
"id" : 297,
"name" : "target test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/297"
}
}
},
"delegate_parameter_values" : false,
"called_test_case" : {
"_type" : "test-case",
"id" : 276,
"name" : "test case been called",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/276"
}
}
},
"called_dataset" : {
"_type" : "dataset",
"id" : 33,
"name" : "topping",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/33"
}
}
},
"index" : 0,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/441"
},
"test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/297"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the step |
|
|
the test case this step belongs to |
|
|
the index of the step in the test case |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this step |
|
link to the test case where this step belongs |
-
In case of a keyword step :
HTTP request
POST /api/rest/latest/test-cases/241/steps HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 277
Host: localhost:8080
{
"_type" : "keyword-step",
"keyword" : "AND",
"action" : "I have 5 apples",
"datatable" : "| Product | Price |\n| Espresso | 0.30 |\n| Cappuccino | 0.40 |\n| Macchiato | 0.40 |",
"docstring" : "",
"comment" : "Products are from France.\nPrices are all with tax."
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of step |
|
|
the part which gives structure and meaning to an action word. Possible values are : GIVEN, WHEN, THEN, BUT, AND |
|
|
the action of the step |
|
|
the datatable of the step |
|
|
the docstring of the step |
|
|
the comment of the step |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 761
{
"_type" : "keyword-step",
"id" : 210,
"test_case" : {
"_type" : "keyword-test-case",
"id" : 241,
"name" : "target keyword test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/241"
}
}
},
"keyword" : "AND",
"action" : "I have \"5\" apples",
"datatable" : "| Product | Price |\n| Espresso | 0.30 |\n| Cappuccino | 0.40 |\n| Macchiato | 0.40 |",
"docstring" : "",
"comment" : "Products are from France.\nPrices are all with tax.",
"index" : 0,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/210"
},
"keyword-test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/241"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the step |
|
|
the keyword test case this keyword step is part of |
|
|
the index of current keyword step in the keyword test case |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this keyword step |
|
link to the keyword test case where this keyword step belongs |
Link requirements to a test step
A POST
to test-steps/{id}/coverages/{requirementIds}
links the requirements to the test step.
Path parameters
Parameter | Description |
---|---|
|
the id of the test step |
|
the ids of the requirements to link |
HTTP request
POST /api/rest/latest/test-steps/235/coverages/12,13,14 HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1473
{
"_type" : "action-step",
"id" : 235,
"test_case" : {
"_type" : "test-case",
"id" : 120,
"name" : "Door opening system",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/120"
}
}
},
"action" : "<p>Wave your hand</p>",
"expected_result" : "<p>The door opens</p>",
"index" : 0,
"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" ]
} ],
"verified_requirements" : [ {
"_type" : "requirement-version",
"id" : 12,
"name" : "My first requirement",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/12"
}
}
}, {
"_type" : "requirement-version",
"id" : 13,
"name" : "My second requirement",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/13"
}
}
}, {
"_type" : "requirement-version",
"id" : 14,
"name" : "My third requirement",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-versions/14"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-steps/235"
}
}
}
Unlink requirements from a test step
A DELETE
to test-steps/{id}/coverages/{requirementIds}
unlinks the requirements from the test step.
Path parameters
Parameter | Description |
---|---|
|
the id of the test step |
|
the ids of the requirements to unlink |
HTTP request
DELETE /api/rest/latest/test-steps/235/coverages/12,14 HTTP/1.1
Accept: application/json
Host: localhost:8080
Test Suites
This chapter focuses on services for the test suites.
Note : A Test Suite is a partition of an Iteration, more specifically its test plan is a partition of that of the Iteration it belongs to. Technically they share the same instances of IterationTestPlanItem; however the lifecycle of those items is managed by the Iteration only. Therefore, in the context of a Test Suite the semantic of PUTing or DELETEing an item changes slightly : those operations becomes 'attach' or 'detach' items. An item is available to a Test Suite only if it has been created first within the Iteration.
Get test suite
A GET
to /test-suites/{id}
returns the test suite with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the test suite |
HTTP request
GET /api/rest/latest/test-suites/9 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3499
{
"_type" : "test-suite",
"id" : 9,
"name" : "sample test suite",
"description" : "<p>this is a sample test suite</p>",
"uuid" : "2f7198zd-eb2e-4379-f82d-ddc207c866bd",
"status" : "READY",
"parent" : {
"_type" : "iteration",
"id" : 101,
"name" : "second iteration",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/101"
}
}
},
"created_by" : "admin",
"created_on" : "2017-07-12T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-12T10:00:00.000+00:00",
"custom_fields" : [ {
"code" : "CF_TXT",
"label" : "cuf text",
"value" : "the_value"
}, {
"code" : "CF_TAG",
"label" : "cuf tag",
"value" : [ "tag_1", "tag_2" ]
} ],
"test_plan" : [ {
"_type" : "iteration-test-plan-item",
"id" : 80,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 90,
"name" : "first test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/90"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 5,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/5"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/80"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 41,
"execution_status" : "SUCCESS",
"referenced_test_case" : {
"_type" : "scripted-test-case",
"id" : 91,
"name" : "scripted test case 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/91"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 9,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/9"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/41"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 95,
"execution_status" : "SUCCESS",
"referenced_test_case" : {
"_type" : "keyword-test-case",
"id" : 105,
"name" : "keyword test case 3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/105"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 18,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/18"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/95"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"iteration" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/101"
},
"test-plan" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9/test-plan"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the test suite |
|
|
the type of the entity |
|
|
the name of the test suite |
|
|
the description of the test suite |
|
|
the uuid of the test suite |
|
|
the status of the test suite |
|
|
the parent entity of the test suite |
|
|
the user who created the test suite |
|
|
the date the test suite was created |
|
|
the user who last modified the test suite |
|
|
the date the test suite was last modified |
|
|
the custom fields of the test suite |
|
|
the iteration test plan items of the test suite |
|
|
the attachments of the test suite |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this test suite |
|
link to the project the test suite belongs to |
|
link to the iteration the test suite belongs to |
|
link the test plan of the test suite |
|
link the test plan of the test suite |
Create test suite
A POST
to /test-suites
creates a new test suite with or without test plan .
HTTP request
POST /api/rest/latest/test-suites HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 430
Host: localhost:8080
{
"_type" : "test-suite",
"name" : "sample test suite",
"description" : "<p>this is a sample test suite</p>",
"parent" : {
"_type" : "iteration",
"id" : 101
},
"custom_fields" : [ {
"code" : "CF_TXT",
"label" : "cuf text",
"value" : "the_value"
} ],
"test_plan" : [ {
"_type" : "iteration-test-plan-item",
"id" : 80
}, {
"_type" : "iteration-test-plan-item",
"id" : 41
} ]
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the name of the iteration |
|
|
the description of the test suite |
|
|
the parent iteration of this test suite |
|
|
the iteration test plan items of the test suite (optional) |
|
|
the custom fields of this iteration |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 3497
{
"_type" : "test-suite",
"id" : 9,
"name" : "sample test suite",
"description" : "<p>this is a sample test suite</p>",
"uuid" : "2f7198zd-eb2e-4379-f82d-ddc207c866bd",
"status" : "READY",
"parent" : {
"_type" : "iteration",
"id" : 101,
"name" : "second iteration",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/101"
}
}
},
"created_by" : "admin",
"created_on" : "2017-07-12T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-12T10:00:00.000+00:00",
"custom_fields" : [ {
"code" : "CF_TXT",
"label" : "cuf text",
"value" : "the_value"
}, {
"code" : "CF_TAG",
"label" : "cuf tag",
"value" : [ "tag_1", "tag_2" ]
} ],
"test_plan" : [ {
"_type" : "iteration-test-plan-item",
"id" : 80,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 90,
"name" : "first test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/90"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 5,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/5"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/80"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 41,
"execution_status" : "SUCCESS",
"referenced_test_case" : {
"_type" : "scripted-test-case",
"id" : 91,
"name" : "scripted test case 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/91"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 9,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/9"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/41"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 81,
"execution_status" : "SUCCESS",
"referenced_test_case" : {
"_type" : "keyword-test-case",
"id" : 99,
"name" : "keyword test case 3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/99"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 19,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/19"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/81"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"iteration" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/101"
},
"test-plan" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9/test-plan"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9/attachments"
}
}
}
Modify test suite
A PATCH
to /test-suites/{id}
modifies the test suite with the given id. You can modify description, status, and/or custom fields.
Path parameters
Parameter | Description |
---|---|
|
the id of the test suite |
HTTP request
PATCH /api/rest/latest/test-suites/9 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 229
Host: localhost:8080
{
"_type" : "test-suite",
"description" : "<p>modified description sample test suite</p>",
"status" : "SUCCESS",
"custom_fields" : [ {
"code" : "CF_TXT",
"label" : "cuf text",
"value" : "the_new_value"
} ]
}
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3516
{
"_type" : "test-suite",
"id" : 9,
"name" : "sample test suite",
"description" : "<p>modified description sample test suite</p>",
"uuid" : "2f7198zd-eb2e-4379-f82d-ddc207c866bd",
"status" : "SUCCESS",
"parent" : {
"_type" : "iteration",
"id" : 101,
"name" : "second iteration",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/101"
}
}
},
"created_by" : "admin",
"created_on" : "2017-07-12T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-12T10:00:00.000+00:00",
"custom_fields" : [ {
"code" : "CF_TXT",
"label" : "cuf text",
"value" : "the_new_value"
}, {
"code" : "CF_TAG",
"label" : "cuf tag",
"value" : [ "tag_1", "tag_2" ]
} ],
"test_plan" : [ {
"_type" : "iteration-test-plan-item",
"id" : 80,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 90,
"name" : "first test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/90"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 5,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/5"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/80"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 41,
"execution_status" : "SUCCESS",
"referenced_test_case" : {
"_type" : "scripted-test-case",
"id" : 91,
"name" : "scripted test case 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/91"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 9,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/9"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/41"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 91,
"execution_status" : "SUCCESS",
"referenced_test_case" : {
"_type" : "keyword-test-case",
"id" : 191,
"name" : "keyword test case 3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/191"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 29,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/29"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/91"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"iteration" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/101"
},
"test-plan" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9/test-plan"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9/attachments"
}
}
}
Attach item to test suite
A POST
to /test-suites/{idTestSuite}/test-plan/{ids}
attach one or several test plan item to a test suite with the given id(s), and return the content of the test suite.
If among the targeted items some cannot be attached due to validation errors (see below) they won’t be processed; only those that pass the validation will be attached. The operation will return no error message : the user will receive the modified test suite instead, and can then check that the final state is consistent with its expectations.
The possible validation errors are : * the item does not exist, * the item and the test suite belong to different iterations, * the user does not have the required permissions.
Path parameters
Parameter | Description |
---|---|
|
the id of the test suite |
|
the id(s) of the test plan item |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3321
{
"_type" : "test-suite",
"id" : 9,
"name" : "sample test suite",
"description" : "<p>this is a sample test suite</p>",
"uuid" : "2f7198zd-eb2e-4379-f82d-ddc207c866bd",
"status" : "SUCCESS",
"parent" : {
"_type" : "iteration",
"id" : 101,
"name" : "first iteration",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/101"
}
}
},
"created_by" : "admin",
"created_on" : "2017-07-12T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-12T10:00:00.000+00:00",
"custom_fields" : [ ],
"test_plan" : [ {
"_type" : "iteration-test-plan-item",
"id" : 80,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 90,
"name" : "first test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/90"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 5,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/5"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/80"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 81,
"execution_status" : "SUCCESS",
"referenced_test_case" : {
"_type" : "scripted-test-case",
"id" : 91,
"name" : "scripted test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/91"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 6,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/6"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/81"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 82,
"execution_status" : "SUCCESS",
"referenced_test_case" : {
"_type" : "keyword-test-case",
"id" : 92,
"name" : "keyword test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/92"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 7,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/7"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/82"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"iteration" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/101"
},
"test-plan" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9/test-plan"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9/attachments"
}
}
}
Detach item of test suite
A DELETE
to /test-suites/{idTestSuite}/test-plan/{ids}
Detached one or several test plan item of test suite with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the id of the test suite |
|
the id(s) of the test plan item |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3504
{
"_type" : "test-suite",
"id" : 9,
"name" : "sample test suite",
"description" : "<p>modified description sample test suite</p>",
"uuid" : "2f7198zd-eb2e-4379-f82d-ddc207c866bd",
"status" : "SUCCESS",
"parent" : {
"_type" : "iteration",
"id" : 101,
"name" : "second iteration",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/101"
}
}
},
"created_by" : "admin",
"created_on" : "2017-07-12T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-12T10:00:00.000+00:00",
"custom_fields" : [ {
"code" : "CF_TXT",
"label" : "cuf text",
"value" : "the_new_value"
}, {
"code" : "CF_TAG",
"label" : "cuf tag",
"value" : [ "tag_1", "tag_2" ]
} ],
"test_plan" : [ {
"_type" : "iteration-test-plan-item",
"id" : 80,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 90,
"name" : "first test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/90"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 5,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/5"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/80"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 81,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "scripted-test-case",
"id" : 91,
"name" : "scripted test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/91"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 6,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/6"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/81"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 82,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "keyword-test-case",
"id" : 92,
"name" : "keyword test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/92"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 7,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/7"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/82"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"iteration" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/101"
},
"test-plan" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9/test-plan"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9/attachments"
}
}
}
Delete test suite
A DELETE
to /test-suites/{ids}
deletes one or several test suites with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the test suites |
HTTP request
DELETE /api/rest/latest/test-suites/169,189 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Get plans of test suite
A GET
to /test-suites/{id}/test-plan
returns all the test plans of the test suite with the given id.
HTTP request
GET /api/rest/latest/test-suites/44/test-plan 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 fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 6809
{
"_embedded" : {
"test-plan" : [ {
"_type" : "iteration-test-plan-item",
"id" : 1,
"execution_status" : "BLOCKED",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 1,
"name" : "sample test case 1",
"reference" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/1"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 1,
"name" : "sample dataset 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/1"
}
}
},
"last_executed_by" : "User-1",
"last_executed_on" : "2017-07-13T10:00:00.000+00:00",
"assigned_to" : "User-1",
"executions" : [ {
"_type" : "execution",
"id" : 11,
"execution_status" : "FAILURE",
"last_executed_by" : "User-1",
"last_executed_on" : "2017-07-13T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/11"
}
}
}, {
"_type" : "execution",
"id" : 21,
"execution_status" : "BLOCKED",
"last_executed_by" : "User-1",
"last_executed_on" : "2017-07-13T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/21"
}
}
} ],
"iteration" : {
"_type" : "iteration",
"id" : 1,
"name" : "sample iteration 1",
"reference" : "IT1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/1"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 2,
"execution_status" : "SUCCESS",
"referenced_test_case" : {
"_type" : "scripted-test-case",
"id" : 2,
"name" : "sample test case 2",
"reference" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/2"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 2,
"name" : "sample dataset 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/2"
}
}
},
"last_executed_by" : "User-2",
"last_executed_on" : "2017-07-15T10:00:00.000+00:00",
"assigned_to" : "User-2",
"executions" : [ {
"_type" : "scripted-execution",
"id" : 12,
"execution_status" : "SUCCESS",
"last_executed_by" : "User-2",
"last_executed_on" : "2017-07-07T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/12"
}
}
}, {
"_type" : "scripted-execution",
"id" : 22,
"execution_status" : "BLOCKED",
"last_executed_by" : "User-2",
"last_executed_on" : "2017-07-15T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/22"
}
}
}, {
"_type" : "scripted-execution",
"id" : 32,
"execution_status" : "RUNNING",
"last_executed_by" : "User-2",
"last_executed_on" : "2017-07-20T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/32"
}
}
} ],
"iteration" : {
"_type" : "iteration",
"id" : 2,
"name" : "sample iteration 2",
"reference" : "IT2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/2"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/2"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 3,
"execution_status" : "SUCCESS",
"referenced_test_case" : {
"_type" : "keyword-test-case",
"id" : 3,
"name" : "sample test case 3",
"reference" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/3"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 3,
"name" : "sample dataset 3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/3"
}
}
},
"last_executed_by" : "User-3",
"last_executed_on" : "2020-04-15T10:00:00.000+00:00",
"assigned_to" : "User-3",
"executions" : [ {
"_type" : "keyword-execution",
"id" : 13,
"execution_status" : "SUCCESS",
"last_executed_by" : "User-3",
"last_executed_on" : "2020-04-15T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/13"
}
}
}, {
"_type" : "keyword-execution",
"id" : 23,
"execution_status" : "BLOCKED",
"last_executed_by" : "User-3",
"last_executed_on" : "2020-04-15T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/23"
}
}
}, {
"_type" : "keyword-execution",
"id" : 33,
"execution_status" : "RUNNING",
"last_executed_by" : "User-3",
"last_executed_on" : "2020-04-15T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/33"
}
}
} ],
"iteration" : {
"_type" : "iteration",
"id" : 2,
"name" : "sample iteration 2",
"reference" : "IT2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/2"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/3"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/44/test-plan?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 3,
"totalPages" : 1,
"number" : 0
}
}
Users
This chapter focuses on services for the users.
Get all users
A GET
to /users
returns all the users.
HTTP request
GET /api/rest/latest/users?page=2&size=1 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) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 894
{
"_embedded" : {
"users" : [ {
"_type" : "user",
"id" : 486,
"login" : "User-1",
"active" : true,
"group" : "User",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/users?page=0&size=1"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/users?page=1&size=1"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users?page=2&size=1"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/users?page=3&size=1"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/users?page=4&size=1"
}
},
"page" : {
"size" : 1,
"totalElements" : 5,
"totalPages" : 5,
"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 user
A POST
to /users
creates a new user.
HTTP request
POST /api/rest/latest/users HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 214
Host: localhost:8080
{
"_type" : "user",
"first_name" : "Charles",
"last_name" : "Dupond",
"login" : "User-1",
"password" : "123456",
"email" : "charlesdupond@aaaa@aa",
"group" : "User",
"can_delete_from_front" : true
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the first name of the user (optional) |
|
|
the last name of the user |
|
|
the login of the user |
|
|
the password of the user |
|
|
the email address of the user (optional) |
|
|
the group of the user belongs to (admin or user) |
|
|
whether the user can delete library entities from the front-end with the Squash TM Premium plugin |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 566
{
"_type" : "user",
"id" : 987,
"first_name" : "Charles",
"last_name" : "Dupond",
"login" : "User-1",
"email" : "charlesdupond@aaaa.aa",
"active" : true,
"group" : "User",
"can_delete_from_front" : true,
"teams" : [ ],
"last_connected_on" : "2018-03-05T11:00:00.000+00:00",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/987"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the user |
|
|
whether the user is activate or not |
|
|
the team of the user participate |
|
|
the date of this user was last connected |
|
|
the user who created this user account |
|
|
the date of this user account was created |
|
|
the user who last modified this user account |
|
|
the date of this user account was last modified |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this user |
Get user
A GET
to /users/{id}
returns the user with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the user |
HTTP request
GET /api/rest/latest/users/486 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 566
{
"_type" : "user",
"id" : 486,
"first_name" : "Charles",
"last_name" : "Dupond",
"login" : "User-1",
"email" : "charlesdupond@aaaa.aa",
"active" : true,
"group" : "User",
"can_delete_from_front" : true,
"teams" : [ ],
"last_connected_on" : "2018-02-11T11:00:00.000+00:00",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the user |
|
|
the first name of the user |
|
|
the last name of the user |
|
|
the login of the user |
|
|
the email address of the user |
|
|
whether the user is activate or not |
|
|
the group of the user belongs to (admin or user) |
|
|
whether the user can delete library entities from the front-end with the Squash TM Premium plugin |
|
|
the team of the user participate |
|
|
the date of this user was last connected |
|
|
the user who created this user account |
|
|
the date of this user account was created |
|
|
the user who last modified this user account |
|
|
the date of this user account was last modified |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this user |
Modify user
A PATCH
to /users/{id}
modifies the user with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the user |
HTTP request
PATCH /api/rest/latest/users/987 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 236
Host: localhost:8080
{
"_type" : "user",
"first_name" : "Charles",
"last_name" : "Dupond",
"login" : "User-42",
"password" : "123456",
"email" : "charlesdupond@bbbb@bb",
"active" : false,
"group" : "User",
"can_delete_from_front" : false
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the first name of the user |
|
|
the last name of the user |
|
|
the login of the user |
|
|
the password of the user |
|
|
the email address of the user |
|
|
whether the user is activate or not |
|
|
the group of the user belongs to (admin or user) |
|
|
whether the user can delete library entities from the front-end with the Squash TM Premium plugin |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 569
{
"_type" : "user",
"id" : 987,
"first_name" : "Charles",
"last_name" : "Dupond",
"login" : "User-42",
"email" : "charlesdupond@bbbb.bb",
"active" : false,
"group" : "User",
"can_delete_from_front" : false,
"teams" : [ ],
"last_connected_on" : "2018-03-05T11:00:00.000+00:00",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/987"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the user |
|
|
the team of which the user is a member |
|
|
the date of this user was last connected |
|
|
the user who created this user account |
|
|
the date of this user account was created |
|
|
the user who last modified this user account |
|
|
the date of this user account was last modified |
|
|
whether the user can delete library entities from the front-end with the Squash TM Premium plugin |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this user |
Delete user
A DELETE
to /users/{ids}
deletes one or several user(s) with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the users |
HTTP request
DELETE /api/rest/latest/users/169,189 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Get user subscribed teams
A GET
to /users/{id}/teams
returns all the subscribed teams of the user with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the user |
HTTP request
GET /api/rest/latest/users/486/teams 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 fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1120
{
"_embedded" : {
"teams" : [ {
"_type" : "team",
"id" : 567,
"name" : "Team A",
"description" : "<p>black panther</p>",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/567"
}
}
}, {
"_type" : "team",
"id" : 568,
"name" : "Team B",
"description" : "<p>black widow</p>",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/568"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486/teams?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the teams of this user |
|
|
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) |
Subscribe to teams
A POST
to /users/{userId}/teams
with teamIds in request parameters subscribes the user with the given id to these teams.
Path parameters
Parameter | Description |
---|---|
|
the id of the user |
HTTP request
POST /api/rest/latest/users/987/teams?teamIds=486,487 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
the list of ids of the teams |
Unsubscribe from teams
A DELETE
to /users/{userId}/teams
with teamIds in request parameters unsubscribes the user with the given id from these teams.
Path parameters
Parameter | Description |
---|---|
|
the id of the user |
HTTP request
DELETE /api/rest/latest/users/987/teams?teamIds=486,487 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
the list of ids of the teams |
Get user permissions
A GET
to /users/{id}/permissions
returns the permission groups of the user with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the user |
HTTP request
GET /api/rest/latest/users/486/permissions HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1291
{
"content" : {
"validator" : [ {
"_type" : "project",
"id" : 369,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "proj3",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/369"
}
}
} ],
"advanced_tester" : [ {
"_type" : "project",
"id" : 367,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "proj1",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367"
}
}
}, {
"_type" : "project",
"id" : 368,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "proj2",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/368"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486/permissions"
}
}
}
Links
Relation | Description |
---|---|
|
the link to this user permissions |
Add permissions to user
A POST
to /users/{id}/permissions/{permissionGroup}
adds permission group of the user with the given id.
The possible {permissionGroup} are test_editor, project_viewer, project_manager, test_runner, test_designer, advanced_tester and validator.
Path parameters
Parameter | Description |
---|---|
|
the id of the user |
|
the permission group |
HTTP request
POST /api/rest/latest/users/486/permissions/advanced_tester?ids=369 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
the ids of the projects |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 535
{
"content" : {
"advanced_tester" : [ {
"_type" : "project",
"id" : 369,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "proj3",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/369"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486/permissions"
}
}
}
Links
Relation | Description |
---|---|
|
the link to this user permissions |
Delete permission(s) for user
A DELETE
to /users/{id}/permissions
deletes one or several permissions for the given user (ids of projects separated with comma).
Path parameters
Parameter | Description |
---|---|
|
the id of the user |
HTTP request
DELETE /api/rest/latest/users/486/permissions?ids=369 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
the ids of the projects |