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 (4.1.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):

Table 1. HTTP methods
Method Usage

GET

Requests resource(s) from the server

POST

Submits new resources to the server

PATCH

Submits modifications of an existing resource

DELETE

Requests suppression of one or several resources

HTTP status codes

The system replies with conventional HTTP statuses, here is a short reminder:

Table 2. HTTP status
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.

Example : minimal representation of a test case folder
 {
     "_type" : "test-case-folder",   1
     "id" : 10,                      2
     "_links" : {                    3
         "self" : {
             "href" : "http://localhost:8080/squash/api/rest/latest/test-case-folders/10"
         }
     }
 }
1 The _type here is the hyphenated lowercase name of the entity type.
2 This is the id of that instance of the entity.
3 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).

Note 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.

Example of unauthorized resources:
{
    "_type" : "test-case",                                  1
    "id" : 4567,
    ...,
    "verified_requirements": [
        {
            "_type": "unauthorized-resource",               2
            "resource_type": "requirement-version",         3
            "resource_id": 256,                             4
            "_links": {                                     5
                "self": {
                    "href": "http://localhost:8080/squash/api/rest/latest/requirement-versions/256"
                }
            }
        }
    ],
    ...
}
1 The user can access the content of the test case as usual.
2 The _type here is the special type unauthorized-resource.
3 This is the real type of the unauthorized resource.
4 This is the id of the unauthorized resource.
5 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.

Example of an automated execution:
{
  "_type" : "execution",                                        1
  "id" : 56,
  "name" : "sample test case 56",
  "execution_order" : 4,
  "execution_status" : "BLOCKED",
  "execution_mode" : "AUTOMATED",
  "automated_execution_extender" : {                            2
    "_type" : "automated-execution-extender",
    "id" : 778,
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/automated-execution-extenders/778"
      }
    }
  },
  ...
}
1 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).
2 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.

Note 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.

Example of a paginated query:
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": {     1
        "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": {       2
        "size": 1,
        "totalElements": 6,
        "totalPages": 6,
        "number": 2
    }
}
1 It represents the links to the first, previous, current, next and last page. Other query parameters (such as the size) are left untouched.
2 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

Warning 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.

Example: find everything contained in a folder
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.

Table 3. Example: valid filter expressions (applied to a test-case):
Expression Effect

id,label,reference

Renders the properties label, reference and the identifier properties (including id).

id,label,steps[action, called_test_case[name,reference]]

Renders the id, label and test steps. The steps will include the identifier properties, the action to be accomplished and the called_test_case in case the step is a call step. The called test cases will be rendered with their properties name and reference (and identifier properties).

*

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 reference.

Table 4. Example: invalid filter expressions
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.

Example: usage of the parameter filter
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.

Table 5. Entity and rel names
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

Table 1. /api/rest/latest/attachments/{id}
Parameter Description

id

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

fields

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

id

Number

the id of the attachment

_type

String

the type of the entity

name

String

the name of the attachment

file_type

String

the file type of the attachment

size

Number

the size of the attachment

added_on

String

the date this attachment was uploaded

_links

Object

related links

Relation Description

self

link to this attachment

content

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

Table 1. /api/rest/latest/attachments/{id}
Parameter Description

id

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

name

the new name for this attachment

fields

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

id

Number

the id of the attachment

_type

String

the type of the entity

name

String

the name of the attachment

file_type

String

the file type of the attachment

size

Number

the size of the attachment

added_on

String

the date this attachment was uploaded

_links

Object

related links

Relation Description

self

link to this attachment

content

link to download this attachment

Download attachment

A GET to /attachments/{id}/content downloads the attachment with the given id.

Path parameters

Table 1. /api/rest/latest/attachments/{id}/content
Parameter Description

id

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

Table 1. /api/rest/latest/{owner}/{ownerId}/attachments
Parameter Description

owner

the owner of the attachment

ownerId

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

_embedded.attachments

Array

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

Table 1. /api/rest/latest/{owner}/{ownerId}/attachments
Parameter Description

owner

the owner of the attachment

ownerId

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

attachmentIds

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

Table 1. /api/rest/latest/automated-execution-extenders/{id}
Parameter Description

id

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

fields

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

id

Number

the id of the automated execution extender

_type

String

the type of the entity

execution

Object

the execution associated to this automated execution extender

automated_test

Object

the automated test associated to this automated execution extender

result_url

String

the result url of the automated execution extender

result_summary

String

the result summary of the automated execution extender

result_status

String

the result status of the automated execution extender

execution_node

String

the node name of the automated execution extender

_links

Object

related links

Relation Description

self

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

type

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

_embedded.automated-suites

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/automated-suites/{id}
Parameter Description

id

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

fields

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

id

String

the uuid of the automated suite

_type

String

the type of the entity

_links

Object

related links

Relation Description

self

link to this automated test

executions

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

Table 1. /api/rest/latest/automated-suites/{id}/executions
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

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

_embedded.automated-execution-extenders

Array

the automated execution extenders of this automated suite

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

iterationId

the id of the iteration

fields

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

id

String

the uuid of the automated suite

_type

String

the type of the entity

_links

Object

related links

Relation Description

self

link to this automated test

executions

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

itemIds

the ids of the iteration test plan items

fields

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

id

String

the uuid of the automated suite

_type

String

the type of the entity

_links

Object

related links

Relation Description

self

link to this automated test

executions

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

testSuiteId

the id of the test suite

fields

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

id

String

the uuid of the automated suite

_type

String

the type of the entity

_links

Object

related links

Relation Description

self

link to this automated test

executions

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

Table 1. /api/rest/latest/automated-suite-utils/{suiteId}/executor
Parameter Description

suiteId

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

fields

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

id

String

the uuid of the automated suite

_type

String

the type of the entity

_links

Object

related links

Relation Description

self

link to this automated test

executions

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

Table 1. /api/rest/latest/automated-test-technologies/{id}
Parameter Description

id

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

fields

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

_type

String

the type of the entity

id

Number

the id of the technology

name

String

the name of the technology

action_provider_key

String

the action provider key of the technology

_links

Object

related links

Relation Description

self

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

type

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

_embedded.automated-test-technologies

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

_type

String

the type of the entity

name

String

the name of the technology

action_provider_key

String

the action provider key of the technology

Request parameters

Parameter Description

fields

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

id

Number

the id of the entity

_type

String

the type of the entity

name

String

the name of the technology

action_provider_key

String

the action provider key of the technology

_links

Object

related links

Relation Description

self

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

Table 1. /api/rest/latest/automated-tests/{id}
Parameter Description

id

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

fields

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

id

Number

the id of the automated test

_type

String

the type of the entity

name

String

the name of the automated test

test_automation_project

Object

the TA project associated to this automated test

_links

Object

related links

Relation Description

self

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

type

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

_embedded.campaigns

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/campaigns/{id}
Parameter Description

id

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

fields

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

_type

String

the type of this entity

id

Number

the id of this campaign

name

String

the name of this campaign

reference

String

the reference of this campaign

description

String

the description of this campaign

status

String

the status of this campaign

project

Object

the project of this campaign

path

String

the path of this campaign

parent

Object

the parent entity of this campaign

created_by

String

user that created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user that modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

