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 (1.0.2) 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 (test-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').

On one hand, a client 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. Furthermore, the request will fail if the _type contradicts the target endpoint URI. On the other hand the id and _links are ignored without consequences.

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 a client requests a resource it is not allowed to read, the server replies with HTTP 403 and a json representation of the error.

Sometimes the client requests a resource it is not allowed to read, but it is not the case of the 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 client 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 considered as leaked information. 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 client 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 client 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

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

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;charset=UTF-8
Content-Length: 365

{
  "_type" : "attachment",
  "id" : 3,
  "name" : "sample attachment",
  "size" : 413168,
  "file_type" : "pdf",
  "added_on" : "2018-06-15T10:00:00Z",
  "_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;charset=UTF-8
Content-Length: 374

{
  "_type" : "attachment",
  "id" : 3,
  "name" : "same stuff with a new name",
  "size" : 413168,
  "file_type" : "pdf",
  "added_on" : "2018-06-15T10:00:00Z",
  "_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
Accept: application/json
Content-Type: application/json
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
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document

something right
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=files
Content-Type: application/pdf

even more
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--

Example response

HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
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
Accept: application/json
Content-Type: multipart/form-data
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;charset=UTF-8
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 client is allowed to read.

HTTP request

GET /api/rest/latest/automated-suites?size=3&page=1&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;charset=UTF-8
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?size=3&page=1"
    },
    "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 client 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;charset=UTF-8
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;charset=UTF-8
Content-Length: 2021

{
  "_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" : {
    "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 client 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/x-www-form-urlencoded
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;charset=UTF-8
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/x-www-form-urlencoded
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;charset=UTF-8
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/x-www-form-urlencoded
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;charset=UTF-8
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;charset=UTF-8
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 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;charset=UTF-8
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 client is allowed to read.

HTTP request

GET /api/rest/latest/campaigns?size=2&page=1&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;charset=UTF-8
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?size=2&page=1"
    },
    "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 client 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

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;charset=UTF-8
Content-Length: 2907

{
  "_type" : "campaign",
  "id" : 112,
  "name" : "sample campaign",
  "reference" : "SAMP_CAMP",
  "description" : "<p>This is a sample campaign.</p>",
  "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:00Z",
  "last_modified_by" : "User-2",
  "last_modified_on" : "2017-07-21T10:00:00Z",
  "scheduled_start_date" : "2017-08-01T10:00:00Z",
  "scheduled_end_date" : "2017-08-31T10:00:00Z",
  "actual_start_date" : "2017-08-01T10:00:00Z",
  "actual_end_date" : "2017-08-31T10:00:00Z",
  "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

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 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&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)

include

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

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2669

{
  "_embedded" : {
    "iterations" : [ {
      "_type" : "iteration",
      "id" : 10,
      "name" : "sample iteration 1",
      "reference" : "SAMP_IT_1",
      "description" : "<p>This iteration is a sample one...</p>",
      "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:00Z",
      "last_modified_by" : "admin",
      "last_modified_on" : "2017-07-22T10:00:00Z",
      "scheduled_start_date" : null,
      "scheduled_end_date" : null,
      "actual_start_date" : "2017-08-01T10:00:00Z",
      "actual_end_date" : "2017-08-30T10:00:00Z",
      "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?size=1&page=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 client 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&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)

include

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

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2832

{
  "_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" : "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"
        }
      }
    } ]
  },
  "_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?size=2&page=1"
    },
    "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 client 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 client is allowed to read.

HTTP request

GET /api/rest/latest/campaign-folders?page=1&size=3&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)

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
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 client 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 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;charset=UTF-8
Content-Length: 1158

{
  "_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:00Z",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-06-16T10:00:00Z",
  "description" : "<p>where all the old campaigns go</p>",
  "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

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

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;charset=UTF-8
Content-Length: 1006

{
  "_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" : {
    "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 client 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.

Get campaign test plan item

A GET to /campaign-test-plan-item/{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

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;charset=UTF-8
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

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;charset=UTF-8
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

Executions

This chapter focuses on services for the 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;charset=UTF-8
Content-Length: 3092

{
  "_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:00Z",
  "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 date this execution was last executed

last_executed_on

String

the user who last executed this execution

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

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&fields=execution_status%2Ccomment%2Cprerequisite%2C+custom_fields%2C+test_case_custom_fields HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 451

{
  "_type" : "execution",
  "custom_fields" : [ {
    "code" : "TXT_STATUS",
    "value" : "allright"
  }, {
    "code" : "TAGS_RELATED",
    "value" : [ "see this", "also that" ]
  } ],
  "test_case_custom_fields" : [ {
    "code" : "TC_TEXT",
    "value" : "I'm from the test case"
  } ],
  "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.

test_case_custom_fields

Array

the original custom fields of the test case run by this execution

test_case_custom_fields[].code

String

the code of the test case custom field

test_case_custom_fields[].value

Varies

the value of the test case custom field. It applies the same rules than the execution custom_fields

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;charset=UTF-8
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

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&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)

include

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

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1909

{
  "_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:00Z",
      "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?size=1&page=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 client 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)

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;charset=UTF-8
Content-Length: 1423

{
  "_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:00Z",
  "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

theattachments 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;charset=UTF-8
Content-Length: 1309

{
  "_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:00Z",
  "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

Iterations

This chapter focuses on services for iterations.

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;charset=UTF-8
Content-Length: 1898

{
  "_type" : "iteration",
  "id" : 22,
  "name" : "sample iteration",
  "reference" : "SAMP_IT",
  "description" : "<p>A sample iteration</p>",
  "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:00Z",
  "last_modified_by" : "User-B",
  "last_modified_on" : "2017-04-15T10:00:00Z",
  "scheduled_start_date" : "2017-04-09T10:00:00Z",
  "scheduled_end_date" : "2017-04-14T10:00:00Z",
  "actual_start_date" : "2017-04-10T10:00:00Z",
  "actual_end_date" : "2017-04-15T10:00:00Z",
  "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

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&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)

include

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

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 4538

{
  "_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:00Z",
      "assigned_to" : "User-1",
      "executions" : [ {
        "_type" : "execution",
        "id" : 2,
        "execution_status" : "BLOCKED",
        "last_executed_by" : "User-1",
        "last_executed_on" : "2017-06-24T10:00:00Z",
        "_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:00Z",
        "_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" : "test-case",
        "id" : 16,
        "name" : "sample 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:00Z",
      "assigned_to" : "User-1",
      "executions" : [ {
        "_type" : "execution",
        "id" : 9,
        "execution_status" : "FAILURE",
        "last_executed_by" : "User-1",
        "last_executed_on" : "2017-06-26T10:00:00Z",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/executions/9"
          }
        }
      }, {
        "_type" : "execution",
        "id" : 35,
        "execution_status" : "SUCCESS",
        "last_executed_by" : "User-1",
        "last_executed_on" : "2017-06-28T10:00:00Z",
        "_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"
        }
      }
    } ]
  },
  "_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?size=2&page=1"
    },
    "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 client 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&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)

include

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

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 5060

{
  "_embedded" : {
    "test-suites" : [ {
      "_type" : "test-suite",
      "id" : 9,
      "name" : "Suite 1",
      "description" : "<p>The first test suite.</p>",
      "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:00Z",
      "last_modified_by" : "User 1Z45",
      "last_modified_on" : "2017-03-02T10:00:00Z",
      "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" : "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/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>",
      "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:42Z",
      "last_modified_by" : "User 2B93",
      "last_modified_on" : "2017-03-04T12:00:00Z",
      "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" : "test-case",
          "id" : 17,
          "name" : "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?size=2&page=1"
    },
    "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 client 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.

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;charset=UTF-8
Content-Length: 1817

{
  "_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:00Z",
  "assigned_to" : "User 6",
  "executions" : [ {
    "_type" : "execution",
    "id" : 10,
    "execution_status" : "SUCCESS",
    "last_executed_by" : "User 6",
    "last_executed_on" : "2017-02-04T11:00:00Z",
    "_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/4/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

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&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;charset=UTF-8
Content-Length: 1810

{
  "_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:00Z",
      "_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:00Z",
      "_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:00Z",
      "_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?size=3&page=1"
    },
    "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 client 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 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
Accept: application/json
Content-Type: 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;charset=UTF-8
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

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;charset=UTF-8
Content-Length: 441

{
  "_type" : "parameter",
  "id" : 47,
  "name" : "sample parameter",
  "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

Projects

This chapter focuses on services for the projects.

Get all projects

A GET to /projects returns all the projects that the client is allowed to read.

HTTP request

GET /api/rest/latest/projects?size=3&page=0&size=3&page=0 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;charset=UTF-8
Content-Length: 913

{
  "_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"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects?size=3&page=0"
    }
  },
  "page" : {
    "size" : 3,
    "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 client 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
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 134

{
  "_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;charset=UTF-8
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
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 394

{
  "_type" : "project",
  "name" : "sample project",
  "label" : "no price tag",
  "description" : "<p>do something meaningful</p>",
  "template_id" : 23,
  "params" : {
    "copyPermissions" : true,
    "copyCUF" : true,
    "copyBugtrackerBinding" : true,
    "copyAutomatedProjects" : true,
    "copyInfolists" : true,
    "copyMilestone" : true,
    "copyAllowTcModifFromExec" : 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.copyPermissions

Boolean

whether the project’s permissions will be copied or not

params.copyCUF

Boolean

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

params.copyBugtrackerBinding

Boolean

whether the project’s bugtracker will be copied or not

params.copyAutomatedProjects

Boolean

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

params.copyInfolists

Boolean

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

params.copyMilestone

Boolean

whether the project’s milestones will be copied or not

params.copyAllowTcModifFromExec

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;charset=UTF-8
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
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 152

{
  "_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;charset=UTF-8
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
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 411

{
  "_type" : "project-template",
  "name" : "sample project template",
  "label" : "no price tag",
  "description" : "<p>do something meaningful</p>",
  "project_id" : 55,
  "params" : {
    "copyPermissions" : true,
    "copyCUF" : true,
    "copyBugtrackerBinding" : true,
    "copyAutomatedProjects" : true,
    "copyInfolists" : true,
    "copyMilestone" : true,
    "copyAllowTcModifFromExec" : 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.copyPermissions

Boolean

whether the project’s permissions will be copied or not

params.copyCUF

Boolean

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

params.copyBugtrackerBinding

Boolean

whether the project’s bugtracker will be copied or not

params.copyAutomatedProjects

Boolean

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

params.copyInfolists

Boolean

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

params.copyMilestone

Boolean

whether the project’s milestones will be copied or not

params.copyAllowTcModifFromExec

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;charset=UTF-8
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.

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;charset=UTF-8
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 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;charset=UTF-8
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..

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 HTTP/1.1
Accept: application/json
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded

ids=486%2C521

Request parameters

Parameter Description

ids

the ids of the users/teams

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
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&page=2&size=3&sort=name%2Cdesc 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;charset=UTF-8
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 client 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}/campaigns returns the campaigns 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&page=2&size=3&sort=id%2Cdesc 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;charset=UTF-8
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 client 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}/campaigns returns the campaigns 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&page=2&size=3&sort=name%2Cdesc 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;charset=UTF-8
Content-Length: 1299

{
  "_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" : "test-case",
      "id" : 147,
      "name" : "test case 2",
      "reference" : "TC-2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/147"
        }
      }
    } ]
  },
  "_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 client 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}/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&page=2&size=3&include=nested&sort=id%2Cdesc 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;charset=UTF-8
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?page=2&size=3&include=nested&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 client 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&page=2&size=3&include=nested&sort=id%2Cdesc 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;charset=UTF-8
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?page=2&size=3&include=nested&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 client 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&page=2&size=3&sort=name%2Cdesc&fields=name%2Creference&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;charset=UTF-8
Content-Length: 1841

{
  "_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" : "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"
        }
      }
    } ]
  },
  "_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?page=2&size=3&sort=name,desc&fields=name,reference&include=nested"
    },
    "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 client 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)

Requirements

This chapter focuses on services for the requirements.

Get all requirements

A GET to /requirements returns all the requirements that the client is allowed to read.

HTTP request

GET /api/rest/latest/requirements?page=2&size=1&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)

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
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 client 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
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 592

{
  "_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;charset=UTF-8
Content-Length: 2076

{
  "_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:00Z",
    "last_modified_by" : "admin",
    "last_modified_on" : "2017-06-15T10:00:00Z",
    "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

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;charset=UTF-8
Content-Length: 3063

{
  "_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:00Z",
    "last_modified_by" : "User-1",
    "last_modified_on" : "2017-07-17T10:00:00Z",
    "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" : "test-case",
      "id" : 101,
      "name" : "sample test case 2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/101"
        }
      }
    } ],
    "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 HTTP/1.1
Accept: application/json
Content-Type: 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&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;charset=UTF-8
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 client 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 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 client is allowed to read.

HTTP request

GET /api/rest/latest/requirement-folders?page=1&size=3&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)

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
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 client 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 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;charset=UTF-8
Content-Length: 1257

{
  "_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"
      }
    }
  },
  "name" : "embedded folder",
  "created_by" : "User-1",
  "created_on" : "2017-07-19T10:00:00Z",
  "last_modified_by" : "User-2",
  "last_modified_on" : "2017-07-20T10:00:00Z",
  "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

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

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&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;charset=UTF-8
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?size=3&page=1"
    },
    "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 client 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;charset=UTF-8
Content-Length: 1758

{
  "_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:00Z",
  "last_modified_by" : "User-2",
  "last_modified_on" : "2017-07-20T10:00:00Z",
  "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" : "test-case",
    "id" : 9,
    "name" : "verifying test case 2",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-cases/9"
      }
    }
  } ],
  "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

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&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)

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
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 client 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
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 85

