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.0) of the API:

What you can do with it

  • read operations on most of the business domains

  • have few creation/update services, for test cases and (manual) executions

  • benefit from this present documentation

What you cannot do with it

  • explore links or use a self-discovery function

  • create or setup projects, or users: no administration operations possible

  • create or update anything

  • delete anything

  • have support for attachments or 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

Note The verb DELETE is included in here though there are currently no use case for it.

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.

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.

CallStep

call-step

test-steps

A unit of test script that inlines a test case into another one.

CampaignFolder

campaign-folder

campaign-folders

A entity that helps to organize the content of the campaign workspace

Campaign

campaign

campaigns

A campaign

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.

RequirementFolder

requirement-folder

requirement-folders

An entity that helps to organize the content of the requirement workspace.

Requirement

requirement

requirements

A unit of test specification, that may come in one or several versions.

RequirementVersion

requirement-version

requirement-versions

TestCaseFolder

test-case-folder

test-case-folders

An entity that helps to organize the content of the test case workspace

TestCase

test-case

test-cases

A scenario to run on the system under test in order to qualify one or several requirements.

TestSuite

test-suite

test-suites

A partition of the test plan of an iteration.

Test Cases

This chapter focuses on services for the test cases.

Browse all the 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)

Get a 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: 5135

{
  "_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",
    "custom_fields" : [ {
      "code" : "CF_TXT",
      "label" : "test level",
      "value" : "mandatory"
    }, {
      "code" : "CF_TAGS",
      "label" : "see also",
      "value" : [ "basic", "walking" ]
    } ],
    "_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",
    "custom_fields" : [ {
      "code" : "CF_TXT",
      "label" : "test level",
      "value" : "mandatory"
    }, {
      "code" : "CF_TAGS",
      "label" : "see also",
      "value" : [ "basic", "walking" ]
    } ],
    "_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,
    "_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,
    "_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"
      }
    }
  } ],
  "_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"
    }
  }
}

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.

_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

Get all the steps of a 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: 2227

{
  "_embedded" : {
    "steps" : [ {
      "_type" : "action-step",
      "id" : 167,
      "action" : "<p>Quick step forward</p>\n",
      "expected_result" : "<p>So does your opponent</p>\n",
      "custom_fields" : [ {
        "code" : "CHK_BODY_FEINT",
        "label" : "requires body feint",
        "value" : "false"
      } ],
      "_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",
      "custom_fields" : [ {
        "code" : "CHK_BODY_FEINT",
        "label" : "requires body feint",
        "value" : "true"
      } ],
      "_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",
      "custom_fields" : [ {
        "code" : "CHK_BODY_FEINT",
        "label" : "requires body feint",
        "value" : "false"
      } ],
      "_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,
      "_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)

Get all the parameters of a 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 all the datasets of a 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_value" : "98%",
        "parameter_test_case_id" : 238,
        "parameter_id" : 1,
        "parameter_name" : "cocoa_purity"
      }, {
        "parameter_value" : "4",
        "parameter_test_case_id" : 238,
        "parameter_id" : 2,
        "parameter_name" : "number_of_layers"
      } ],
      "_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_value" : "80%",
        "parameter_test_case_id" : 238,
        "parameter_id" : 1,
        "parameter_name" : "cocoa_purity"
      }, {
        "parameter_value" : "1",
        "parameter_test_case_id" : 238,
        "parameter_id" : 2,
        "parameter_name" : "number_of_layers"
      } ],
      "_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)

Create a new 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: 1573

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

Modify a 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: 1573

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

Test Steps

This chapter focuses on services for the test steps.

Get a test step

A GET to /test-steps/{id} returns 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 (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)

Example response

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

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

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)

_links

Object

related links

Relation Description

self

link to this step

Parameters

This chapter focuses on services for the parameters.

Get a 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

Datasets

This chapter focuses on services for the datasets.

Get a 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_value" : "login_1",
    "parameter_test_case_id" : 9,
    "parameter_id" : 1,
    "parameter_name" : "param_1"
  }, {
    "parameter_value" : "password_1",
    "parameter_test_case_id" : 9,
    "parameter_id" : 2,
    "parameter_name" : "param_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

Test Case Folders

This chapter focuses on services for the test case folders.

Browse all the 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 a 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: 1094

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

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)

_links

Varies

related links

Relation Description

self

the link to this folder

project

the link to its project

content

the link to its content

Get a test case folder content

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)

Requirements

This chapter focuses on services for the requirements.

Browse all the 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)

Get a 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: 3038

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

Get all the children of a requirement

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 Versions

This chapter focuses on services for the requirement versions.

Get a 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: 1616

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

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

_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

Requirement Folders

This chapter focuses on services for the requirement folders.

Browse all the 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 a 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: 1114

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

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)

_links

Varies

related links

Relation Description

self

the link of the folder

project

the link of its project

content

the link of its content

Get a requirement folder content

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)

Campaigns

This chapter focuses on services for the campaigns.

Browse all the 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 a 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: 2774

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

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

_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

Get all iterations of a 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: 2642

{
  "_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"
          }
        }
      } ],
      "_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 the test plan of a campaign

A GET to /campaigns/{id}/test-plan returns all the test-plan 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.

Browse all the 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 a 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: 1019

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

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)

_links

Varies

related links

Relation Description

self

the link to this folder

project

the link to its project

content

the link to its content

Get the content of a campaign folder

A GET to /campaign-folders/{id}/content returns the content 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 a 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

Iterations

This chapter focuses on services for iterations.

Get an 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: 1765

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

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

_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

Get the test plan of an iteration

A GET to /iterations/{id}/test-plan returns the test plan 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 the 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: 5006

{
  "_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"
          }
        }
      } ],
      "_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"
          }
        }
      } ],
      "_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 an 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 the executions of an 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 a new execution for an iteration test plan item

A POST to /iteration-test-plan-items/{id}/execution 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: 2073

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

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

Executions

This chapter focuses on services for the executions.

Get an 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: 2626

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

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

custom_fields

Array

the denormalized custom fields of this execution

test_case_custom_fields

Array

the custom fields of the referenced test case

_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

Get the execution steps of an 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: 1882

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

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: 1066

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

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

Execution Steps

This chapter focuses on services for the execution steps.

Get an 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: 1286

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

_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