actual_start_date

String

actual start date

actual_end_date

String

actual end date

actual_start_auto

Boolean

whether the actual start date is automatically computed

actual_end_auto

Boolean

whether the actual end date is automatically computed

scheduled_start_date

String

scheduled start date

scheduled_end_date

String

scheduled end date

custom_fields

Array

the custom fields of this campaign

iterations

Array

the iterations of this campaign

test_plan

Array

the test-plan of this campaign

attachments

Array

the attachments of this campaign

_links

Object

related links

Relation Description

self

link to this campaign

project

link to the project of this campaign

iterations

link to the iterations of this campaign

test-plan

link to the test plan of this campaign

attachments

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

type

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

_embedded.campaigns

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/campaigns/{ids}
Parameter Description

ids

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

Table 1. /api/rest/latest/campaigns/{id}/iterations
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

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

_embedded.iterations

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/campaigns/{id}/test-plan
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

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

_embedded.campaign-test-plan-items

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

type

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

_embedded.campaign-folders

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

[]._type

String

the type of the entity

[].id

Number

id of project

[].name

String

name of project

[].folders

Array

all folders for the given project

[].folders[]._type

String

the type of the entity

[].folders[].id

Number

id of the campaign folder

[].folders[].name

String

name of the campaign folder

[].folders[].url

String

url of the campaign folder

[].folders[].children

Array

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

Table 1. /api/rest/latest/campaign-folders/{id}
Parameter Description

id

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

fields

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

id

Number

the id of the entity

_type

String

the type of the entity

name

String

name of the entity

project

Object

project of the entity

parent

Object

the location of the entity (either a folder or the project if located at the root of the library)

path

String

the path of the entity

created_by

String

user that created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user that modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

description

String

description of that entity (html)

attachments

Array

the attachments of that entity

_links

Varies

related links

custom_fields

Array

the custom fields of that campaign folder

custom_fields[].label

String

the label of the custom field

custom_fields[].code

String

the code of the custom field

custom_fields[].value

Varies

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)

Relation Description

self

the link to this folder

project

the link to its project

content

the link to its content

attachments

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

Table 1. /api/rest/latest/campaign-folders/{ids}
Parameter Description

ids

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

Table 1. /api/rest/latest/campaign-folders/{id}/content
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

include

level of depth of the content that should be returned (optional)

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

_embedded.content

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/campaign-test-plan-items/{id}
Parameter Description

id

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

fields

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

_type

String

the type of the entity

id

Number

the id of this campaign test plan item

referenced_test_case

Object

the test case associated with this campaign test plan item

referenced_dataset

Object

the dataset associated with this campaign test plan item

assigned_to

String

the user assigned to this campaign test plan item

campaign

Object

the campaign this campaign test plan item belongs to

_links

Object

related links

Relation Description

self

link to this campaign test plan item

project

link to the project of this item

test-case

link to the test case referenced by this item

dataset

link to the dataset referenced by this item

campaign

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

Table 1. /api/rest/latest/campaign/{id}/test-plan
Parameter Description

id

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

_type

String

the type of the entity

test_case

Object

the test case to include in the test plan (as described below)

test_case._type

String

the type of the entity (always 'test-case')

test_case.id

Number

the id of the test case

dataset

Object

the dataset to be used when the test case will be executed (optional)

dataset._type

String

the type of the entity (always 'dataset')

dataset.id

Number

the id of the dataset. Remember that the dataset must belong to the planned test case.

assigned_to

String

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

Table 1. /api/rest/latest/campaign-test-plan-items/{id}
Parameter Description

id

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

_type

String

the type of the entity

dataset

Object

the dataset to use when the test case is executed (optional). You can remove the dataset by setting this to null.

dataset._type

String

the type of the entity ('dataset')

dataset.id

Number

the id of this dataset

assigned_to

String

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

Table 1. /api/rest/latest/campaign-test-plan-items/{testPlanItemsIds}
Parameter Description

testPlanItemsIds

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

Table 1. /api/rest/latest/datasets/{id}
Parameter Description

id

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

fields

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

id

Number

the id of the dataset

_type

String

the type of the entity

name

String

the name of the dataset

parameters

Array

the parameters of the dataset

parameter_values

Array

the parameter values of the dataset

test_case

Object

the test case this dataset belongs to

_links

Object

related links

Relation Description

self

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

Table 1. /api/rest/latest/datasets/{id}
Parameter Description

id

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

Table 1. /api/rest/latest/datasets/{id}
Parameter Description

id

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

Table 1. /api/rest/latest/executions/{id}
Parameter Description

id

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

fields

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

_type

String

the type of the entity

id

Number

the id of the execution

name

String

the name of the execution

execution_order

Number

the order of the execution

execution_status

String

the status of the execution

last_executed_by

String

the user who last executed this execution

last_executed_on

String

the date this execution was last executed

execution_mode

String

the execution mode of the execution

reference

String

the reference of this execution

dataset_label

String

the label of the dataset used in this execution

execution_steps

Array

the steps of this execution

comment

String

the comment of this execution

prerequisite

String

the prerequisite of this execution

description

String

the description of this execution

importance

String

the importance of this execution

nature

Object

the nature of this execution

type

Object

the type of this execution

test_case_status

String

the status of the test case referenced by this execution

test_plan_item

Object

the test plan item referenced by this execution

automated_execution_extender

Object

the automated execution extender referenced by this execution (will be hidden if execution mode is manual)

custom_fields

Array

the denormalized custom fields of this execution

test_case_custom_fields

Array

the custom fields of the referenced test case

attachments

Array

the attachments of this execution

_links

Object

related links

Relation Description

self

link to this execution

project

link to the project of this execution

test_plan_item

link to the test plan item of this execution

execution-steps

link to the execution steps of this execution

attachments

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

Table 1. /api/rest/latest/iteration-test-plan-items/{id}/executions
Parameter Description

id

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

fields

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

_type

String

the type of the entity, etc

Relation Description

self

the link to this execution

project

the link to the execution project

test_plan_item

the test plan item of this execution

execution-steps

the link to the execution steps

attachments

the attachments to the test plan element

Modify an execution

A PATCH to /executions/{id} modifies the execution with the given id.

Path parameters

Table 1. /api/rest/latest/executions/{id}
Parameter Description

id

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

_type

String

the type of the entity (mandatory)

execution_status

String

the new status of that execution

comment

String

the new comment of the execution

custom_fields

Array

an array of custom fields

custom_fields[].code

String

the code of the custom field to modify

custom_fields[].value

Varies

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

fields

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

_type

String

the type of the entity, etc

Relation Description

self

the link to this execution

project

the link to the execution project

test_plan_item

the link to the test plan item of this execution

execution-steps

the link to the execution steps

attachments

the link to the attachments

Delete an execution

A DELETE to /executions/{id} delete one execution with the given id.

Path parameters

Table 1. /api/rest/latest/executions/{id}
Parameter Description

id

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

Table 1. /api/rest/latest/executions/{id}/execution-steps
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

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

_embedded.execution-steps

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/executions/{idExecution}/issues
Parameter Description

idExecution

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

_type

String

the type of the entity

remoteIssueId

String

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

Table 1. /api/rest/latest/execution-steps/{id}
Parameter Description