{
  "_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;charset=UTF-8
Content-Length: 370

{
  "_type" : "team",
  "id" : 332,
  "name" : "Team A",
  "description" : "<p>black panther</p>",
  "members" : [ ],
  "created_by" : "admin",
  "created_on" : "2017-07-04T10:00:00Z",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-07-05T10:00:00Z",
  "_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;charset=UTF-8
Content-Length: 370

{
  "_type" : "team",
  "id" : 567,
  "name" : "Team A",
  "description" : "<p>black panther</p>",
  "members" : [ ],
  "created_by" : "admin",
  "created_on" : "2017-07-04T10:00:00Z",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-07-05T10:00:00Z",
  "_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
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 85

{
  "_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;charset=UTF-8
Content-Length: 370

{
  "_type" : "team",
  "id" : 332,
  "name" : "Team A",
  "description" : "<p>black panther</p>",
  "members" : [ ],
  "created_by" : "admin",
  "created_on" : "2017-07-04T10:00:00Z",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-07-05T10:00:00Z",
  "_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 HTTP/1.1
Accept: application/json
Content-Type: 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;charset=UTF-8
Content-Length: 1937

{
  "_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:00Z",
      "created_by" : "admin",
      "created_on" : "2017-07-04T10:00:00Z",
      "last_modified_by" : "admin",
      "last_modified_on" : "2017-07-05T10:00:00Z",
      "_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:00Z",
      "created_by" : "admin",
      "created_on" : "2017-07-04T10:00:00Z",
      "last_modified_by" : "admin",
      "last_modified_on" : "2017-07-05T10:00:00Z",
      "_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:00Z",
      "created_by" : "admin",
      "created_on" : "2017-07-04T10:00:00Z",
      "last_modified_by" : "admin",
      "last_modified_on" : "2017-07-05T10:00:00Z",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/users/3"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/teams/888/members"
    }
  },
  "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 client 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 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080

userIds=486%2C521

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
Accept: application/json
Content-Type: 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 client is allowed to read.

HTTP request

GET /api/rest/latest/test-automation-servers?size=2&page=1&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;charset=UTF-8
Content-Length: 1806

{
  "_embedded" : {
    "test-automation-servers" : [ {
      "_type" : "test-automation-server",
      "id" : 569,
      "name" : "TA server 1",
      "base_url" : "http://1234:4567/jenkins/",
      "login" : "ajenkins",
      "kind" : "jenkins",
      "manual_slave_selection" : false,
      "description" : "<p>nice try</p>",
      "created_by" : "admin",
      "created_on" : "2017-06-15T10:00:00Z",
      "last_modified_by" : "admin",
      "last_modified_on" : "2017-06-15T10:00:00Z",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-automation-servers/569"
        }
      }
    }, {
      "_type" : "test-automation-server",
      "id" : 654,
      "name" : "TA server 2",
      "base_url" : "http://1234:4567/jira/",
      "login" : "ajira",
      "kind" : "jira",
      "manual_slave_selection" : false,
      "description" : "<p>second shot</p>",
      "created_by" : "admin",
      "created_on" : "2017-06-15T10:00:00Z",
      "last_modified_by" : "admin",
      "last_modified_on" : "2017-06-15T10:00:00Z",
      "_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?size=2&page=1"
    },
    "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 client 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;charset=UTF-8
Content-Length: 511

{
  "_type" : "test-automation-server",
  "id" : 569,
  "name" : "TA server",
  "base_url" : "http://1234:4567/jenkins/",
  "login" : "ajenkins",
  "kind" : "jenkins",
  "manual_slave_selection" : false,
  "description" : "<p>nice try</p>",
  "created_by" : "admin",
  "created_on" : "2017-06-15T10:00:00Z",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-06-15T10:00:00Z",
  "_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

base_url

String

the url where to reach the test automation server

login

String

the login of the test automation server

kind

String

the kind of the test automation server

description

String

the description of the test automation server

manual_slave_selection

Boolean

whether the test automation server is manual slave 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.

Get all test cases

A GET to /test-cases returns all the test-cases that the client is allowed to read.

HTTP request

GET /api/rest/latest/test-cases?page=2&size=1&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)

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 919

{
  "_embedded" : {
    "test-cases" : [ {
      "_type" : "test-case",
      "id" : 1,
      "name" : "sample test case",
      "reference" : "TC1",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/1"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases?page=0&size=1"
    },
    "prev" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases?page=1&size=1"
    },
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases?page=2&size=1"
    },
    "next" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases?page=3&size=1"
    },
    "last" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases?page=4&size=1"
    }
  },
  "page" : {
    "size" : 1,
    "totalElements" : 5,
    "totalPages" : 5,
    "number" : 2
  }
}

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 client 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 test case

A POST to /test-cases creates a new test case.

HTTP request

POST /api/rest/latest/test-cases HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 129

{
  "_type" : "test-case",
  "name" : "Christmas turkey test flight",
  "parent" : {
    "_type" : "project",
    "id" : 15
  }
}

Example response

HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 1707

{
  "_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:00Z",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-06-15T10:00:00Z",
  "importance" : "LOW",
  "status" : "WORK_IN_PROGRESS",
  "nature" : {
    "code" : "NAT_FUNCTIONAL_TESTING"
  },
  "type" : {
    "code" : "TYP_EVOLUTION_TESTING"
  },
  "prerequisite" : "",
  "description" : null,
  "custom_fields" : [ ],
  "steps" : [ ],
  "parameters" : [ ],
  "datasets" : [ ],
  "verified_requirements" : [ ],
  "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 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;charset=UTF-8
Content-Length: 5387

{
  "_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:00Z",
  "last_modified_by" : "User-1",
  "last_modified_on" : "2017-06-15T10:00:00Z",
  "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",
  "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" ]
    } ],
    "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" ]
    } ],
    "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"
      }
    }
  } ],
  "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)

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

Modify test case

A PATCH to /test-cases/{id} modifies the test case with the given id.

HTTP request

PATCH /api/rest/latest/test-cases/240 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 70

{
  "_type" : "test-case",
  "name" : "Christmas turkey test launch"
}

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1707

{
  "_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:00Z",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-06-15T10:00:00Z",
  "importance" : "LOW",
  "status" : "WORK_IN_PROGRESS",
  "nature" : {
    "code" : "NAT_FUNCTIONAL_TESTING"
  },
  "type" : {
    "code" : "TYP_EVOLUTION_TESTING"
  },
  "prerequisite" : "",
  "description" : null,
  "custom_fields" : [ ],
  "steps" : [ ],
  "parameters" : [ ],
  "datasets" : [ ],
  "verified_requirements" : [ ],
  "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;charset=UTF-8
Content-Length: 1789

{
  "_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" : {
    "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 client 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;charset=UTF-8
Content-Length: 1365

{
  "_embedded" : {
    "parameters" : [ {
      "_type" : "parameter",
      "id" : 1,
      "name" : "cocoa_purity",
      "description" : "<p>how refined the cocoa cream should be</p>",
      "test_case" : {
        "_type" : "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" : "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" : {
    "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 client 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}/test-steps returns all the steps of the test case with the given id.

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;charset=UTF-8
Content-Length: 2384

{
  "_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"
      } ],
      "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"
      } ],
      "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"
      } ],
      "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" : {
    "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 client 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 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 client is allowed to read.

HTTP request

GET /api/rest/latest/test-case-folders?page=1&size=3&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)

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
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 client 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 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;charset=UTF-8
Content-Length: 1234

{
  "_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:00Z",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-06-16T10:00:00Z",
  "description" : "<p>All recipes in alphabetical order from A to F inclusive</p>",
  "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

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

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;charset=UTF-8
Content-Length: 989

{
  "_embedded" : {
    "content" : [ {
      "_type" : "test-case",
      "id" : 13,
      "name" : "walk test",
      "reference" : "",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/13"
        }
      }
    }, {
      "_type" : "test-case",
      "id" : 150,
      "name" : "fly test",
      "reference" : "",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/150"
        }
      }
    }, {
      "_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" : {
    "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 client 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 or a call 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;charset=UTF-8
Content-Length: 765

{
  "_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" ]
  } ],
  "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

_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;charset=UTF-8
Content-Length: 854

{
  "_type" : "call-step",
  "id" : 441,
  "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"
      }
    }
  },
  "test_case" : {
    "_type" : "test-case",
    "id" : 297,
    "name" : "Order a meal",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-cases/297"
      }
    }
  },
  "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

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
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 314