id

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

fields

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

_type

String

the type of the entity

id

Number

the id of the execution step

execution_status

String

the status of this execution step

action

String

the action to be accomplished, format is html

expected_result

String

the state or behavior that should be observable when the action has been performed, format is html)

comment

String

the comment left after executing the step

last_executed_by

String

the date this execution step was last executed

last_executed_on

String

the user who last executed this execution

execution_step_order

Number

the order of the step in the execution

referenced_test_step

Object

the test step referenced by this execution step

execution

Object

the execution this step belongs to

custom_fields

Array

the custom fields of this execution step

test_step_custom_fields

Array

the denormalized custom fields of the referenced test step

attachments

Array

the attachments of the this step

_links

Object

related links

Relation Description

self

link to this execution step

project

link to the project of this execution step

execution

link to the execution of this execution step

attachments

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

Table 1. /api/rest/latest/execution-steps/{id}/execution-status/{status}
Parameter Description

id

the id of the execution step

status

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

_type

String

the type of the entity

id

Number

the id of the execution step

execution_status

String

the status of this execution step

action

String

the action to be accomplished, format is html

expected_result

String

the state or behavior that should be observable when the action has been performed, format is html)

comment

String

the comment left after executing the step

last_executed_by

String

the date this execution step was last executed

last_executed_on

String

the user who last executed this execution

execution_step_order

Number

the order of the step in the execution

referenced_test_step

Object

the test step referenced by this execution step

execution

Object

the execution this step belongs to

custom_fields

Array

the custom fields of this execution step

test_step_custom_fields

Array

the denormalized custom fields of the referenced test step

attachments

Array

the attachments of the test step

_links

Object

related links

Relation Description

self

link to this execution step

project

link to the project of this execution step

execution

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

Table 1. /api/rest/latest/execution-steps/{id}
Parameter Description

id

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

_type

String

the type of the entity (mandatory)

comment

String

the new comment of the execution step

custom_fields

Array

an array of custom fields

custom_fields[].code

String

the code of the custom field to modify

custom_fields[].value

Varies

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

_type

String

the type of the entity

name

String

the name of the iteration

reference

String

the reference of the iteration

description

String

the description of the iteration

parent

Object

the parent campaign of this iteration

actual_start_date

String

actual start date

actual_end_date

String

actual end date

actual_start_auto

Boolean

whether the actual start date is automatically computed

actual_end_auto

Boolean

whether the actual end date is automatically computed

scheduled_start_date

String

scheduled start date

scheduled_end_date

String

scheduled end date

custom_fields

Array

the custom fields of this iteration

Request parameters

Parameter Description

fields

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

_type

String

the type of this entity

id

Number

the id of this iteration

name

String

the name of this iteration

reference

String

the reference of this iteration

description

String

the description of this iteration

uuid

String

the uuid of this iteration

parent

Object

the parent campaign of this iteration

created_by

String

user that created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user that modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

actual_start_date

String

actual start date

actual_end_date

String

actual end date

actual_start_auto

Boolean

whether the actual start date is automatically computed

actual_end_auto

Boolean

whether the actual end date is automatically computed

scheduled_start_date

String

scheduled start date

scheduled_end_date

String

scheduled end date

custom_fields

Array

the custom fields of this iteration

test_suites

Array

the test-suites of this iteration

attachments

Array

the attachments of this iteration

_links

Object

related links

Relation Description

self

link to this iteration

project

link to the project of this iteration

campaign

link to the campaign of this iteration

test-suites

link to the test suites of this iteration

test-plan

link to the test plan of this iteration

attachments

link to the attachments of this iteration

Get iteration

A GET to /iterations/{id} returns the iteration with the given id.

Path parameters

Table 1. /api/rest/latest/iterations/{id}
Parameter Description

id

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

fields

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

_type

String

the type of this entity

id

Number

the id of this iteration

name

String

the name of this iteration

reference

String

the reference of this iteration

description

String

the description of this iteration

uuid

String

the uuid of this iteration

parent

Object

the parent campaign of this iteration

created_by

String

user that created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user that modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

actual_start_date

String

actual start date

actual_end_date

String

actual end date

actual_start_auto

Boolean

whether the actual start date is automatically computed

actual_end_auto

Boolean

whether the actual end date is automatically computed

scheduled_start_date

String

scheduled start date

scheduled_end_date

String

scheduled end date

custom_fields

Array

the custom fields of this iteration

test_suites

Array

the test-suites of this iteration

attachments

Array

the attachments of this iteration

_links

Object

related links

Relation Description

self

link to this iteration

project

link to the project of this iteration

campaign

link to the campaign of this iteration

test-suites

link to the test suites of this iteration

test-plan

link to the test plan of this iteration

attachments

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

iterationName

the name of the iteration

fields

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

_type

String

the type of this entity

id

Number

the id of this iteration

name

String

the name of this iteration

reference

String

the reference of this iteration

description

String

the description of this iteration

uuid

String

the uuid of this iteration

parent

Object

the parent campaign of this iteration

created_by

String

user that created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user that modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

actual_start_date

String

actual start date

actual_end_date

String

actual end date

actual_start_auto

Boolean

whether the actual start date is automatically computed

actual_end_auto

Boolean

whether the actual end date is automatically computed

scheduled_start_date

String

scheduled start date

scheduled_end_date

String

scheduled end date

custom_fields

Array

the custom fields of this iteration

test_suites

Array

the test-suites of this iteration

attachments

Array

the attachments of this iteration

_links

Object

related links

Relation Description

self

link to this iteration

project

link to the project of this iteration

campaign

link to the campaign of this iteration

test-suites

link to the test suites of this iteration

test-plan

link to the test plan of this iteration

attachments

link to the attachments of this iteration

Modify iteration

A PATCH to /iterations/{id} modifies the iteration with the given id.

Path parameters

Table 1. /api/rest/latest/iterations/{id}
Parameter Description

id

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

_type

String

the type of the entity

name

String

the name of the iteration

reference

String

the reference of the iteration

description

String

the description of the iteration

parent

Object

the parent campaign of this iteration

actual_start_date

String

actual start date

actual_end_date

String

actual end date

actual_start_auto

Boolean

whether the actual start date is automatically computed

actual_end_auto

Boolean

whether the actual end date is automatically computed

scheduled_start_date

String

scheduled start date

scheduled_end_date

String

scheduled end date

Request parameters

Parameter Description

fields

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

_type

String

the type of this entity

id

Number

the id of this iteration

name

String

the name of this iteration

reference

String

the reference of this iteration

description

String

the description of this iteration

uuid

String

the uuid of this iteration

parent

Object

the parent campaign of this iteration

created_by

String

user that created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user that modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

actual_start_date

String

actual start date

actual_end_date

String

actual end date

actual_start_auto

Boolean

whether the actual start date is automatically computed

actual_end_auto

Boolean

whether the actual end date is automatically computed

scheduled_start_date

String

scheduled start date

scheduled_end_date

String

scheduled end date

custom_fields

Array

the custom fields of this iteration

test_suites

Array

the test-suites of this iteration

attachments

Array

the attachments of this iteration

_links

Object

related links

Relation Description

self

link to this iteration

project

link to the project of this iteration

campaign

link to the campaign of this iteration

test-suites

link to the test suites of this iteration

test-plan

link to the test plan of this iteration

attachments

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

Table 1. /api/rest/latest/iterations/{id}/test-plan
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

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

_embedded.test-plan

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/iterations/{id}/test-suites
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

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

_embedded.test-suites

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/iteration-test-plan-items/{id}
Parameter Description

id

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

fields

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

_type

String

the type of this entity

id

Number

the id of this iteration test plan item

execution_status

String

the execution status of this item

referenced_test_case

Object

the corresponding test case of this item

referenced_dataset

Object

the referenced dataset of this item

last_executed_by

String

the login of the user who last executed this item

last_executed_on

String

the date this item was last executed

assigned_to

String

the login of the user this item is assigned to

executions

Array

all the executions of this item

iteration

Object

the iteration this item belongs to

_links

Object

related links

Relation Description

self

link to this iteration test plan item

project

link to the project this item belongs to

test-case

link to the test case corresponding to this item

dataset

link to the dataset used in this item

iteration

link to the iteration this item belongs to

executions

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

Table 1. /api/rest/latest/iterations/{iterationId}/test-plan
Parameter Description

iterationId

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

_type

String

the type of the entity

test_case

Object

the test case to include in the test plan (as described below)

test_case._type

String

the type of the entity (always 'test-case')

test_case.id

Number

the id of the test case

dataset

Object

the dataset to be used when the test case will be executed (optional)

dataset._type

String

the type of the entity (always 'dataset')

dataset.id

Number

the id of the dataset. Remember that the dataset must belong to the planned test case.

assigned_to

String

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

Table 1. /api/rest/latest/iteration-test-plan-items/{id}
Parameter Description

id

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

_type

String

the type of the entity

dataset

Object

the dataset to use when the test case is executed (optional). You can remove the dataset by setting this to null.

dataset._type

String

the type of the entity ('dataset')

dataset.id

Number

the id of this dataset

assigned_to

String

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

Table 1. /api/rest/latest/iteration-test-plan-items/{testPlanItemsIds}
Parameter Description

testPlanItemsIds

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

Table 1. /api/rest/latest/iteration-test-plan-items/{id}/executions
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

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

_embedded.executions

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/parameters/{id}
Parameter Description

id

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

fields

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

id

Number

the id of the parameter

_type

String

the type of the entity

name

String

the name of the parameter

description

String

the description of the parameter

test_case

Object

the test case this parameter belongs to

_links

Object

related links

Relation Description

self

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

Table 1. /api/rest/latest/parameters/{id}
Parameter Description

id

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

Table 1. /api/rest/latest/parameters/{id}
Parameter Description

id

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

_embedded.projects

Array

all the standard projects

_embedded.project-templates

Array

all the project templates

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

type

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

_embedded.projects

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

type

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

_embedded.project-templates

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

_type

String

the type of the entity (mandatory)

name

String

the name of the project

label

String

the label of the project

description

String

the description of the project

Request parameters

Parameter Description

fields

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

id

Number

the id of the project

active

Boolean

whether the project is active or not

_links

Object

related links

Relation Description

self

link to this project

requirements

link to the content of the requirement library of this project

test-cases

link to the content of the test case library of this project

campaigns

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

_type

String

the type of the entity (mandatory)

name

String

the name of the project

label

String

the label of the project

description

String

the description of the project

template_id

Number

the id of project template

params

Object

the parameters to create a new project from template

params.copy_permissions

Boolean

whether the project’s permissions will be copied or not

params.copy_cuf

Boolean

whether the project’s custom fields will be copied or not

params.copy_bugtracker_binding

Boolean

whether the project’s bugtracker will be copied or not

params.copy_automated_projects

Boolean

whether the project’s test automation management will be copied or not

params.copy_infolists

Boolean

whether the project’s information lists will be copied or not

params.copy_milestone

Boolean

whether the project’s milestones will be copied or not

params.copy_allow_tc_modif_from_exec

Boolean

whether the project’s execution option will be copied or not

params.keep_template_binding

Boolean

whether the template binding will be kept or not (true by default)

Request parameters

Parameter Description

fields

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

id

Number

the id of the project

active

Boolean

whether the project is active or not

_links

Object

related links

Relation Description

self

link to this project

requirements

link to the content of the requirement library of this project

test-cases

link to the content of the test case library of this project

campaigns

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

_type

String

the type of the entity (mandatory)

name

String

the name of the project template

label

String

the label of the project template

description

String

the description of the project template

Request parameters

Parameter Description

fields

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

id

Number

the id of the project template

active

Boolean

whether the project template is active or not

_links

Object

related links

Relation Description

self

link to this project

requirements

link to the content of the requirement library of this project template

test-cases

link to the content of the test case library of this project template

campaigns

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

_type

String

the type of the entity (mandatory)

name

String

the name of the project

label

String

the label of the project

description

String

the description of the project

project_id

Number

the id of project template

params

Object

the parameters to create a new project from template

params.copy_permissions

Boolean

whether the project’s permissions will be copied or not

params.copy_cuf

Boolean

whether the project’s custom fields will be copied or not

params.copy_bugtracker_binding

Boolean

whether the project’s bugtracker will be copied or not

params.copy_automated_projects

Boolean

whether the project’s test automation management will be copied or not

params.copy_infolists

Boolean

whether the project’s information lists will be copied or not

params.copy_milestone

Boolean

whether the project’s milestones will be copied or not

params.copy_allow_tc_modif_from_exec

Boolean

whether the project’s execution option will be copied or not

Request parameters

Parameter Description

fields

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

id

Number

the id of the project template

active

Boolean

whether the project template is active or not

_links

Object

related links

Relation Description

self

link to this project

requirements

link to the content of the requirement library of this project template

test-cases

link to the content of the test case library of this project template

campaigns

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

Table 1. /api/rest/latest/projects/{id}
Parameter Description

id

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

fields

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

id

Number

the id of the project

_type

String

the type of the entity

name

String

the name of the project

label

String

the label of the project

description

String

the description of the project

active

Boolean

whether the project is active or not

attachments

Array

the attachments of the project

_links

Object

related links

Relation Description

self

link to this project

requirements

link to the content of the requirement library of this project

test-cases

link to the content of the test case library of this project

campaigns

link to the content of the campaign library of this project

permissions

link to the permission list of this project

attachments

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

projectName

the name of the project

fields

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

id

Number

the id of the project

_type

String

the type of the entity

name

String

the name of the project

label

String

the label of the project

description

String

the description of the project

active

Boolean

whether the project is active or not

attachments

Array

the attachments of the project

_links

Object

related links

Relation Description

self

link to this project

requirements

link to the content of the requirement library of this project

test-cases

link to the content of the test case library of this project

campaigns

link to the content of the campaign library of this project

permissions

link to the permission list of this project

attachments

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

Table 1. /api/rest/latest/projects/{id}/permissions
Parameter Description

id

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

fields

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"
    }
  }
}
Relation Description

self

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

Table 1. /api/rest/latest/projects/{projectId}/permissions/{permissionGroup}
Parameter Description

projectId

the id of the project

permissionGroup

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

ids

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"
    }
  }
}
Relation Description

self

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