{
  "_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;charset=UTF-8
Content-Length: 841

{
  "_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" ]
  } ],
  "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
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 150

{
  "_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;charset=UTF-8
Content-Length: 954

{
  "_type" : "call-step",
  "id" : 441,
  "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"
      }
    }
  },
  "test_case" : {
    "_type" : "test-case",
    "id" : 297,
    "name" : "target test case",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-cases/297"
      }
    }
  },
  "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

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 HTTP/1.1
Accept: application/json
Content-Type: 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
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 331

{
  "_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;charset=UTF-8
Content-Length: 858

{
  "_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" ]
  } ],
  "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
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 267

{
  "_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;charset=UTF-8
Content-Length: 962

{
  "_type" : "call-step",
  "id" : 441,
  "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"
      }
    }
  },
  "test_case" : {
    "_type" : "test-case",
    "id" : 297,
    "name" : "target test case",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-cases/297"
      }
    }
  },
  "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

Test Suites

This chapter focuses on services for the test suites.

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;charset=UTF-8
Content-Length: 2662

{
  "_type" : "test-suite",
  "id" : 9,
  "name" : "sample test suite",
  "description" : "<p>this is a sample test suite</p>",
  "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:00Z",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-07-12T10:00:00Z",
  "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" : "test-case",
      "id" : 91,
      "name" : "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"
      }
    }
  } ],
  "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

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

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.