Table 1. /api/rest/latest/projects/{id}/campaigns
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

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

_embedded.campaigns

Array

the test cases of this project

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/projects/{id}/requirements
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

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

_embedded.requirements

Array

the requirements of this project

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/projects/{id}/test-cases
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

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

_embedded.test-cases

Array

the test cases of this project

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/projects/{id}/campaigns-library/content
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

include

level of depth of the content that should be returned (optional)

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

_embedded.campaign-library-content

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/projects/{id}/requirements-library/content
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

include

level of depth of the content that should be returned (optional)

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

_embedded.requirement-library-content

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/projects/{id}/test-cases-library/content
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

include

level of depth of the content that should be returned (optional)

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

_embedded.test-case-library-content

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/projects/{projectId}/users/{partyIds}
Parameter Description

projectId

the id of the project

partyIds

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

type

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

_embedded.requirements

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

_type

String

the type of the entity (mandatory)

current_version

Object

the current requirement version of this requirement

parent

Object

the parent node of this requirement

Request parameters

Parameter Description

fields

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

id

Number

the id of the requirement

name

String

the name of the current (latest) requirement version of this requirement

project

Object

the project which this requirement belongs to

mode

String

the management mode of the requirement

versions

Array

the requirement versions of this requirement

_links

Object

related links

Relation Description

self

link to this requirement

project

link to the project this requirement belongs to

current_version

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

Table 1. /api/rest/latest/requirements/{id}
Parameter Description

id

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

Table 1. /api/rest/latest/requirements/{id}
Parameter Description

id

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

fields

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

id

Number

the id of the requirement

_type

String

the type of the entity

name

String

the name of the current (latest) requirement version of this requirement

project

Object

the project which this requirement belongs to

path

String

the path of this requirement

parent

Object

the parent node of this requirement

mode

String

the management mode of the requirement

current_version

Object

the current requirement version of this requirement

versions

Array

the requirement versions of this requirement

_links

Object

related links

Relation Description

self

link to this requirement

project

link to the project this requirement belongs to

current_version

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

Table 1. /api/rest/latest/requirements/{ids}
Parameter Description

ids

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

Table 1. /api/rest/latest/requirements/{id}/children
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

include

level of depth of the content that should be returned (optional)

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

_embedded.children

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

A POST to /requirements/{id}/coverages/{testCaseIds} link the test cases to the requirement.

Table 1. /api/rest/latest/requirements/{id}/coverages/{testCaseIds}
Parameter Description

id

the id of the requirement

testCaseIds

the ids of the test cases to associate

POST /api/rest/latest/requirements/543/coverages/350,351,352 HTTP/1.1
Accept: application/json
Host: localhost:8080
Parameter Description

fields

which fields of the elements should be returned (optional)

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"
    }
  }
}
Path Type Description

_type

String

type of the entity

id

Number

the id of the requirement

name

String

the name of the current (latest) requirement version of this requirement

mode

String

the management mode of the requirement

project

Object

the project the requirement belongs to

parent

Object

the parent of this requirement

current_version

Object

the current requirement version of this requirement

versions

Array

the requirement versions of this requirement

_links

Object

related links

Relation Description

self

link to this requirement

project

link to the project this requirement belongs to

current_version

link to the current version of this requirement

A DELETE to /requirements/{id}/coverages/{testCaseIds} unlink the test cases from the requirement.

Table 1. /api/rest/latest/requirements/{id}/coverages/{testCaseIds}
Parameter Description

id

the id of the requirement

testCaseIds

the ids of the test cases to disassociate

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

type

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

_embedded.requirement-folders

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

[]._type

String

the type of the entity

[].id

Number

id of project

[].name

String

name of project

[].folders

Array

all folders for the given project

[].folders[]._type

String

the type of the entity

[].folders[].id

Number

id of the requirement folder

[].folders[].name

String

name of the requirement folder

[].folders[].url

String

url of the requirement folder

[].folders[].children

Array

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

Table 1. /api/rest/latest/requirement-folders/{id}
Parameter Description

id

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

fields

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

id

Number

the id of the entity

_type

String

the type of the entity

name

String

name of the entity

project

Object

project of the entity

parent

Object

the location of the entity (either a folder or the project if located at the root of the library)

path

String

the path of the entity

created_by

String

user that created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user that modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

description

String

description of that entity (html)

attachments

Array

the attachments of that entity

_links

Varies

related links

custom_fields

Array

the custom fields of this execution step

Relation Description

self

the link of the folder

project

the link of its project

content

the link of its content

attachments

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

Table 1. /api/rest/latest/requirement-folders/{ids}
Parameter Description

ids

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

Table 1. /api/rest/latest/requirement-folders/{id}/content
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

include

level of depth of the content that should be returned (optional)

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

_embedded.content

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/requirement-versions/{id}
Parameter Description

id

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

fields

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

id

Number

the id of the requirement version

_type

String

the type of the entity

name

String

the name of the requirement version

reference

String

the reference of the requirement version

version_number

Number

the version number

requirement

Object

the requirement of this requirement version

created_by

String

user that created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user that modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

criticality

String

the criticality of this requirement version

category

Object

the category of this requirement version

status

String

the status of this requirement version

description

String

the description of this requirement version

verifying_test_cases

Array

the test cases which cover this requirement version

custom_fields

Array

the custom fields of this requirement version

attachments

Array

the attachments of this requirement version

_links

Object

related links

Relation Description

self

link to this requirement version

project

link to the project this requirement version belongs to

requirement

link to the requirement this requirement version belongs to

attachments

link to the attachments this requirement version owns

Create requirement version

A POST to /requirement-versions creates a new requirement version.

Path parameters

Table 1. /api/rest/latest/requirement-versions/{id}
Parameter Description

id

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

req_link

true if you want to copy the links between the non-obsolete requirement versions (optional)

tc_req_link

true if you want to copy the associated test cases in the new requirement version (optional)

fields

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

id

Number

the id of the requirement for which you create a new version

_type

String

the type of the entity

name

String

the name of the requirement version

reference

String

the reference of the requirement version

version_number

Number

the version number

requirement

Object

the requirement of this requirement version

created_by

String

user that created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user that modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

criticality

String

the criticality of this requirement version

category

Object

the category of this requirement version

status

String

the status of this requirement version

description

String

the description of this requirement version

custom_fields

Array

the custom fields of this requirement version

verifying_test_cases

Array

the test cases which cover this requirement version

attachments

Array

the attachments of this requirement version

_links

Object

related links

Relation Description

self

link to this requirement version

project

link to the project this requirement version belongs to

requirement

link to the requirement this requirement version belongs to

attachments

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

Table 1. /api/rest/latest/requirement-versions/{id}
Parameter Description

id

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

fields

which fields of the elements should be returned (optional)

Request fields

Path Type Description

_type

String

the type of the entity

name

String

the name of the requirement version

reference

String

the reference of the requirement version

criticality

String

the criticality of this requirement version

category

Object

the category of this requirement version

status

String

the status of this requirement version

description

String

the description of this requirement version

custom_fields

Array

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

id

Number

the id of the requirement version

_type

String

the type of the entity

name

String

the name of the requirement version

reference

String

the reference of the requirement version

version_number

Number