Path parameters

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

id

the id of the test suite

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;charset=UTF-8
Content-Length: 4396

{
  "_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:00Z",
      "assigned_to" : "User-1",
      "executions" : [ {
        "_type" : "execution",
        "id" : 11,
        "execution_status" : "FAILURE",
        "last_executed_by" : "User-1",
        "last_executed_on" : "2017-07-13T10:00:00Z",
        "_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:00Z",
        "_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" : "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:00Z",
      "assigned_to" : "User-2",
      "executions" : [ {
        "_type" : "execution",
        "id" : 12,
        "execution_status" : "SUCCESS",
        "last_executed_by" : "User-2",
        "last_executed_on" : "2017-07-07T10:00:00Z",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/executions/12"
          }
        }
      }, {
        "_type" : "execution",
        "id" : 22,
        "execution_status" : "BLOCKED",
        "last_executed_by" : "User-2",
        "last_executed_on" : "2017-07-15T10:00:00Z",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/executions/22"
          }
        }
      }, {
        "_type" : "execution",
        "id" : 32,
        "execution_status" : "RUNNING",
        "last_executed_by" : "User-2",
        "last_executed_on" : "2017-07-20T10:00:00Z",
        "_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"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-suites/44/test-plan"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

Response fields

Path Type Description

_embedded.test-plan

Array

the iteration test plan items of this test suite

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the client 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)

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&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)

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
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 client 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
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 180