the version number

requirement

Object

the requirement of this requirement version

created_by

String

user that created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user that modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

criticality

String

the criticality of this requirement version

category

Object

the category of this requirement version

status

String

the status of this requirement version

description

String

the description of this requirement version

custom_fields

Array

the custom fields of this requirement version

verifying_test_cases

Array

the test cases which cover this requirement version

attachments

Array

the attachments of this requirement version

_links

Object

related links

Relation Description

self

link to this requirement version

project

link to the project this requirement version belongs to

requirement

link to the requirement this requirement version belongs to

attachments

link to the attachments this requirement version owns

A POST to /requirement-versions/{id}/coverages/{testCaseIds} link the test cases to the requirement version.

Table 1. /api/rest/latest/requirement-versions/{id}/coverages/{testCaseIds}
Parameter Description

id

the id of the requirement version

testCaseIds

the ids of the test cases to associate

POST /api/rest/latest/requirement-versions/658/coverages/350,351,352 HTTP/1.1
Accept: application/json
Host: localhost:8080
Parameter Description

fields

which fields of the elements should be returned (optional)

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"
    }
  }
}
Path Type Description

id

Number

the id of the requirement version

_type

String

the type of the entity

name

String

the name of the requirement version

reference

String

the reference of the requirement version

version_number

Number

the version number

requirement

Object

the requirement of this requirement version

created_by

String

user that created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user that modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

criticality

String

the criticality of this requirement version

category

Object

the category of this requirement version

status

String

the status of this requirement version

description

String

the description of this requirement version

custom_fields

Array

the custom fields of this requirement version

verifying_test_cases

Array

the test cases which cover this requirement version

attachments

Array

the attachments of this requirement version

_links

Object

related links

Relation Description

self

link to this requirement version

project

link to the project this requirement version belongs to

requirement

link to the requirement this requirement version belongs to

attachments

link to the attachments this requirement version owns

A DELETE to /requirement-versions/{id}/coverages/{testCaseIds} unlink the test cases from the requirement version.

Table 1. /api/rest/latest/requirement-versions/{id}/coverages/{testCaseIds}
Parameter Description

id

the id of the requirement version

testCaseIds

the ids of the test cases to disassociate

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

type

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

_embedded.teams

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

_type

String

the type of the entity

name

String

the name of the team

description

String

the description of the team

Request parameters

Parameter Description

fields

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

id

Number

the id of the team

members

Array

the members of this team

created_by

String

the user who created this team

created_on

String

the date of this team account was created

last_modified_by

String

the user who last modified this team

last_modified_on

String

the date of this team was last modified

_links

Object

related links

Relation Description

self

link to this user

Get team

A GET to /teams/{id} returns the team with the given id.

Path parameters

Table 1. /api/rest/latest/teams/{id}
Parameter Description

id

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

fields

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

_type

String

the type of the entity

id

Number

the id of the team

name

String

the name of the team

description

String

the description of the team

members

Array

the members of this team

created_by

String

the user who created this team

created_on

String

the date of this team account was created

last_modified_by

String

the user who last modified this team

last_modified_on

String

the date of this team was last modified

_links

Object

related links

Relation Description

self

link to this user

Modify team

A PATCH to /teams/{id} modifies the team with the given id.

Path parameters

Table 1. /api/rest/latest/teams/{id}
Parameter Description

id

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

_type

String

the type of the entity

name

String

the name of the team

description

String

the description of the team

Request parameters

Parameter Description

fields

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

id

Number

the id of the team

members

Array

the members of this team

created_by

String

the user who created this team

created_on

String

the date of this team account was created

last_modified_by

String

the user who last modified this team

last_modified_on

String

the date of this team was last modified

_links

Object

related links

Relation Description

self

link to this user

Delete team

A DELETE to /teams/{ids} deletes one or several team(s) with the given id(s).

Path parameters

Table 1. /api/rest/latest/teams/{ids}
Parameter Description

ids

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

Table 1. /api/rest/latest/teams/{id}/members
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

fields

which fields of the elements should be returned (optional)

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2033

{
  "_embedded" : {
    "members" : [ {
      "_type" : "user",
      "id" : 1,
      "first_name" : "Charles",
      "last_name" : "Dupond",
      "login" : "User-1",
      "email" : "charlesdupond@aaaa.aa",
      "active" : true,
      "group" : "User",
      "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",
      "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",
      "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

_embedded.members

Array

the members of this team

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/teams/{teamId}/members
Parameter Description

teamId

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

userIds

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

Table 1. /api/rest/latest/teams/{teamId}/members
Parameter Description

teamId

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

userIds

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

type

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

_embedded.test-automation-servers

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/test-automation-servers/{id}
Parameter Description

id

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

fields

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

id

Number

the id of the test automation server

_type

String

the type of the entity

name

String

the name of the test automation server

url

String

the url where to reach the test automation server

kind

String

the kind of the test automation server

description

String

the description of the test automation server

manual_agent_selection

Boolean

whether the test automation server is manual agent or not

created_by

String

the user who created the test automation server

created_on

String

the date the test automation server was created

last_modified_by

String

the user who last modified the test automation server

last_modified_on

String

the date the test automation server was last modified

_links

Object

related links

Relation Description

self

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

type

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

_embedded.test-cases

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/test-cases/{id}
Parameter Description

id

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

fields

which fields of the elements should be returned (optional)

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 6080

{
  "_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",
  "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}&nbsp;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

id

Number

the id of the entity

_type

String

the type of the entity

name

String

name of the test case

project

Object

project of the test case

parent

Object

the location of the test case (either a folder or the project if located at the root of the library)

path

String

the path of the test case

created_by

String

user that created the test case

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user that modified the test case the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

reference

String

a shorter identifier for that test case

importance

String

code of the importance

status

String

code of the status

nature.code

String

code of the nature

type.code

String

code of the type of test case

description

String

description of the test case (html)

prerequisite

String

prerequisites that should be met before the execution of the test script (html)

automated_test

Object

automated test of the test case (optional)

script_auto

String

automation script of the test case

automated_test_technology

String

automated test technology of the test case

scm_repository_url

String

scm repository url of the test case

scm_repository_id

Number

scm repository id of the test case

automated_test_reference

String

automated test reference of the test case

uuid

String

uuid of the test case

custom_fields

Array

array of custom fields

custom_fields[].code

String

code of the custom field

custom_fields[].label

String

label of the custom field

custom_fields[].value

Varies

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)

steps

Array

the step list that constitute the script. Please refer to the test steps documentation.

parameters

Array

the list of parameters. Please refer to the parameters documentation.

datasets

Array

the list of datasets. Please refer to the datasets documentation.

verified_requirements

Array

the list of verified requirements. Please refer to the requirements documentation.

attachments

Array

the list of attachments.

_links

Object

related links

Relation Description

self

link to this test case

project

link to its project

steps

link to the test script

parameters

link to the parameters

datasets

link to the datasets

attachments

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" : "ce0746e4-8946-4cb1-a9e7-8f61ae35acac",
  "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" : "e1f0f11e-6252-4e07-94ef-f09b89d1acff",
  "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" : "ba881958-4faa-4fd9-8baf-8c7f55730057",
  "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" : "f674e68a-5ff5-4888-bf15-079a015c716b",
  "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" : "a282226d-dea4-4f6b-8f2f-37d371ce25a8",
  "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" : "f57cb3db-c9ff-490f-82ed-93c82de09cd6",
  "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" : "9104d799-657c-46ae-b038-ade9934f162d",
  "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: 225
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" : ""
}

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" : "58753894-76ad-40f2-9b34-658f5e74a58f",
  "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

Table 1. /api/rest/latest/test-cases/{id}/datasets
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

fields

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

_embedded.datasets

Array

the datasets of this test case

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/test-cases/{id}/parameters
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

fields

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

_embedded.parameters

Array

the parameters of this test case

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/test-cases/{id}/steps
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

fields

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&nbsp;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&#39;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

_embedded.steps

Array

the steps of this test case

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

  • In case of a keyword test case :

Path parameters

Table 1. /api/rest/latest/test-cases/{id}/steps
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

fields

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

_embedded.steps

Array

the steps of this test case

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/test-cases/{ids}
Parameter Description

ids

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

dry-run

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/>" ]

A POST to test-cases/{id}/coverages/{requirementIds} links the requirements to the test case.

Table 1. /api/rest/latest/test-cases/{id}/coverages/{requirementIds}
Parameter Description

id

the id of the test case

requirementIds

the ids of the requirements to link

POST /api/rest/latest/test-cases/240/coverages/12,13,14 HTTP/1.1
Accept: application/json
Host: localhost:8080
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" : "471699ac-32bf-4998-896b-fd0b67edf2a7",
  "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"
    }
  }
}

A DELETE to test-cases/{id}/coverages/{requirementIds} unlinks the requirements from the test case.

Table 1. /api/rest/latest/test-cases/{id}/coverages/{requirementIds}
Parameter Description

id

the id of the test case

requirementIds

the ids of the requirements to unlink

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

type

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

_embedded.test-case-folders

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

[]._type

String

the type of the entity

[].id

Number

id of project

[].name

String

name of project

[].folders

Array

all folders for the given project

[].folders[]._type

String

the type of the entity

[].folders[].id

Number

id of the test case folder

[].folders[].name

String

name of the test case folder

[].folders[].url

String

url of the test case folder

[].folders[].children

Array

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

Table 1. /api/rest/latest/test-case-folders/{id}
Parameter Description

id

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

fields

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

id

Number

the id of the entity

_type

String

the type of the entity

name

String

name of the entity

project

Object

project of the entity

parent

Object

the location of the entity (either a folder or the project if located at the root of the library)

path

String

the path of the entity

created_by

String

user that created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user that modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

description

String

description of that entity (html)

attachments

Array

the attachments of that entity

_links

Varies

related links

custom_fields

Array

the custom fields of this execution step

Relation Description

self

the link to this folder

project

the link to its project

content

the link to its content

attachments

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

Table 1. /api/rest/latest/test-case-folders/{ids}
Parameter Description

ids

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

Table 1. /api/rest/latest/test-case-folders/{id}/content
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

include

level of depth of the content that should be returned (optional)

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

_embedded.content

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/test-steps/{id}
Parameter Description

id

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

fields

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

id

Number

the id of the step

_type

String

the type of step

action

String

the action to be accomplished, format is html

expected_result

String

the state or behavior that should be observable when the action has been performed, format is html)

test_case

Object

the test case this step is part of

index

Number

the index of current step in the test case

custom_fields

Array

the custom fields of that test step

custom_fields[].label

String

the label of the custom field

custom_fields[].code

String

the code of the custom field

custom_fields[].value

Varies

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)

attachments

Array

the attachments of that test step

verified_requirements

Array

the list of verified requirements. Please refer to the requirements documentation.

_links

Object

related links

Relation Description

self

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

id

Number

the id of the step

_type

String

the type of step

test_case

Object

the test case this step belongs to

index

Number

the index of the step in the test case

called_test_case

Object

the test case called by this step

called_dataset

Object

the dataset to use for the called test case, if any (may be null if not)

delegate_parameter_values

Boolean

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.

_links

Object

related links

Relation Description

self

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

id

Number

the id of the step

_type

String

the type of step

test_case

Object

the test case this step belongs to

keyword

String

the part which gives structure and meaning to an action word. Possible values are : GIVEN, WHEN, THEN, BUT, AND

action

String

the action of the step

datatable

String

the datatable of the step

docstring

String

the docstring of the step

comment

String

the comment of the step

index

Number

the index of the step in the test case

_links

Object

related links

Relation Description

self

link to this step

Modify test step

A PATCH to /test-steps/{id} modifies the test step with the given id.

Path parameters

Table 1. /api/rest/latest/test-steps/{id}
Parameter Description

id

the id of the step

Request parameters

Parameter Description

fields

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

_type

String

the type of step

action

String

the action to be accomplished, format is html

expected_result

String

the state or behavior that should be observable when the action has been performed, format is html)

custom_fields

Array

the custom fields of that test step

custom_fields[].code

String

the code of the custom field

custom_fields[].value

Varies

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

id

Number

the id of the step

test_case

Object

the test case this step is part of

index

Number

the index of current step in the test case

custom_fields[].label

String

the label of the custom field

_links

Object

related links

Relation Description

self

link to this step

test-case

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

_type

String

the type of step

delegate_parameter_values

String

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.

index

Number

the index of the step in the test case

called_dataset

Object

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

id

Number

the id of the step

_links

Object

related links

Relation Description

self

link to this step

test-case

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

_type

String

the type of step

index

Number

the index of the step in the test case

keyword

String

the part which gives structure and meaning to an action word. Possible values are : GIVEN, WHEN, THEN, BUT, AND

action

String

the action of the step

datatable

String

the datatable of the step

docstring

String

the docstring of the step

comment

String

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

id

Number

the id of the step

test_case

Object

the test case this step is part of

_links

Object

related links

Relation Description

self

link to this step

keyword-test-case

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

Table 1. /api/rest/latest/test-steps/{ids}
Parameter Description

ids

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

Table 1. /api/rest/latest/test-cases/{testCaseId}/steps
Parameter Description

testCaseId

the id of the test case of which to add new test step

Request parameters

Parameter Description

fields

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

_type

String

the type of step

action

String

the action to be accomplished, format is html

expected_result

String

the state or behavior that should be observable when the action has been performed, format is html)

custom_fields

Array

the custom fields of that test step

custom_fields[].code

String

the code of the custom field

custom_fields[].value

Varies

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

id

Number

the id of the step

test_case

Object

the test case this step is part of

index

Number

the index of current step in the test case

custom_fields[].label

String

the label of the custom field

_links

Object

related links

Relation Description

self

link to this step

test-case

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

_type

String

the type of step

delegate_parameter_values

Boolean

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.

called_test_case

Object

the test case called by this step

called_dataset

Object

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

id

Number

the id of the step

test_case

Object

the test case this step belongs to

index

Number

the index of the step in the test case

_links

Object

related links

Relation Description

self

link to this step

test-case

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

_type

String

the type of step

keyword

String

the part which gives structure and meaning to an action word. Possible values are : GIVEN, WHEN, THEN, BUT, AND

action

String

the action of the step

datatable

String

the datatable of the step