{
  "_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

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

group

String

the group of the user belong (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;charset=UTF-8
Content-Length: 505

{
  "_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:00Z",
  "created_by" : "admin",
  "created_on" : "2017-07-04T10:00:00Z",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-07-05T10:00:00Z",
  "_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;charset=UTF-8
Content-Length: 505

{
  "_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:00Z",
  "created_by" : "admin",
  "created_on" : "2017-07-04T10:00:00Z",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-07-05T10:00:00Z",
  "_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 belong (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
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 201

{
  "_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 belong (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;charset=UTF-8
Content-Length: 507

{
  "_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:00Z",
  "created_by" : "admin",
  "created_on" : "2017-07-04T10:00:00Z",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-07-05T10:00:00Z",
  "_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 HTTP/1.1
Accept: application/json
Content-Type: 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;charset=UTF-8
Content-Length: 1069

{
  "_embedded" : {
    "teams" : [ {
      "_type" : "team",
      "id" : 567,
      "name" : "Team A",
      "description" : "<p>black panther</p>",
      "created_by" : "admin",
      "created_on" : "2017-07-04T10:00:00Z",
      "last_modified_by" : "admin",
      "last_modified_on" : "2017-07-05T10:00:00Z",
      "_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:00Z",
      "last_modified_by" : "admin",
      "last_modified_on" : "2017-07-05T10:00:00Z",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/teams/568"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/users/486/teams"
    }
  },
  "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 client 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 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080

teamIds=486%2C+487

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
Accept: application/json
Content-Type: application/json
Host: localhost:8080

Request parameters

Parameter Description

teamIds

the list of ids of the teams