docstring

String

the docstring of the step

comment

String

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

id

Number

the id of the step

test_case

Object

the keyword test case this keyword step is part of

index

Number

the index of current keyword step in the keyword test case

_links

Object

related links

Relation Description

self

link to this keyword step

keyword-test-case

link to the keyword test case where this keyword step belongs

A POST to test-steps/{id}/coverages/{requirementIds} links the requirements to the test step.

Table 1. /api/rest/latest/test-steps/{id}/coverages/{requirementIds}
Parameter Description

id

the id of the test step

requirementIds

the ids of the requirements to link

POST /api/rest/latest/test-steps/235/coverages/12,13,14 HTTP/1.1
Accept: application/json
Host: localhost:8080
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"
    }
  }
}

A DELETE to test-steps/{id}/coverages/{requirementIds} unlinks the requirements from the test step.

Table 1. /api/rest/latest/test-steps/{id}/coverages/{requirementIds}
Parameter Description

id

the id of the test step

requirementIds

the ids of the requirements to unlink

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

Table 1. /api/rest/latest/test-suites/{id}
Parameter Description

id

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

fields

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

id

Number

the id of the test suite

_type

String

the type of the entity

name

String

the name of the test suite

description

String

the description of the test suite

uuid

String

the uuid of the test suite

status

String

the status of the test suite

parent

Object

the parent entity of the test suite

created_by

String

the user who created the test suite

created_on

String

the date the test suite was created

last_modified_by

String

the user who last modified the test suite

last_modified_on

String

the date the test suite was last modified

custom_fields

Array

the custom fields of the test suite

test_plan

Array

the iteration test plan items of the test suite

attachments

Array

the attachments of the test suite

_links

Object

related links

Relation Description

self

link to this test suite

project

link to the project the test suite belongs to

iteration

link to the iteration the test suite belongs to

test-plan

link the test plan of the test suite

attachments

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

_type

String

the type of the entity

name

String

the name of the iteration

description

String

the description of the test suite

parent

Object

the parent iteration of this test suite

test_plan

Array

the iteration test plan items of the test suite (optional)

custom_fields

Array

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

Table 1. /api/rest/latest/test-suites/{id}
Parameter Description

id

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

Table 1. /api/rest/latest/test-suites/{idTestSuite}/test-plan/{ids}
Parameter Description

idTestSuite

the id of the test suite

ids

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

Table 1. /api/rest/latest/test-suites/{idTestSuite}/test-plan/{ids}
Parameter Description

idTestSuite

the id of the test suite

ids

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

Table 1. /api/rest/latest//test-suites/{ids}
Parameter Description

ids

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

fields

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

type

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

_embedded.users

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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: 180
Host: localhost:8080

{
  "_type" : "user",
  "first_name" : "Charles",
  "last_name" : "Dupond",
  "login" : "User-1",
  "password" : "123456",
  "email" : "charlesdupond@aaaa@aa",
  "group" : "User"
}

Request fields

Path Type Description

_type

String

the type of the entity

first_name

String

the first name of the user (optional)

last_name

String

the last name of the user

login

String

the login of the user

password

String

the password of the user

email

String

the email address of the user (optional)

group

String

the group of the user belongs to (admin or user)

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

Example response

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 532

{
  "_type" : "user",
  "id" : 987,
  "first_name" : "Charles",
  "last_name" : "Dupond",
  "login" : "User-1",
  "email" : "charlesdupond@aaaa.aa",
  "active" : true,
  "group" : "User",
  "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

id

Number

the id of the user

active

Boolean

whether the user is activate or not

teams

Array

the team of the user participate

last_connected_on

String

the date of this user was last connected

created_by

String

the user who created this user account

created_on

String

the date of this user account was created

last_modified_by

String

the user who last modified this user account

last_modified_on

String

the date of this user account was last modified

_links

Object

related links

Relation Description

self

link to this user

Get user

A GET to /users/{id} returns the user with the given id.

Path parameters

Table 1. /api/rest/latest/users/{id}
Parameter Description

id

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

fields

which fields of the elements should be returned (optional)

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 532

{
  "_type" : "user",
  "id" : 486,
  "first_name" : "Charles",
  "last_name" : "Dupond",
  "login" : "User-1",
  "email" : "charlesdupond@aaaa.aa",
  "active" : true,
  "group" : "User",
  "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

_type

String

the type of the entity

id

Number

the id of the user

first_name

String

the first name of the user

last_name

String

the last name of the user

login

String

the login of the user

email

String

the email address of the user

active

Boolean

whether the user is activate or not

group

String

the group of the user belongs to (admin or user)

teams

Array

the team of the user participate

last_connected_on

String

the date of this user was last connected

created_by

String

the user who created this user account

created_on

String

the date of this user account was created

last_modified_by

String

the user who last modified this user account

last_modified_on

String

the date of this user account was last modified

_links

Object

related links

Relation Description

self

link to this user

Modify user

A PATCH to /users/{id} modifies the user with the given id.

Path parameters

Table 1. /api/rest/latest/users/{id}
Parameter Description

id

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: 201
Host: localhost:8080

{
  "_type" : "user",
  "first_name" : "Charles",
  "last_name" : "Dupond",
  "login" : "User-42",
  "password" : "123456",
  "email" : "charlesdupond@bbbb@bb",
  "active" : false,
  "group" : "User"
}

Request fields

Path Type Description

_type

String

the type of the entity

first_name

String

the first name of the user

last_name

String

the last name of the user

login

String

the login of the user

password

String

the password of the user

email

String

the email address of the user

active

Boolean

whether the user is activate or not

group

String

the group of the user belongs to (admin or user)

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 534

{
  "_type" : "user",
  "id" : 987,
  "first_name" : "Charles",
  "last_name" : "Dupond",
  "login" : "User-42",
  "email" : "charlesdupond@bbbb.bb",
  "active" : false,
  "group" : "User",
  "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

id

Number

the id of the user

teams

Array

the team of which the user is a member

last_connected_on

String

the date of this user was last connected

created_by

String

the user who created this user account

created_on

String

the date of this user account was created

last_modified_by

String

the user who last modified this user account

last_modified_on

String

the date of this user account was last modified

_links

Object

related links

Relation Description

self

link to this user

Delete user

A DELETE to /users/{ids} deletes one or several user(s) with the given id(s).

Path parameters

Table 1. /api/rest/latest/users/{ids}
Parameter Description

ids

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

Table 1. /api/rest/latest/users/{id}/teams
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

fields

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

_embedded.teams

Array

the teams of this user

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

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

Table 1. /api/rest/latest/users/{userId}/teams
Parameter Description

userId

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

teamIds

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

Table 1. /api/rest/latest/users/{userId}/teams
Parameter Description

userId

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

teamIds

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

Table 1. /api/rest/latest/users/{id}/permissions
Parameter Description

id

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

fields

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"
    }
  }
}
Relation Description

self

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

Table 1. /api/rest/latest/users/{id}/permissions/{permissionGroup}
Parameter Description

id

the id of the user

permissionGroup

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

ids

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"
    }
  }
}
Relation Description

self

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

Table 1. /api/rest/latest/users/{id}/permissions
Parameter Description

id

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

ids

the ids of the projects