The Rest Administration API plugin is built on top of the Squash TM Rest API. It provides you with additional services that allows a remote user to perform administration tasks on the platform.
Bug Trackers
This chapter focuses on services for the bug trackers.
Get all bug trackers
A GET
to /bug-trackers
returns all the bug trackers.
HTTP request
GET /api/rest/latest/bug-trackers HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1107
{
"_embedded" : {
"bug-trackers" : [ {
"_type" : "bug-tracker",
"id" : 1,
"name" : "bugtracker1",
"url" : "https://xsquash.atlassian.net/",
"kind" : "jira.xsquash",
"iframe_friendly" : false,
"authentication_policy" : "USER",
"authentication_protocol" : "BASIC_AUTH",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/1"
}
}
}, {
"_type" : "bug-tracker",
"id" : 2,
"name" : "bugtracker2",
"url" : "https://xsquash.atlassian.net/",
"kind" : "jira.xsquash",
"iframe_friendly" : false,
"authentication_policy" : "APP_LEVEL",
"authentication_protocol" : "OAUTH_1A",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/2"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get bug tracker
A GET
to /bug-trackers/{id}
returns the bug tracker with the given id.
HTTP request
GET /api/rest/latest/bug-trackers/3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the id of the bug-tracker |
Example response
HTTP/1.1 200 OK
Content-Length: 325
Content-Type: application/json;charset=UTF-8
{
"_type" : "bug-tracker",
"id" : 3,
"name" : "bugtracker3",
"url" : "url3",
"kind" : "kind3",
"iframe_friendly" : false,
"authentication_policy" : "USER",
"authentication_protocol" : "BASIC_AUTH",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/3"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the entity |
|
|
the type of the entity |
|
|
name of the bug-tracker |
|
|
url of the bugtracker |
|
|
kind of the bugtracker : mantis or jira |
|
|
the bugtracker displays in iframe |
|
|
authentication Policy : USER or APP |
|
|
Protocol of authentification: Basic Auth or Oauth 1 |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this bugtracker |
Create bug tracker
A POST
to /bug-trackers
creates a new bug tracker.
HTTP request
POST /api/rest/latest/bug-trackers HTTP/1.1
Accept: application/json
Content-Length: 240
Content-Type: application/json
Host: localhost:8080
{
"_type" : "bug-tracker",
"name" : "createdBugtracker",
"url" : "https://squash.atlassian.net/",
"kind" : "jira.xsquash",
"iframe_friendly" : false,
"authentication_policy" : "USER",
"authentication_protocol" : "BASIC_AUTH"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the name of bug tracker |
|
|
the url of the bug tracker |
|
|
the kind of the bug tracker |
|
|
the description of the bug tracker |
|
|
the authentication Policy of the bug tracker : 'USER' or 'APP_LEVEL' |
|
|
the authentication Protocol of the bug tracker: 'BASIC_AUTH' or 'OAUTH_A1' |
Example response
HTTP/1.1 201 Created
Content-Length: 363
Content-Type: application/json;charset=UTF-8
{
"_type" : "bug-tracker",
"id" : 4,
"name" : "createdBugtracker",
"url" : "https://squash.atlassian.net/",
"kind" : "jira.xsquash",
"iframe_friendly" : false,
"authentication_policy" : "USER",
"authentication_protocol" : "BASIC_AUTH",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/4"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the bug tracker |
|
|
the name of the bug tracker |
|
|
the url of the bug tracker |
|
|
the kind of the bug tracker |
|
|
the description of the bug tracker |
|
|
the authentication Policy of the bug tracker: 'USER' or 'APP_LEVEL' |
|
|
the authentication Protocol of the bug tracker: 'BASIC_AUTH' or 'OAUTH_A1' |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this bug tracker |
Modify bug tracker
A PATCH
to /bug-trackers/{id}
modifies the bug trackers with the given id.
HTTP request
PATCH /api/rest/latest/bug-trackers/4 HTTP/1.1
Accept: application/json
Content-Length: 240
Content-Type: application/json
Host: localhost:8080
{
"_type" : "bug-tracker",
"name" : "updatedBugtracker",
"url" : "https://squash.atlassian.net/",
"kind" : "jira.xsquash",
"iframe_friendly" : false,
"authentication_policy" : "USER",
"authentication_protocol" : "BASIC_AUTH"
}
Path parameters
Parameter | Description |
---|---|
|
the id of the bugtracker you want to update |
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the name of bug tracker |
|
|
the url of the bug tracker |
|
|
the kind of the bug tracker |
|
|
the description of the bug tracker |
|
|
the authentication Policy of the bug tracker: 'USER' or 'APP_LEVEL' |
|
|
the authentication Protocol of the bug tracker: 'BASIC_AUTH' or 'OAUTH_A1' |
Example response
HTTP/1.1 200 OK
Content-Length: 363
Content-Type: application/json;charset=UTF-8
{
"_type" : "bug-tracker",
"id" : 4,
"name" : "updatedBugtracker",
"url" : "https://squash.atlassian.net/",
"kind" : "jira.xsquash",
"iframe_friendly" : false,
"authentication_policy" : "USER",
"authentication_protocol" : "BASIC_AUTH",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/4"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the bugtracker |
|
|
the name of the bugtracker |
|
|
the url of the bugtracker |
|
|
the kind of the bugtracker |
|
|
the description of the bugtracker |
|
|
the authentication Policy of the bugtracker: 'USER' or 'APP_LEVEL' |
|
|
the authentication Protocol of the bugtracker: 'BASIC_AUTH' or 'OAUTH_A1' |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this bug tracker |
Delete bug tracker
A DELETE
to /bug-trackers/{ids}
deletes one or several bug tracker(s) with the given id(s).
HTTP request
DELETE /api/rest/latest/bug-trackers/2,3 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
a list id of the bugtracker |
Get bug tracker credentials
A GET
to /bug-trackers/{id}/credentials
get the credentials of the bug tracker with the given id.
-
In case of basic auth credentials:
HTTP request
GET /api/rest/latest/bug-trackers/1/credentials HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the id of the bug-tracker |
Example response
HTTP/1.1 200 OK
Content-Length: 195
Content-Type: application/json;charset=UTF-8
{
"_type" : "basic-auth-credentials",
"username" : "user@henix.fr",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/1/credentials"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
type of credentials, it can be basic-auth-credentials or oauth-1a-credentials |
|
|
the username to authenticate this bug tracker |
|
|
related links |
-
In case of oauth-1a credentials:
HTTP request
GET /api/rest/latest/bug-trackers/1/credentials HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the id of the bug-tracker |
Example response
HTTP/1.1 200 OK
Content-Length: 192
Content-Type: application/json;charset=UTF-8
{
"_type" : "oauth-1a-credentials",
"token" : "A9b7DD2e4f5g3Hi",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/1/credentials"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
type of credentials, it can be basic-auth-credentials or oauth-1a-credentials |
|
|
the user token to authenticate this bug tracker |
|
|
related links |
Set bug tracker credentials
A POST
to /bug-trackers/{id}/credentials
set the credentials of the bug tracker with the given id.
-
In case of basic auth credentials:
HTTP request
POST /api/rest/latest/bug-trackers/1/credentials HTTP/1.1
Accept: application/json
Content-Type: application/json
Content-Length: 106
Host: localhost:8080
{
"_type" : "basic-auth-credentials",
"username" : "user@henix.fr",
"password" : "qcrGmkQxI0J789F"
}
Path parameters
Parameter | Description |
---|---|
|
the id of the bug tracker |
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the credentials: basic-auth-credentials or oauth-1a-credentials |
|
|
the username to authenticate this bug tracker |
|
|
the password to authenticate this bug tracker |
Example response
HTTP/1.1 200 OK
Content-Length: 195
Content-Type: application/json;charset=UTF-8
{
"_type" : "basic-auth-credentials",
"username" : "user@henix.fr",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/1/credentials"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the credentials: basic-auth-credentials or oauth-1a-credentials |
|
|
the username to authenticate this bug tracker |
|
|
related links |
-
In case of oauth-1a credentials:
HTTP request
POST /api/rest/latest/bug-trackers/1/credentials HTTP/1.1
Accept: application/json
Content-Type: application/json
Content-Length: 107
Host: localhost:8080
{
"_type" : "oauth-1a-credentials",
"token" : "A9b7DD2e4f5g3Hi",
"token_secret" : "qcrGmkQxI0J789F"
}
Path parameters
Parameter | Description |
---|---|
|
the id of the bug tracker |
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the credentials: basic-auth-credentials or oauth-1a-credentials |
|
|
the user token to authenticate this bug tracker |
|
|
the user token secret to authenticate this bug tracker |
Example response
HTTP/1.1 200 OK
Content-Length: 192
Content-Type: application/json;charset=UTF-8
{
"_type" : "oauth-1a-credentials",
"token" : "A9b7DD2e4f5g3Hi",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/1/credentials"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the credentials: basic-auth-credentials or oauth-1a-credentials |
|
|
the user token to authenticate this bug tracker |
|
|
related links |
Get bug tracker authentication configuration
A GET
to /bug-trackers/{id}/auth-configuration
get the authentication configuration of the bug tracker with the given id.
Only a bug tracker using OAuth 1a authentication protocol can have an authentication configuration.
HTTP request
GET /api/rest/latest/bug-trackers/1/auth-configuration HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the id of the bug-tracker |
Example response
HTTP/1.1 200 OK
Content-Length: 556
Content-Type: application/json;charset=UTF-8
{
"_type" : "oauth-1a-configuration",
"consumer_key" : "ge4crGFRumkGxLSJDI0J789H",
"client_secret" : "be4crGEVumkGxLSJDI0J789F",
"signature_method" : "HMAC_SHA1",
"request_token_http_method" : "GET",
"request_token_url" : "https://xsquash.atlassian.net/",
"user_authorization_url" : "https://xsquash.atlassian.net/",
"access_token_http_method" : "GET",
"access_token_url" : "https://xsquash.atlassian.net/",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/1/auth-configuration"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of configuration |
|
|
consumer key |
|
|
request token Http method |
|
|
request token Url |
|
|
access token Http method |
|
|
access token Url |
|
|
user authorization Url |
|
|
client secret |
|
|
signature method |
|
|
related links |
Set bug tracker authentication configuration
A POST
to /bug-trackers/{id}/auth-configuration
sets the authentication configuration of the bug tracker with the given id.
Only a bug tracker using OAuth 1a authentication protocol can have an authentication configuration.
HTTP request
POST /api/rest/latest/bug-trackers/1/auth-configuration HTTP/1.1
Accept: application/json
Content-Type: application/json
Content-Length: 426
Host: localhost:8080
{
"_type" : "oauth-1a-configuration",
"consumer_key" : "ge4crGFRumkGxLSJDI0J789H",
"request_token_http_method" : "GET",
"request_token_url" : "https://xsquash.atlassian.net/",
"access_token_http_method" : "GET",
"access_token_url" : "https://xsquash.atlassian.net/",
"user_authorization_url" : "https://xsquash.atlassian.net/",
"client_secret" : "be4crGEVumkGxLSJDI0J789F",
"signature_method" : "HMAC_SHA1"
}
Path parameters
Parameter | Description |
---|---|
|
the id of the bug tracker |
Example response
HTTP/1.1 200 OK
Content-Length: 556
Content-Type: application/json;charset=UTF-8
{
"_type" : "oauth-1a-configuration",
"consumer_key" : "ge4crGFRumkGxLSJDI0J789H",
"client_secret" : "be4crGEVumkGxLSJDI0J789F",
"signature_method" : "HMAC_SHA1",
"request_token_http_method" : "GET",
"request_token_url" : "https://xsquash.atlassian.net/",
"user_authorization_url" : "https://xsquash.atlassian.net/",
"access_token_http_method" : "GET",
"access_token_url" : "https://xsquash.atlassian.net/",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/1/auth-configuration"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of configuration |
|
|
consumer key |
|
|
request token Http method |
|
|
request token Url |
|
|
access token Http method |
|
|
access token Url |
|
|
user authorization Url |
|
|
client secret |
|
|
signature method |
|
|
related links |
Custom Fields
This chapter focuses on custom fields. Custom fields are extra fields that can be attached to certain entities. The set of such extra fields is defined by per-project configuration, which means for instance that two test cases in two distinct projects may have different custom fields.
Please be careful not to be confused with Custom Field Values : whereas a Custom Field is the abstract definition of a field, a Custom Field Value represents an actual value for that field.
TODO : les différents sous-types etc.
Get all custom fields
A GET
to /custom-fields
returns all the custom fields.
HTTP request
GET /api/rest/latest/custom-fields?page=1&size=20 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Length: 1344
Content-Type: application/json;charset=UTF-8
{
"_embedded" : {
"custom-fields" : [ {
"_type" : "custom-field",
"id" : 1,
"name" : "checkbox1",
"code" : "ck1",
"label" : "ck1",
"optional" : false,
"options" : [ ],
"input_type" : "CHECKBOX",
"default_value" : "true",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/custom-fields/1"
}
}
}, {
"_type" : "custom-field",
"id" : 2,
"name" : "checkbox2",
"code" : "ck2",
"label" : "ck2",
"optional" : false,
"options" : [ ],
"input_type" : "CHECKBOX",
"default_value" : "true",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/custom-fields/2"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/custom-fields?page=0&size=20"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/custom-fields?page=0&size=20"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/custom-fields?page=1&size=20"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/custom-fields?page=1&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 22,
"totalPages" : 2,
"number" : 1
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get custom field
A GET
to /custom-fields/{id}
returns the custom field with the given ID.
Path parameters
Parameter | Description |
---|---|
|
the id of the custom-field |
HTTP request
GET /api/rest/latest/custom-fields/3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Length: 313
Content-Type: application/json;charset=UTF-8
{
"_type" : "custom-field",
"id" : 3,
"name" : "checkbox3",
"code" : "ck3",
"label" : "ck3",
"optional" : false,
"options" : [ ],
"input_type" : "CHECKBOX",
"default_value" : "true",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/custom-fields/3"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the entity |
|
|
the type of the entity |
|
|
name of the custom-field |
|
|
code of the custom-field |
|
|
label of the custom-field |
|
|
the type of custom-field |
|
|
default value of the custom-field |
|
|
if the custom-field is optionnal or not |
|
|
all the options of the custom-field |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this custom-field |
Create custom field
A POST
to /custom-fields
creates a new custom field.
HTTP request
POST /api/rest/latest/custom-fields HTTP/1.1
Accept: application/json
Content-Type: application/json
Content-Length: 210
Host: localhost:8080
{
"_type" : "custom-fields",
"name" : "cuf date",
"label" : "label date",
"code" : "code date",
"input_type" : "DATE_PICKER",
"optional" : true,
"default_value" : "2020-04-22",
"options" : [ ]
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the type of the custom field :DROPDOWN_LIST,PLAIN_TEXT |
|
|
the label of the custom field |
|
|
the code of the custom field |
|
|
the name of the custom field |
|
|
the default value of the custom field |
|
|
if the custom field is optional or not |
|
|
an array of custom fields |
Example response
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 333
{
"_type" : "custom-field",
"id" : 4,
"name" : "cuf date",
"code" : "code date",
"label" : "label date",
"optional" : true,
"options" : [ ],
"input_type" : "DATE_PICKER",
"default_value" : "2020-04-22",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/custom-fields/4"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
id of the entity |
|
|
the type of the custom field :DROPDOWN_LIST,PLAIN_TEXT |
|
|
the label of the custom field |
|
|
the code of the custom field |
|
|
the name of the custom field |
|
|
the default value of the custom field |
|
|
if the custom field is optional or not |
|
|
an array of custom fields |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this custom-fields |
Modify custom field
A PATCH
to /custom-fields/{id}
modifies the custom field with the given id.
HTTP request
PATCH /api/rest/latest/custom-fields/5 HTTP/1.1
Accept: application/json
Content-Length: 215
Content-Type: application/json
Host: localhost:8080
{
"_type" : "custom-fields",
"name" : "cuf text",
"label" : "label text",
"code" : "code text",
"input_type" : "PLAIN_TEXT",
"optional" : true,
"default_value" : "ceci est un test",
"options" : [ ]
}
Path parameters
Parameter | Description |
---|---|
|
the id of the custom field |
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the type of the custom field :DROPDOWN_LIST,PLAIN_TEXT |
|
|
the label of the custom field |
|
|
the code of the custom field |
|
|
the name of the custom field |
|
|
the default value of the custom field |
|
|
if the custom field is optional or not |
|
|
an array of custom fields |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 338
{
"_type" : "custom-field",
"id" : 5,
"name" : "cuf text",
"code" : "code text",
"label" : "label text",
"optional" : true,
"options" : [ ],
"input_type" : "PLAIN_TEXT",
"default_value" : "ceci est un test",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/custom-fields/5"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
id of the entity |
|
|
the type of the custom field :DROPDOWN_LIST,PLAIN_TEXT |
|
|
the label of the custom field |
|
|
the code of the custom field |
|
|
the name of the custom field |
|
|
the default value of the custom field |
|
|
if the custom field is optional or not |
|
|
an array of custom fields |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this custom-fields |
Delete custom field
A DELETE
to /custom-fields/{ids}
deletes the custom field(s) with the given id(s).
HTTP request
DELETE /api/rest/latest/custom-fields/2,3 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
a list id of the custom-fields to delete |
Example response
HTTP/1.1 204 No Content
![]() |
Features about custom field options must be modified. |
Add custom field option
A POST
to /custom-fields/{id}/options
adds option to the custom field with the given id .
HTTP request
POST /api/rest/latest/custom-fields/7/options HTTP/1.1
Accept: application/json
Content-Length: 71
Content-Type: application/json
Host: localhost:8080
{
"label" : "opt1",
"code" : "code opt 1",
"colour" : "#ff8000"
}
Path parameters
Parameter | Description |
---|---|
|
the id of the custom-field |
Request fields
Path | Type | Description |
---|---|---|
|
|
the label of the custom field option |
|
|
the code of the custom field option |
|
|
the colour of the custom field option |
Example response
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 465
{
"_type" : "custom-field",
"id" : 7,
"name" : "cuf ddl",
"code" : "code ddl",
"label" : "label ddl",
"optional" : true,
"options" : [ {
"label" : "opt1",
"code" : "1",
"colour" : "#ffffff"
}, {
"label" : "opt2",
"code" : "2",
"colour" : "#ff8000"
} ],
"input_type" : "DROPDOWN_LIST",
"default_value" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/custom-fields/7"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the custom-field |
|
|
the input type of the custom-field |
|
|
the name of the custom-field |
|
|
the code of the custom-field |
|
|
the label of the custom-field |
|
|
the code of the custom-field |
|
|
whe custom-field |
|
|
the custom-field’s options |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this custom-field |
Update custom field option label
A PATCH
to /custom-fields/{id}/options/{optionLabel}/label/{newValue}
modifies the label of the option with given original label .
HTTP request
PATCH /api/rest/latest/custom-fields/6/options/opt/label/opt1 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the id of the custom-fields |
|
the label of the option to update |
|
the new label of the custom-fields |
Example response
HTTP/1.1 200 OK
Content-Length: 412
Content-Type: application/json;charset=UTF-8
{
"_type" : "custom-field",
"id" : 6,
"name" : "cuf text",
"code" : "code text",
"label" : "label text",
"optional" : true,
"options" : [ {
"label" : "opt1",
"code" : "1",
"colour" : "#ffffff"
} ],
"input_type" : "DROPDOWN_LIST",
"default_value" : "ceci est un test",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/custom-fields/6"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
id of the entity |
|
|
the type of the custom field :DROPDOWN_LIST,PLAIN_TEXT |
|
|
the label of the custom field |
|
|
the code of the custom field |
|
|
the name of the custom field |
|
|
the default value of the custom field |
|
|
if the custom field is optional or not |
|
|
an array of custom fields |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this custom-fields |
Info Lists
This chapter focuses on info lists.
Get all info lists
A GET
to /info-lists
returns all the info lists.
HTTP request
GET /api/rest/latest/info-lists?page=0&size=20 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1910
{
"_embedded" : {
"info-lists" : [ {
"_type" : "info-list",
"id" : 1,
"label" : "list1",
"description" : "description1",
"code" : "code1",
"items" : [ {
"_type" : "info-list-item",
"id" : 21,
"label" : "item1",
"code" : "codeItem1",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-list-items/21"
}
}
} ],
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists/1"
}
}
}, {
"_type" : "info-list",
"id" : 2,
"label" : "list2",
"description" : "description2",
"code" : "code2",
"items" : [ {
"_type" : "info-list-item",
"id" : 22,
"label" : "item2",
"code" : "codeItem2",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-list-items/22"
}
}
} ],
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists/2"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get info list
A GET
to /info-lists/{id}
returns the info list with the given id.
HTTP request
GET /api/rest/latest/info-lists/3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the id of the info list |
Example response
HTTP/1.1 200 OK
Content-Length: 703
Content-Type: application/json;charset=UTF-8
{
"_type" : "info-list",
"id" : 3,
"label" : "list3",
"description" : "description3",
"code" : "code3",
"items" : [ {
"_type" : "info-list-item",
"id" : 23,
"label" : "item3",
"code" : "codeItem3",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-list-items/23"
}
}
} ],
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists/3"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the entity |
|
|
the type of the entity |
|
|
the label of the info list |
|
|
the description of the info list |
|
|
the code of the info list |
|
|
the items of the info list |
|
|
the user who created the info list |
|
|
the creation date of the info list |
|
|
the last user who modified the info list |
|
|
the last modification date of the info list |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this info list |
Create info list
A POST
to /info-lists
creates a new info list.
HTTP request
POST /api/rest/latest/info-lists HTTP/1.1
Accept: application/json
Content-Length: 282
Content-Type: application/json
Host: localhost:8080
{
"_type" : "info-list",
"label" : "create4",
"code" : "code4",
"description" : "description4",
"items" : [ {
"_type" : "info-list-item",
"label" : "item4",
"code" : "codeItem4",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true
} ]
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the label of the info list |
|
|
the status of the info list |
|
|
the description of the info list |
|
|
the info list’s items |
Example response
HTTP/1.1 201 Created
Content-Length: 618
Content-Type: application/json;charset=UTF-8
{
"_type" : "info-list",
"id" : 4,
"label" : "create4",
"description" : "description4",
"code" : "code4",
"items" : [ {
"_type" : "info-list-item",
"id" : 24,
"label" : "item4",
"code" : "codeItem4",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-list-items/24"
}
}
} ],
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists/4"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the info list |
|
|
the label of the info list |
|
|
the status of the info list |
|
|
the description of the info list |
|
|
an array of info list items |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this info list |
Modify info list
A PATCH
to /info-lists/{id}
modifies the info list with the given id.
HTTP request
PATCH /api/rest/latest/info-lists/4 HTTP/1.1
Accept: application/json
Content-Length: 280
Content-Type: application/json
Host: localhost:8080
{
"_type" : "info-list",
"label" : "list4",
"code" : "code4",
"description" : "description4",
"items" : [ {
"_type" : "info-list-item",
"label" : "item4",
"code" : "codeItem4",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true
} ]
}
Path parameters
Parameter | Description |
---|---|
|
the id of the info list |
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the label of the info list |
|
|
the status of the info list |
|
|
the description of the info list |
|
|
an array of info list items |
Example response
HTTP/1.1 200 OK
Content-Length: 703
Content-Type: application/json;charset=UTF-8
{
"_type" : "info-list",
"id" : 4,
"label" : "list4",
"description" : "description4",
"code" : "code4",
"items" : [ {
"_type" : "info-list-item",
"id" : 24,
"label" : "item4",
"code" : "codeItem4",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-list-items/24"
}
}
} ],
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists/4"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the info list |
|
|
the label of the info list |
|
|
the status of the info list |
|
|
the description of the info list |
|
|
an array of info list items |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this info list |
Delete info list
A DELETE
to /info-lists/{ids}
deletes the info list(s) with the given id(s).
If associated with at least one project, the objects will permanently be disassociated with the info list(s). The default list will be activated and the values associated to the objects will be reset to the default 'Undefined' value.
HTTP request
DELETE /api/rest/latest/info-lists/2,3 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the ids of the info list to delete |
Example response
HTTP/1.1 204 No Content
Info List Items
This chapter focuses on info list items.
Get info list item
A GET
to /info-list-items/{id}
returns the info list item with the given id.
HTTP request
GET /api/rest/latest/info-list-items/3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the id of the info list item |
Example response
HTTP/1.1 200 OK
Content-Length: 535
Content-Type: application/json;charset=UTF-8
{
"_type" : "info-list-item",
"id" : 3,
"label" : "item3",
"code" : "codeItem3",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true,
"info_list" : {
"_type" : "info-list",
"id" : 4,
"label" : "list4",
"description" : "description4",
"code" : "code4",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists/4"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-list-items/3"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the entity |
|
|
the label of the info list item |
|
|
the code of the info list item |
|
|
the name of the icon of the info list item |
|
|
the colour of the info list item (hexadecimal) |
|
|
boolean which indicates if the info list item is the default one |
|
|
the info list this item is part of |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this info list item |
Create info list item
A POST
to /info-lists/{id}/items
creates a new info list item.
HTTP request
POST /api/rest/latest/info-lists/4/items HTTP/1.1
Accept: application/json
Content-Length: 126
Content-Type: application/json
Host: localhost:8080
{
"_type" : "info-list-item",
"label" : "item4",
"code" : "codeItem4",
"icon_name" : "cross",
"colour" : "#ff0000"
}
Path parameters
Parameter | Description |
---|---|
|
the id of the info list |
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the label of the info list item |
|
|
the code of the info list item |
|
|
the name of the icon of the info list item |
|
|
the colour of the info list item (hexadecimal) |
Example response
HTTP/1.1 201 Created
Content-Length: 537
Content-Type: application/json;charset=UTF-8
{
"_type" : "info-list-item",
"id" : 4,
"label" : "item4",
"code" : "codeItem4",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true,
"info_list" : {
"_type" : "info-list",
"id" : 5,
"label" : "create5",
"description" : "description5",
"code" : "code5",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists/5"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-list-items/4"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the info list item |
|
|
the label of the info list item |
|
|
the code of the info list item |
|
|
the name of the icon of the info list item |
|
|
the colour of the info list item (hexadecimal) |
|
|
boolean which indicates if the info list item is the default one |
|
|
the info list this item is part of |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this info list item |
Modify info list item
A PATCH
to /info-list-items/{id}
modifies the info list item with the given id.
HTTP request
PATCH /api/rest/latest/info-list-items/4 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 146
{
"_type" : "info-list-item",
"label" : "item4",
"code" : "codeItem4",
"icon_name" : "cross",
"colour" : "#0000ff",
"default" : true
}
Path parameters
Parameter | Description |
---|---|
|
the id of the info list item |
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the label of the info list item |
|
|
the code of the info list item |
|
|
the name of the icon of the info list item |
|
|
the colour of the info list item (hexadecimal) |
|
|
boolean which indicates if the info list item is the default one |
Example response
HTTP/1.1 200 OK
Content-Length: 535
Content-Type: application/json;charset=UTF-8
{
"_type" : "info-list-item",
"id" : 4,
"label" : "item4",
"code" : "codeItem4",
"icon_name" : "cross",
"colour" : "#0000ff",
"default" : true,
"info_list" : {
"_type" : "info-list",
"id" : 5,
"label" : "list5",
"description" : "description5",
"code" : "code5",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists/5"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-list-items/4"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the info list item |
|
|
the label of the info list item |
|
|
the code of the info list item |
|
|
the name of the icon of the info list item |
|
|
the colour of the info list item (hexadecimal) |
|
|
boolean which indicates if the info list item is the default one |
|
|
the info list this item is part of |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this info list item |
Delete info list item
A DELETE
to /info-list-items/{id}
deletes the info list item with the given id.
If the info list item to delete is the default one, then it cannot be deleted.
HTTP request
DELETE /api/rest/latest/info-list-items/2 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the id of the info list item |
Example response
HTTP/1.1 204 No Content
License Information
This chapter focuses on information from the license file.
Get information from the Premium license file
A GET
to /license/info
returns information from the Premium license file.
HTTP request
GET /api/rest/latest/license/info HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 464
{
"_type" : "license-info",
"max_users" : 15,
"expiration_date" : "2022-10-12T08:00:00.000+0000",
"license_plugins" : [ {
"_type" : "license-plugin",
"key" : "api-rest-admin",
"available" : true
}, {
"_type" : "license-plugin",
"key" : "automation-result-publisher",
"available" : false
} ],
"valid_license" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/license/info"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
max users number allowed by the license |
|
|
expiration date of the license |
|
|
all the license plugins |
|
|
the type of the license plugins |
|
|
key of the license plugin |
|
|
availability of the plugin by the license |
|
|
indicates if the license is valid : expiration date + a tolerance period |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the license information |
Login Message
This chapter focuses on the message showing in Squash TM Login Page.
Get login message
A GET
to /login-message
returns the login message.
HTTP request
GET /api/rest/latest/login-message HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Length: 70
Content-Type: application/json;charset=UTF-8
{
"_type" : "login-message",
"message" : "<h1>login Message<h1>"
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the message to show on the login page of Squash TM |
Modify login message
A PATCH
to /login-message
modifies the login message.
HTTP request
PATCH /api/rest/latest/login-message HTTP/1.1
Content-Length: 41
Accept: application/json
Content-Type: application/json
Host: localhost:8080
{
"message" : "<h1>login Message<h1>"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the message to show on the login page of Squash TM (mandatory) |
Example response
HTTP/1.1 200 OK
Content-Length: 70
Content-Type: application/json;charset=UTF-8
{
"_type" : "login-message",
"message" : "<h1>login Message<h1>"
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the message to show on the login page of Squash TM |
Milestones
This chapter focuses on milestones. Milestones allow you to “version” your test repository and to view only the objects (requirements, test cases and campaigns) associated with them. With milestones, you can in particular organize your object libraries by version, create a new version of the repository from an existing version, synchronize two versions …
Activate / deactivate milestones mode
A POST
to /milestones/activate
activate / deactivate milestones mode, according to the value sent in the parameter.
HTTP request
POST /api/rest/latest/milestones/activate?enabled=true HTTP/1.1
Accept: application/json
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
enabled=true
Request parameters
Parameter | Description |
---|---|
|
takes the values true/false to activate/deactivate the milestone mode. |
Example response
HTTP/1.1 204 No Content
Get all milestones
A GET
to /milestones
returns all the milestones that the user is allowed to read.
HTTP request
GET /api/rest/latest/milestones HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1028
{
"_embedded" : {
"milestones" : [ {
"_type" : "milestone",
"id" : 11,
"label" : "Milestone 1",
"status" : "PLANNED",
"end_date" : "2020-03-19T00:23:45.000+0000",
"range" : "GLOBAL",
"description" : "example of milestone creation",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/milestones/11"
}
}
}, {
"_type" : "milestone",
"id" : 12,
"label" : "Milestone 2",
"status" : "PLANNED",
"end_date" : "2020-03-19T00:23:45.000+0000",
"range" : "GLOBAL",
"description" : "example of milestone creation number 2 ",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/milestones/12"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/milestones?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get milestone
A GET
to /milestones/{id}
returns the milestone with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the milestone |
HTTP request
GET /api/rest/latest/milestones/11 HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Length: 483
Content-Type: application/json;charset=UTF-8
{
"_type" : "milestone",
"id" : 11,
"label" : "Milestone 1",
"status" : "PLANNED",
"end_date" : "2020-03-19T00:23:45.000+0000",
"range" : "GLOBAL",
"description" : "example of milestone creation",
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/milestones/11"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the milestone |
|
|
the label of the milestone |
|
|
the description of the milestone |
|
|
the status of the milestone |
|
|
due date of the milestone |
|
|
range of the milestone |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this milestone |
Create milestone
A POST
to /milestones
creates a new milestone.
HTTP request
POST /api/rest/latest/milestones HTTP/1.1
Accept: application/json
Content-Length: 176
Content-Type: application/json
Host: localhost:8080
{
"_type" : "milestone",
"label" : "Milestone 1",
"description" : "example of milestone creation",
"end_date" : "2020-03-19T22:00:00.000+0000",
"status" : "PLANNED"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the label of the milestone (mandatory) |
|
|
the description of the milestone |
|
|
the status of the milestone. |
|
|
due date of the milestone (mandatory) |
Example response
HTTP/1.1 201 Created
Content-Length: 483
Content-Type: application/json;charset=UTF-8
{
"_type" : "milestone",
"id" : 11,
"label" : "Milestone 1",
"status" : "PLANNED",
"end_date" : "2020-03-19T00:23:45.000+0000",
"range" : "GLOBAL",
"description" : "example of milestone creation",
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/milestones/11"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the milestone |
|
|
the label of the milestone |
|
|
the description of the milestone |
|
|
the status of the milestone |
|
|
due date of the milestone |
|
|
range of the milestone |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this milestone |
Modify milestone
A PATCH
to /milestones/{id}
modifies the milestone with the given id.
HTTP request
PATCH /api/rest/latest/milestones/11 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 202
{
"_type" : "milestone",
"label" : "Milestone 1",
"description" : "example of milestone updating",
"end_date" : "2020-03-19T22:00:00.000+0000",
"status" : "PLANNED",
"range" : "RESTRICTED"
}
Path parameters
Parameter | Description |
---|---|
|
the id of the milestone |
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the label of the milestone |
|
|
the description of the milestone |
|
|
the status of the milestone. |
|
|
due date of the milestone |
|
|
range of the milestone |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 487
{
"_type" : "milestone",
"id" : 11,
"label" : "Milestone 1",
"status" : "PLANNED",
"end_date" : "2020-03-19T00:23:45.000+0000",
"range" : "RESTRICTED",
"description" : "example of milestone updating",
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/milestones/11"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the milestone |
|
|
the label of the milestone |
|
|
the description of the milestone |
|
|
the status of the milestone |
|
|
due date of the milestone |
|
|
range of the milestone |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this milestone |
Delete milestone
A DELETE
to /milestones/{ids}
deletes one or several milestone(s) with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the milestones |
HTTP request
DELETE /api/rest/latest/milestones/11,12 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Example response
HTTP/1.1 204 No Content
Projects
This chapter focuses on project administration.
Get all projects
A GET
to /projects
returns all the projects that the client is allowed to read.
HTTP request
GET /api/rest/latest/projects?page=0&size=3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Length: 913
Content-Type: application/json;charset=UTF-8
{
"_embedded" : {
"projects" : [ {
"_type" : "project",
"id" : 367,
"name" : "sample project 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367"
}
}
}, {
"_type" : "project",
"id" : 456,
"name" : "sample project 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/456"
}
}
}, {
"_type" : "project",
"id" : 789,
"name" : "sample project 3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/789"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects?page=0&size=3"
}
},
"page" : {
"size" : 3,
"totalElements" : 3,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get project
A GET
to /projects/{id}
returns the project with the given id. This retrieves a project administration data and is only authorized to administrators.
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/367 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Length: 911
Content-Type: application/json;charset=UTF-8
{
"_type" : "project",
"id" : 367,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367"
},
"requirements" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/requirements-library/content"
},
"test-cases" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/test-cases-library/content"
},
"campaigns" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/campaigns-library/content"
},
"permissions" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/permissions"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the project |
|
|
the type of the entity |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
whether the project is active or not |
|
|
the attachments of the project |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this project |
|
link to the content of the requirement library of this project |
|
link to the content of the test case library of this project |
|
link to the content of the campaign library of this project |
|
link to the permission list of this project |
|
link to the attachments of this project |
Get project by name
A GET
to /projects
with a request parameter projectName
returns the project with the given name.
This retrieves a project administration data and is only authorized to administrators.
Be careful, both the name of the parameter projectName
and the value of the project name are case-sensitive.
HTTP request
GET /api/rest/latest/projects?projectName=sample+project HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
the name of the project |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Length: 907
Content-Type: application/json;charset=UTF-8
{
"_type" : "project",
"id" : 367,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367"
},
"requirements" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/requirements-library/content"
},
"test-cases" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/test-cases-library/content"
},
"campaigns" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/campaigns-library/content"
},
"permissions" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/permissions"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/projects/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the project |
|
|
the type of the entity |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
whether the project is active or not |
|
|
the attachments of the project |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this project |
|
link to the content of the requirement library of this project |
|
link to the content of the test case library of this project |
|
link to the content of the campaign library of this project |
|
link to the permission list of this project |
|
link to the attachments of this project |
Create project
A POST
to /projects
creates a new project.
-
Create new project
HTTP request
POST /api/rest/latest/projects HTTP/1.1
Accept: application/json
Content-Type: application/json
Content-Length: 134
Host: localhost:8080
{
"_type" : "project",
"name" : "sample project",
"label" : "no price tag",
"description" : "<p>do something meaningful</p>"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Length: 670
Content-Type: application/json;charset=UTF-8
{
"_type" : "project",
"id" : 333,
"description" : "<p>do something meaningful</p>",
"label" : "no price tag",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333"
},
"requirements" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/requirements-library/content"
},
"test-cases" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/test-cases-library/content"
},
"campaigns" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/campaigns-library/content"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the project |
|
|
whether the project is active or not |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this project |
|
link to the content of the requirement library of this project |
|
link to the content of the test case library of this project |
|
link to the content of the campaign library of this project |
-
Create new project using template
HTTP request
POST /api/rest/latest/projects HTTP/1.1
Accept: application/json
Content-Length: 394
Content-Type: application/json
Host: localhost:8080
{
"_type" : "project",
"name" : "sample project",
"label" : "no price tag",
"description" : "<p>do something meaningful</p>",
"template_id" : 23,
"params" : {
"copyPermissions" : true,
"copyCUF" : true,
"copyBugtrackerBinding" : true,
"copyAutomatedProjects" : true,
"copyInfolists" : true,
"copyMilestone" : true,
"copyAllowTcModifFromExec" : true
}
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
the id of project template |
|
|
the parameters to create a new project from template |
|
|
whether the project’s permissions will be copied or not |
|
|
whether the project’s custom fields will be copied or not |
|
|
whether the project’s bugtracker will be copied or not |
|
|
whether the project’s test automation management will be copied or not |
|
|
whether the project’s information lists will be copied or not |
|
|
whether the project’s milestones will be copied or not |
|
|
whether the project’s execution option will be copied or not |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Length: 670
Content-Type: application/json;charset=UTF-8
{
"_type" : "project",
"id" : 333,
"description" : "<p>do something meaningful</p>",
"label" : "no price tag",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333"
},
"requirements" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/requirements-library/content"
},
"test-cases" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/test-cases-library/content"
},
"campaigns" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/campaigns-library/content"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the project |
|
|
whether the project is active or not |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this project |
|
link to the content of the requirement library of this project |
|
link to the content of the test case library of this project |
|
link to the content of the campaign library of this project |
Create project template
A POST
to /projects
creates a new project template.
-
Create new template
HTTP request
POST /api/rest/latest/projects HTTP/1.1
Accept: application/json
Content-Length: 152
Content-Type: application/json
Host: localhost:8080
{
"_type" : "project-template",
"name" : "sample project template",
"label" : "no price tag",
"description" : "<p>do something meaningful</p>"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the name of the project template |
|
|
the label of the project template |
|
|
the description of the project template |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Length: 688
Content-Type: application/json;charset=UTF-8
{
"_type" : "project-template",
"id" : 333,
"description" : "<p>do something meaningful</p>",
"label" : "no price tag",
"name" : "sample project template",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333"
},
"requirements" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/requirements-library/content"
},
"test-cases" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/test-cases-library/content"
},
"campaigns" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/campaigns-library/content"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the project template |
|
|
whether the project template is active or not |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this project |
|
link to the content of the requirement library of this project template |
|
link to the content of the test case library of this project template |
|
link to the content of the campaign library of this project template |
-
Create new template from existing project
HTTP request
POST /api/rest/latest/projects HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 411
{
"_type" : "project-template",
"name" : "sample project template",
"label" : "no price tag",
"description" : "<p>do something meaningful</p>",
"project_id" : 55,
"params" : {
"copyPermissions" : true,
"copyCUF" : true,
"copyBugtrackerBinding" : true,
"copyAutomatedProjects" : true,
"copyInfolists" : true,
"copyMilestone" : true,
"copyAllowTcModifFromExec" : true
}
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
the id of project template |
|
|
the parameters to create a new project from template |
|
|
whether the project’s permissions will be copied or not |
|
|
whether the project’s custom fields will be copied or not |
|
|
whether the project’s bugtracker will be copied or not |
|
|
whether the project’s test automation management will be copied or not |
|
|
whether the project’s information lists will be copied or not |
|
|
whether the project’s milestones will be copied or not |
|
|
whether the project’s execution option will be copied or not |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Length: 688
Content-Type: application/json;charset=UTF-8
{
"_type" : "project-template",
"id" : 333,
"description" : "<p>do something meaningful</p>",
"label" : "no price tag",
"name" : "sample project template",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333"
},
"requirements" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/requirements-library/content"
},
"test-cases" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/test-cases-library/content"
},
"campaigns" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/campaigns-library/content"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the project template |
|
|
whether the project template is active or not |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this project |
|
link to the content of the requirement library of this project template |
|
link to the content of the test case library of this project template |
|
link to the content of the campaign library of this project template |
Get project permissions
A GET
to /projects/{id}/permissions
returns the permission groups of the project with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/367/permissions HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Length: 1026
Content-Type: application/json;charset=UTF-8
{
"content" : {
"validator" : [ {
"_type" : "team",
"id" : 852,
"name" : "Team B",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/852"
}
}
} ],
"project_viewer" : [ {
"_type" : "user",
"id" : 486,
"login" : "User-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486"
}
}
}, {
"_type" : "user",
"id" : 521,
"login" : "User-2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/521"
}
}
} ],
"advanced_tester" : [ {
"_type" : "team",
"id" : 567,
"name" : "Team A",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/567"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/permissions"
}
}
}
Links
Relation | Description |
---|---|
|
the link to this project permissions |
Add permissions to project
A POST
to /projects/{id}/permissions/{permissionGroup}
adds certain users or teams to the permission group of the project with the given id.
The possible {permissionGroup} are test_editor, project_viewer, project_manager, test_runner, test_designer, advanced_tester and validator.
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
|
the permission group of which the users/teams will be add in |
HTTP request
POST /api/rest/latest/projects/367/permissions/advanced_tester HTTP/1.1
Accept: application/json
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
ids=486%2C521
Request parameters
Parameter | Description |
---|---|
|
the ids of the users/teams |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 575
{
"content" : {
"advanced_tester" : [ {
"_type" : "user",
"id" : 486,
"login" : "User-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486"
}
}
}, {
"_type" : "user",
"id" : 521,
"login" : "User-2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/521"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/permissions"
}
}
}
Links
Relation | Description |
---|---|
|
the link to this project permissions |
Delete permission(s) in project
A DELETE
to /projects/{projectId}/users/{partyIds}
deletes one or several user(s) with the given id(s) (separated with comma).
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
|
the list of user/team ids to be deleted |
HTTP request
DELETE /api/rest/latest/projects/44/users/77,99 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Bind custom field to project
A POST
to /projects/{id}/custom-fields/{entity-type}
bind custom field with the given id to given entity for given project.
HTTP request
POST /api/rest/latest/projects/14/custom-fields/REQUIREMENT_FOLDER HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
cufId=80
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
|
entity to bind (PROJECT,REQUIREMENT_FOLDER,CAMPAIGN_FOLDER,TESTCASE_FOLDER,CUSTOM_REPORT_FOLDER,CUSTOM_REPORT_PROJECT,TEST_CASE,TEST_STEP,CAMPAIGN,ITERATION,TEST_SUITE,REQUIREMENT_VERSION,EXECUTION,EXECUTION_STEP) |
Request parameters
Parameter | Description |
---|---|
|
the id of the custom-fields |
Example response
HTTP/1.1 200 OK
Unbind custom field to project
A DELETE
to /projects/{id}/custom-fields/{entity-type}
unbind custom field with the given id to given entity for given project.
HTTP request
DELETE /api/rest/latest/projects/14/custom-fields/REQUIREMENT_FOLDER HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
|
entity to bind (PROJECT,REQUIREMENT_FOLDER,CAMPAIGN_FOLDER,TESTCASE_FOLDER,CUSTOM_REPORT_FOLDER,CUSTOM_REPORT_PROJECT,TEST_CASE,TEST_STEP,CAMPAIGN,ITERATION,TEST_SUITE,REQUIREMENT_VERSION,EXECUTION,EXECUTION_STEP) |
Request parameters
Parameter | Description |
---|---|
|
the id of the custom-fields |
Example response
HTTP/1.1 204 No Content
Bind info list to project
A POST
to projects/{id}/info-lists/{list-type}
bind the info list with the given id to the given project.
HTTP request
POST /api/rest/latest/projects/14/info-lists/requirement-category HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
infolist-id=1
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
|
type of list to bind. list-type have 3 values : requirement-category, test-case-nature ou test-case-type |
Request parameters
Parameter | Description |
---|---|
|
the id of the info list |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 58
"infolist '1' bind to project 14 for requirement-category"
Bind milestones to a project
A POST
to /projects/{id}/milestones
associate a project with one or more milestones with the list of element IDs given in the request parameters.
To consult the milestones just follow the link "milestones".
HTTP request
POST /api/rest/latest/projects/14/milestones HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
milestoneIds=1
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
Request parameters
Parameter | Description |
---|---|
|
the ids of the milestones |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 426
{
"_type" : "project",
"id" : 14,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"milestones" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/milestones"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the project |
|
|
the type of the entity |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
whether the project is active or not |
|
|
the attachments of the project |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this project |
|
link to milestones associated with the project |
Get all milestones bound to a project
A GET
to /projects/{id}/milestones
to find all the milestones that are linked to a project
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/14/milestones HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Length: 1388
Content-Type: application/json;charset=UTF-8
{
"_embedded" : {
"milestones" : [ {
"_type" : "milestone",
"id" : 11,
"label" : "Milestone 1",
"status" : "PLANNED",
"end_date" : "2020-03-19T00:23:45.000+0000",
"range" : null,
"description" : "example of milestone creation",
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/milestones/11"
}
}
}, {
"_type" : "milestone",
"id" : 12,
"label" : "Milestone 2",
"status" : "PLANNED",
"end_date" : "2020-03-19T00:23:45.000+0000",
"range" : null,
"description" : "example of milestone creation number 2 ",
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/milestones/12"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/milestones?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Bind a bug tracker to a project
A POST
to /projects/{id}/bug-trackers
associate a project with the bug-tracker with the given id.
HTTP request
POST /api/rest/latest/projects/14/bug-trackers HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
bugtrackerId=1
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
Request parameters
Parameter | Description |
---|---|
|
the id of the bug-tracker |
Example response
HTTP/1.1 200 OK
Content-Length: 419
Content-Type: application/json;charset=UTF-8
{
"_type" : "project",
"id" : 14,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"bug-tracker" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/1"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the project |
|
|
the type of the entity |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
whether the project is active or not |
|
|
the attachments of the project |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this project |
|
link to the bug tracker of this project |
Unbind a bug tracker from a project
A DELETE
to /projects/{id}/bug-tracker
dissociate the project with given id from its bug tracker.
HTTP request
DELETE /api/rest/latest/projects/14/bug-tracker HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 320
{
"_type" : "project",
"id" : 14,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
}
Links
Relation | Description |
---|---|
|
link to this project |
Get the bug tracker bound to a project
A GET
to projects/{id}/bug-trackers
to find the bug-tracker linked to a project.
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/1/bug-trackers HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Length: 325
Content-Type: application/json;charset=UTF-8
{
"_type" : "bug-tracker",
"id" : 3,
"name" : "bugtracker3",
"url" : "url3",
"kind" : "kind3",
"iframe_friendly" : false,
"authentication_policy" : "USER",
"authentication_protocol" : "BASIC_AUTH",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/3"
}
}
}
Bind a scm repository to a project
A POST
to /projects/{id}/scm-repository
associate the project with given id to the scm repository given as parameter.
HTTP request
POST /api/rest/latest/projects/14/scm-repository HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
scmRepositoryId=11
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
Request parameters
Parameter | Description |
---|---|
|
the id of the scm repository |
Example response
HTTP/1.1 200 OK
Content-Length: 427
Content-Type: application/json;charset=UTF-8
{
"_type" : "project",
"id" : 14,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"scm-repository" : {
"href" : "http://localhost:8080/api/rest/latest/scm-repositories/11"
}
}
}
Links
Relation | Description |
---|---|
|
link to this project |
|
link to the scm repository of this project |
Unbind a scm repository from a project
A DELETE
to /projects/{id}/scm-repository
dissociate the project with given id from its scm repository.
HTTP request
DELETE /api/rest/latest/projects/14/scm-repository HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 320
{
"_type" : "project",
"id" : 14,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
}
Links
Relation | Description |
---|---|
|
link to this project |
Get project automation configuration
A GET
to projects/{id}/automation-conf
to find a project automation configuration.
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/1/automation-conf HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 354
{
"_type" : "project-automation-configuration",
"bdd_implementation_technology" : "ROBOT",
"bdd_implementation_language" : "ENGLISH",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/1/automation-conf"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/1"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the technology used to implement bdd tests |
|
|
the language used to implement bdd tests |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this configuration |
|
link to the project |
Modify project automation configuration
A PATCH
to projects/{id}/automation-conf
modifies the automation configuration of the projet with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
HTTP request
PATCH /api/rest/latest/projects/1/automation-conf HTTP/1.1
Accept: application/json
Content-Length: 142
Content-Type: application/json
Host: localhost:8080
{
"_type" : "project-automation-configuration",
"bdd_implementation_technology" : "CUCUMBER",
"bdd_implementation_language" : "GERMAN"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the technology used to implement bdd tests |
|
|
the language used to implement bdd tests |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 356
{
"_type" : "project-automation-configuration",
"bdd_implementation_technology" : "CUCUMBER",
"bdd_implementation_language" : "GERMAN",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/1/automation-conf"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/1"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the technology used to implement bdd tests |
|
|
the language used to implement bdd tests |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this configuration |
|
link to the project |
Enable or disable plugin of project
A POST
to projects/{id}/plugin/{pluginId}/activate
activates or deactivates the plugin with the given id.
HTTP request
POST /api/rest/latest/projects/14/plugins/squash.tm.plugin.jirasync/activate?enabled=false&saveConfig=false HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
enabled=false&saveConfig=false
Path parameters
Parameter | Description |
---|---|
|
the id of the project |
|
the string corresponding to the id of the plugin to activate or deactivate |
Request parameters
Parameter | Description |
---|---|
|
true to activate the plugin, false to deactivate it |
|
only relevant when deactivating a plugin, set it to true if you want to keep your configuration |
Example response
HTTP/1.1 204 No Content
Requirement Version Link Types
This chapter focuses on types of links between requirements.
Get all link type
A GET
to /requirement-link-types
returns all the link types.
HTTP request
GET /api/rest/latest/requirement-link-types HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Length: 1066
Content-Type: application/json;charset=UTF-8
{
"_embedded" : {
"requirement-version-link-types" : [ {
"_type" : "requirement-version-link-type",
"id" : 1,
"role1" : "Role1 link1",
"role1_code" : "Role1 code link1",
"role2" : "Role2 link1",
"role2_code" : "Role2 code link1",
"default" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-link-types/1"
}
}
}, {
"_type" : "requirement-version-link-type",
"id" : 2,
"role1" : "Role1 link2",
"role1_code" : "Role1 code link2",
"role2" : "Role2 link2",
"role2_code" : "Role2 code link2",
"default" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-link-types/2"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-link-types?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get link type by id
A GET
to /requirement-link-types/{id}
returns the link type with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the link type |
HTTP request
GET /api/rest/latest/requirement-link-types/1 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Length: 307
Content-Type: application/json;charset=UTF-8
{
"_type" : "requirement-version-link-type",
"id" : 1,
"role1" : "Role1",
"role1_code" : "Role 1 code",
"role2" : "Role2",
"role2_code" : "Role 2 code",
"default" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-link-types/1"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the link type |
|
|
the first role of the link between requirement |
|
|
the first role code |
|
|
the second role of the link between requirement |
|
|
the second role code |
|
|
the default link type |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this link type |
Get link type by code role
A GET
to /requirement-link-types
returns the link type with the given code role.
HTTP request
GET /api/rest/latest/requirement-link-types?codeRole=Role1code HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
role code of the link to search |
Example response
HTTP/1.1 200 OK
Content-Length: 303
Content-Type: application/json;charset=UTF-8
{
"_type" : "requirement-version-link-type",
"id" : 1,
"role1" : "Role1",
"role1_code" : "Role1code",
"role2" : "Role2",
"role2_code" : "Role2code",
"default" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-link-types/1"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the milestone |
|
|
the first role of the link between requirement |
|
|
the first role code |
|
|
the second role of the link between requirement |
|
|
the second role code |
|
|
the default link type |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this link type |
Create link type
A POST
to /requirement-link-types
creates a new link type.
HTTP request
POST /api/rest/latest/requirement-link-types HTTP/1.1
Accept: application/json
Content-Length: 108
Content-Type: application/json
Host: localhost:8080
{
"role1" : "Role1",
"role1_code" : "Role 1 code",
"role2" : "Role2",
"role2_code" : "Role 2 code"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the first role of the link between requirement (mandatory) |
|
|
the first role code (mandatory) |
|
|
the second role of the link between requirement (mandatory) |
|
|
the second role code (mandatory) |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Length: 307
Content-Type: application/json;charset=UTF-8
{
"_type" : "requirement-version-link-type",
"id" : 1,
"role1" : "Role1",
"role1_code" : "Role 1 code",
"role2" : "Role2",
"role2_code" : "Role 2 code",
"default" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-link-types/1"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the milestone |
|
|
the first role of the link between requirement |
|
|
the first role code |
|
|
the second role of the link between requirement |
|
|
the second role code |
|
|
the default link type |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this milestone |
Modify link type
A PATCH
to /requirement-link-types/{id}
modifies the link type with the given id.
HTTP request
PATCH /api/rest/latest/requirement-link-types/1 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 136
{
"role1" : "Update role1",
"role1_code" : "Update role 1 code",
"role2" : "Update role2",
"role2_code" : "Update role 2 code"
}
Path parameters
Parameter | Description |
---|---|
|
the id of the link type |
Request fields
Path | Type | Description |
---|---|---|
|
|
the first role of the link between requirement |
|
|
the first role code |
|
|
the second role of the link between requirement |
|
|
the second role code |
Example response
HTTP/1.1 200 OK
Content-Length: 335
Content-Type: application/json;charset=UTF-8
{
"_type" : "requirement-version-link-type",
"id" : 1,
"role1" : "Update role1",
"role1_code" : "Update role 1 code",
"role2" : "Update role2",
"role2_code" : "Update role 2 code",
"default" : false,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/requirement-link-types/1"
}
}
}
Delete link type
A DELETE
to /requirement-link-types/{ids}
deletes one or several link type(s) with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the link type |
HTTP request
DELETE /api/rest/latest/requirement-link-types/11%2012 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Example response
HTTP/1.1 204 No Content
Source Code Management Repositories
This chapter is managed on source code management repositories.
Get scm repository
A GET
to /scm-repositories/{id}
returns the source code management repository with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the source code management repository |
HTTP request
GET /api/rest/latest/scm-repositories/1 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Length: 606
Content-Type: application/json;charset=UTF-8
{
"_type" : "scm-repository",
"id" : 1,
"name" : "GherkinTestCase",
"repository_path" : "home/Git1",
"working_folder_path" : "resources/features",
"working_branch" : "master",
"scm_server" : {
"_type" : "scm-server",
"id" : 9,
"name" : "server1",
"url" : "https://github.com/",
"kind" : "git",
"committer_mail" : "henix@git.fr",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/9"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-repositories/1"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the source code management repository |
|
|
the name of the source code management repository |
|
|
the repository path of the source code management repository |
|
|
the working folder path of the source code management repository |
|
|
the working branch of the source code management repository |
|
|
the scm server this source code management repository belongs to |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this source code management repository |
Modify scm repository
A PATCH
to /scm-repositories/{id}
modifies the source code management repository with the given id.
HTTP request
PATCH /api/rest/latest/scm-repositories/1?branch=default HTTP/1.1
Accept: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the id of the source code management repository |
Request parameters
Parameter | Description |
---|---|
|
the new working branch of the source code management repository |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Length: 607
Content-Type: application/json;charset=UTF-8
{
"_type" : "scm-repository",
"id" : 1,
"name" : "GherkinTestCase",
"repository_path" : "home/Git1",
"working_folder_path" : "resources/features",
"working_branch" : "default",
"scm_server" : {
"_type" : "scm-server",
"id" : 9,
"name" : "server1",
"url" : "https://github.com/",
"kind" : "git",
"committer_mail" : "henix@git.fr",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/9"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-repositories/1"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the source code management repository |
|
|
the name of the source code management repository |
|
|
the repository path of the source code management repository |
|
|
the working folder path of the source code management repository |
|
|
the working branch of the source code management repository |
|
|
the scm server this source code management repository belongs to |
|
|
related links |
Delete scm repository
A DELETE
to /scm-repositories/{ids}
deletes one or several source code management repositories with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the source code management repositories |
HTTP request
DELETE /api/rest/latest/scm-repositories/9,10 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Example response
HTTP/1.1 204 No Content
Source Code Management Servers
This chapter is managed on source code management servers.
Get all scm servers
A GET
to /scm-servers
returns all the source code management servers.
HTTP request
GET /api/rest/latest/scm-servers HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Length: 1125
Content-Type: application/json;charset=UTF-8
{
"_embedded" : {
"scm-servers" : [ {
"_type" : "scm-server",
"id" : 1,
"name" : "server1",
"url" : "https://github.com/",
"kind" : "git",
"committer_mail" : "henix@git.fr",
"authentication_policy" : "USER",
"authentication_protocol" : "BASIC_AUTH",
"repositories" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/1"
}
}
}, {
"_type" : "scm-server",
"id" : 2,
"name" : "server2",
"url" : "https://bitbucket.org/",
"kind" : "git",
"committer_mail" : "henix@git.fr",
"authentication_policy" : "USER",
"authentication_protocol" : "BASIC_AUTH",
"repositories" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/2"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get scm server
A GET
to /scm-servers/{id}
returns the source code management server with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the source code management server |
HTTP request
GET /api/rest/latest/scm-servers/1 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Length: 692
Content-Type: application/json;charset=UTF-8
{
"_type" : "scm-server",
"id" : 1,
"name" : "server1",
"url" : "https://github.com/",
"kind" : "git",
"committer_mail" : "henix@git.fr",
"authentication_policy" : "USER",
"authentication_protocol" : "BASIC_AUTH",
"repositories" : [ {
"_type" : "scm-repository",
"id" : 9,
"name" : "GherkinTestCase",
"repository_path" : "home/Git1",
"working_folder_path" : "resources/features",
"working_branch" : "master",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-repositories/9"
}
}
} ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/1"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the source code management server |
|
|
the name of the source code management server |
|
|
the url of the source code management server |
|
|
the kind of the source code management server |
|
|
the committer mail used for the source code management server |
|
|
the authentication policy of the source code management server |
|
|
the authentication protocol of the source code management server |
|
|
the repositories of this source code management server |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this source code management server |
Create scm server
A POST
to /scm-servers
creates a new source code management server.
HTTP request
POST /api/rest/latest/scm-servers HTTP/1.1
Accept: application/json
Content-Type: application/json
Content-Length: 118
Host: localhost:8080
{
"name" : "New scmServer",
"url" : "https://github.com/",
"kind" : "git",
"committer_mail" : "henix@git.fr"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the name of the source code management server (mandatory) |
|
|
the url of the source code management server (mandatory) |
|
|
the kind of the source code management server (mandatory) |
|
|
the committer mail used for the source code management server |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Length: 698
Content-Type: application/json;charset=UTF-8
{
"_type" : "scm-server",
"id" : 1,
"name" : "New scmServer",
"url" : "https://github.com/",
"kind" : "git",
"committer_mail" : "henix@git.fr",
"authentication_policy" : "USER",
"authentication_protocol" : "BASIC_AUTH",
"repositories" : [ {
"_type" : "scm-repository",
"id" : 9,
"name" : "GherkinTestCase",
"repository_path" : "home/Git1",
"working_folder_path" : "resources/features",
"working_branch" : "master",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-repositories/9"
}
}
} ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/1"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the source code management server |
|
|
the name of the source code management server |
|
|
the url of the source code management server |
|
|
the kind of the source code management server |
|
|
the committer mail used for the source code management server |
|
|
the authentication policy of the source code management server |
|
|
the authentication protocol of the source code management server |
|
|
the repositories of this source code management server |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this source code management server |
Modify scm server
A PATCH
to /scm-servers/{id}
modifies the source code management server with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the source code management server |
HTTP request
PATCH /api/rest/latest/scm-servers/2 HTTP/1.1
Accept: application/json
Content-Length: 106
Content-Type: application/json
Host: localhost:8080
{
"name" : "update scmServer",
"url" : "https://bitbucket.org/",
"committer_mail" : "git@henix.fr"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the name of the source code management server |
|
|
the url of the source code management server |
|
|
the committer mail used for the source code management server |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 376
{
"_type" : "scm-server",
"id" : 2,
"name" : "update scmServer",
"url" : "https://bitbucket.org/",
"kind" : "git",
"committer_mail" : "git@henix.fr",
"authentication_policy" : "USER",
"authentication_protocol" : "BASIC_AUTH",
"repositories" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/2"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the source code management server |
|
|
the name of the source code management server |
|
|
the url of the source code management server |
|
|
the kind of the source code management server |
|
|
the committer mail used for the source code management server |
|
|
the authentication policy of the source code management server |
|
|
the authentication protocol of the source code management server |
|
|
the repositories of this source code management server |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this source code management server |
Delete scm server
A DELETE
to /scm-servers/{ids}
deletes one or several source code management servers with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the source code management servers |
HTTP request
DELETE /api/rest/latest/scm-servers/11,12 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Example response
HTTP/1.1 204 No Content
Get all scm repositories from the scm server
A GET
to /scm-servers/{id}/scm-repositories
returns all the source code management repository for the scm server.
HTTP request
GET /api/rest/latest/scm-servers/11/scm-repositories HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Length: 1725
Content-Type: application/json;charset=UTF-8
{
"_embedded" : {
"scm-repositorys" : [ {
"_type" : "scm-repository",
"id" : 1,
"name" : "GherkinTestCase",
"repository_path" : "home/Git1",
"working_folder_path" : "resources/features",
"working_branch" : "master",
"scm_server" : {
"_type" : "scm-server",
"id" : 11,
"name" : "scmServer",
"url" : "https://bitbucket.org/",
"kind" : "git",
"committer_mail" : "git@henix.fr",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/11"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-repositories/1"
}
}
}, {
"_type" : "scm-repository",
"id" : 2,
"name" : "StandardTestCase",
"repository_path" : "home/Git2",
"working_folder_path" : "resources/features",
"working_branch" : "master",
"scm_server" : {
"_type" : "scm-server",
"id" : 11,
"name" : "scmServer",
"url" : "https://bitbucket.org/",
"kind" : "git",
"committer_mail" : "git@henix.fr",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/11"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-repositories/2"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/11/scm-repositories?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Add a scm repository to a scm server
A POST
to /scm-servers/{id}/scm-repositories
creates a new source code management repository for the given scm server id .
HTTP request
POST /api/rest/latest/scm-servers/9/scm-repositories HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 146
{
"name" : "GherkinTestCase",
"working_branch" : "master",
"repository_path" : "home/Git1",
"working_folder_path" : "resources/features"
}
Path parameters
Parameter | Description |
---|---|
|
the id of the source code management server |
Request fields
Path | Type | Description |
---|---|---|
|
|
the name of the source code management repository (mandatory) |
|
|
the repository path of the source code management repository (mandatory) |
|
|
the working folder path of the source code management repository |
|
|
the working branch of the source code management repository (mandatory) |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Length: 618
Content-Type: application/json;charset=UTF-8
{
"_type" : "scm-repository",
"id" : 1,
"name" : "GherkinTestCase",
"repository_path" : "home/Git1",
"working_folder_path" : "resources/features",
"working_branch" : "master",
"scm_server" : {
"_type" : "scm-server",
"id" : 9,
"name" : "server1",
"url" : "https://github.com/",
"kind" : "git",
"committer_mail" : "henix@git.fr",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/9"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/9/scm-repositories"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the source code management repository |
|
|
the name of the source code management repository |
|
|
the repository path of the source code management repository |
|
|
the working folder path of the source code management repository |
|
|
the working branch of the source code management repository |
|
|
the scm server this source code management repository belongs to |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this source code management repository |
Get scm server credentials
A GET
to /scm-servers/{id}/credentials
get the credentials for the given source code management server.
HTTP request
GET /api/rest/latest/scm-servers/1/credentials HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the id of the scm server |
Example response
HTTP/1.1 200 OK
Content-Length: 194
Content-Type: application/json;charset=UTF-8
{
"_type" : "basic-auth-credentials",
"username" : "user@henix.fr",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/1/credentials"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the credentials, only basic-auth-credentials is used by scm servers |
|
|
the username to authenticate this scm server |
|
|
related links |
Set scm server credentials
A POST
to /scm-servers/{id}/credentials
set credentials for the given source code management server.
HTTP request
POST /api/rest/latest/scm-servers/1/credentials HTTP/1.1
Accept: application/json
Content-Length: 106
Content-Type: application/json
Host: localhost:8080
{
"_type" : "basic-auth-credentials",
"username" : "user@henix.fr",
"password" : "qcrGmkQxI0J789F"
}
Path parameters
Parameter | Description |
---|---|
|
the id of the scm server |
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the credentials, only basic-auth-credentials is used by scm servers |
|
|
the username to authenticate this scm server |
|
|
the password to authenticate this scm server |
Example response
HTTP/1.1 200 OK
Content-Length: 194
Content-Type: application/json;charset=UTF-8
{
"_type" : "basic-auth-credentials",
"username" : "user@henix.fr",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/1/credentials"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the credentials, only basic-auth-credentials is used by scm servers |
|
|
the username to authenticate this scm server |
|
|
related links |
Teams
This chapter focuses on additional services for the teams. These services extend driven-by-id methods implemented in the Rest Services API by allowing search by Team name.
Get all teams
A GET
to /teams
returns all the teams.
HTTP request
GET /api/rest/latest/teams?page=2&size=1 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Length: 846
Content-Type: application/json;charset=UTF-8
{
"_embedded" : {
"teams" : [ {
"_type" : "team",
"id" : 567,
"name" : "Team A",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/567"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/teams?page=0&size=1"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/teams?page=1&size=1"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams?page=2&size=1"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/teams?page=3&size=1"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/teams?page=4&size=1"
}
},
"page" : {
"size" : 1,
"totalElements" : 5,
"totalPages" : 5,
"number" : 2
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Create team
A POST
to /teams
creates a new team.
HTTP request
POST /api/rest/latest/teams HTTP/1.1
Content-Length: 85
Accept: application/json
Content-Type: application/json
Host: localhost:8080
{
"_type" : "team",
"name" : "Team A",
"description" : "<p>black panther</p>"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the name of the team |
|
|
the description of the team |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 386
{
"_type" : "team",
"id" : 332,
"name" : "Team A",
"description" : "<p>black panther</p>",
"members" : [ ],
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/332"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the team |
|
|
the members of this team |
|
|
the user who created this team |
|
|
the date of this team account was created |
|
|
the user who last modified this team |
|
|
the date of this team was last modified |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this user |
Get team
A GET
to /teams/{id}
returns the team with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the team |
HTTP request
GET /api/rest/latest/teams/567 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 386
{
"_type" : "team",
"id" : 567,
"name" : "Team A",
"description" : "<p>black panther</p>",
"members" : [ ],
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/567"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the team |
|
|
the name of the team |
|
|
the description of the team |
|
|
the members of this team |
|
|
the user who created this team |
|
|
the date of this team account was created |
|
|
the user who last modified this team |
|
|
the date of this team was last modified |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this user |
Modify team
A PATCH
to /teams/{id}
modifies the team with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the team |
HTTP request
PATCH /api/rest/latest/teams/567 HTTP/1.1
Content-Length: 85
Accept: application/json
Content-Type: application/json
Host: localhost:8080
{
"_type" : "team",
"name" : "Team A",
"description" : "<p>black panther</p>"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the name of the team |
|
|
the description of the team |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 386
{
"_type" : "team",
"id" : 332,
"name" : "Team A",
"description" : "<p>black panther</p>",
"members" : [ ],
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/332"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the team |
|
|
the members of this team |
|
|
the user who created this team |
|
|
the date of this team account was created |
|
|
the user who last modified this team |
|
|
the date of this team was last modified |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this user |
Delete team
A DELETE
to /teams/{ids}
deletes one or several team(s) with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the teams |
HTTP request
DELETE /api/rest/latest/teams/169,189 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Get team members
A GET
to /teams/team-name/{teamName}/members
returns all the members of the team with the given teamName.
Path parameters
Parameter | Description |
---|---|
|
the name of the team |
HTTP request
GET /api/rest/latest/teams/team-name/Team%20A/members HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2102
{
"_embedded" : {
"members" : [ {
"_type" : "user",
"id" : 1,
"first_name" : "Charles",
"last_name" : "Dupond",
"login" : "User-1",
"email" : "charlesdupond@aaaa.aa",
"active" : true,
"group" : "User",
"teams" : [ ],
"last_connected_on" : "2018-02-11T11:00:00.000+0000",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/1"
}
}
}, {
"_type" : "user",
"id" : 2,
"first_name" : "Chris",
"last_name" : "Dupond",
"login" : "User-2",
"email" : "chrisdupond@aaaa.aa",
"active" : true,
"group" : "User",
"teams" : [ ],
"last_connected_on" : "2018-03-11T11:00:00.000+0000",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/2"
}
}
}, {
"_type" : "user",
"id" : 3,
"first_name" : "Victor",
"last_name" : "Dupond",
"login" : "User-3",
"email" : "victordupond@aaaa.aa",
"active" : true,
"group" : "User",
"teams" : [ ],
"last_connected_on" : "2018-03-11T11:00:00.000+0000",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/3"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/team-name/Team%20A/members?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 3,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the members of this team |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Add members
A POST
to /teams/team-name/{teamName}/members
with userLogins in request parameters adds these users to the team with the given teamName.
Path parameters
Parameter | Description |
---|---|
|
the name of the team |
HTTP request
POST /api/rest/latest/teams/team-name/Team%20A/members HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
userLogins=John+Doe%2C+Jane+Doe
Request parameters
Parameter | Description |
---|---|
|
the logins of the members to add |
Remove members
A DELETE
to /teams/team-name/{teamName}/members
with userLogins in request parameters removes these users from the team with the given teamName.
Path parameters
Parameter | Description |
---|---|
|
the name of the team |
HTTP request
DELETE /api/rest/latest/teams/team-name/Team%20A/members HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
the logins of the members to remove |
Test Automation Servers
This chapter focuses on test automation servers.
Get all test automation servers
A GET
to /test-automation-servers
returns all the test automation servers that the client is allowed to read.
HTTP request
GET /api/rest/latest/test-automation-servers?size=2&page=1 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1778
{
"_embedded" : {
"test-automation-servers" : [ {
"_type" : "test-automation-server",
"id" : 569,
"name" : "TA server 1",
"url" : "http://1234:4567/jenkins/",
"kind" : "jenkins",
"manual_slave_selection" : false,
"description" : "<p>nice try</p>",
"created_by" : "admin",
"created_on" : "2017-06-15T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2017-06-15T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers/569"
}
}
}, {
"_type" : "test-automation-server",
"id" : 654,
"name" : "TA server 2",
"url" : "http://1234:4567/jira/",
"kind" : "jenkins",
"manual_slave_selection" : false,
"description" : "<p>second shot</p>",
"created_by" : "admin",
"created_on" : "2017-06-15T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2017-06-15T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers/654"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers?page=0&size=2"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers?page=0&size=2"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers?page=1&size=2"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers?page=1&size=2"
}
},
"page" : {
"size" : 2,
"totalElements" : 4,
"totalPages" : 2,
"number" : 1
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get test automation server
A GET
to /test-automation-servers/{id}
returns the test automation server with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the test automation server |
HTTP request
GET /api/rest/latest/test-automation-servers/569 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 498
{
"_type" : "test-automation-server",
"id" : 569,
"name" : "TA server",
"url" : "http://1234:4567/jenkins/",
"kind" : "jenkins",
"manual_slave_selection" : false,
"description" : "<p>nice try</p>",
"created_by" : "admin",
"created_on" : "2017-06-15T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2017-06-15T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers/569"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the test automation server |
|
|
the type of the entity |
|
|
the name of the test automation server |
|
|
the url where to reach the test automation server |
|
|
the kind of the test automation server |
|
|
the description of the test automation server |
|
|
whether the test automation server is manual slave or not |
|
|
the user who created the test automation server |
|
|
the date the test automation server was created |
|
|
the user who last modified the test automation server |
|
|
the date the test automation server was last modified |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this test automation server |
Create test automation server
A POST
to /test-automation-servers
creates a new test automation server.
HTTP request
POST /api/rest/latest/test-automation-servers HTTP/1.1
Accept: application/json
Content-Length: 148
Content-Type: application/json
Host: localhost:8080
{
"name" : "TA server",
"url" : "http://1234:4567/jenkins",
"manual_slave_selection" : true,
"description" : "<p>TA server description/p>"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the name of the test automation server (mandatory) |
|
|
the url of the test automation server (mandatory) |
|
|
whether the test automation server is manual slave or not |
|
|
the description of the test automation server |
Request parameters
Parameter | Description |
---|---|
|
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: 422
{
"_type" : "test-automation-server",
"id" : 569,
"name" : "TA server",
"url" : "http://1234:4567/jenkins",
"kind" : "jenkins",
"manual_slave_selection" : true,
"description" : "<p>TA server description</p>",
"created_by" : "admin",
"created_on" : "2017-06-15T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers/569"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the test automation server |
|
|
the name of the test automation server |
|
|
the url where to reach the test automation server |
|
|
the kind of the test automation server |
|
|
whether the test automation server is manual slave or not |
|
|
the description of the test automation server |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this test automation server |
Modify test automation server
A PATCH
to /test-automation-servers/{id}
modifies the test automation server with the given id.
HTTP request
PATCH /api/rest/latest/test-automation-servers/569 HTTP/1.1
Accept: application/json
Content-Length: 154
Content-Type: application/json
Host: localhost:8080
{
"name" : "Update TA server",
"url" : "http://1234:4569/jenkins",
"manual_slave_selection" : false,
"description" : "<p>Update description</p>"
}
Path parameters
Parameter | Description |
---|---|
|
the id of the test automation server |
Request fields
Path | Type | Description |
---|---|---|
|
|
the name of the test automation server |
|
|
the url of the test automation server |
|
|
whether the test automation server is manual slave or not |
|
|
the description of the test automation server |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 514
{
"_type" : "test-automation-server",
"id" : 569,
"name" : "Update TA server",
"url" : "http://1234:4569/jenkins",
"kind" : "jenkins",
"manual_slave_selection" : false,
"description" : "<p>Update description</p>",
"created_by" : "admin",
"created_on" : "2017-06-15T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2017-06-15T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers/569"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the test automation server |
|
|
the name of the test automation server |
|
|
the url where to reach the test automation server |
|
|
the kind of the test automation server |
|
|
whether the test automation server is manual slave or not |
|
|
the description of the test automation server |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this test automation server |
Delete test automation server
A DELETE
to /test-automation-servers/{ids}
deletes one or several test automation server(s) with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the test automation servers |
HTTP request
DELETE /api/rest/latest/test-automation-servers/11,12 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Example response
HTTP/1.1 204 No Content
Get test automation server credentials
A GET
to /test-automation-servers/{id}/credentials
get the credentials for the given test automation server.
HTTP request
GET /api/rest/latest/test-automation-servers/1/credentials HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the id of the test automation server |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 206
{
"_type" : "basic-auth-credentials",
"username" : "user@henix.fr",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers/1/credentials"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the credentials, only basic-auth-credentials is used by test automation servers |
|
|
the username to authenticate this test automation server |
|
|
related links |
Set test automation server credentials
A POST
to /test-automation-servers/{id}/credentials
set credentials for the given test automation server.
HTTP request
POST /api/rest/latest/test-automation-servers/1/credentials HTTP/1.1
Accept: application/json
Content-Length: 106
Content-Type: application/json
Host: localhost:8080
{
"_type" : "basic-auth-credentials",
"username" : "user@henix.fr",
"password" : "qcrGmkQxI0J789F"
}
Path parameters
Parameter | Description |
---|---|
|
the id of the test automation server |
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the credentials, only basic-auth-credentials is used by test automation servers |
|
|
the username to authenticate this test automation server |
|
|
the password to authenticate this test automation server |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 206
{
"_type" : "basic-auth-credentials",
"username" : "user@henix.fr",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers/1/credentials"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the credentials, only basic-auth-credentials is used by test automation servers |
|
|
the username to authenticate this test automation server |
|
|
related links |
Users
This chapter focuses on additional services for the users. These services extend driven-by-id methods implemented in the Rest Services API by allowing search by User login.
Get all users
A GET
to /users
returns all the users.
HTTP request
GET /api/rest/latest/users?page=2&size=1 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 894
{
"_embedded" : {
"users" : [ {
"_type" : "user",
"id" : 486,
"login" : "User-1",
"active" : true,
"group" : "User",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/users?page=0&size=1"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/users?page=1&size=1"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users?page=2&size=1"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/users?page=3&size=1"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/users?page=4&size=1"
}
},
"page" : {
"size" : 1,
"totalElements" : 5,
"totalPages" : 5,
"number" : 2
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get user
A GET
to /users/login/{login}
returns the user with the given login.
Path parameters
Parameter | Description |
---|---|
|
the login of the user |
HTTP request
GET /api/rest/latest/users/login/User-1 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Length: 529
Content-Type: application/json;charset=UTF-8
{
"_type" : "user",
"id" : 486,
"first_name" : "Charles",
"last_name" : "Dupond",
"login" : "User-1",
"email" : "charlesdupond@aaaa.aa",
"active" : true,
"group" : "User",
"teams" : [ ],
"last_connected_on" : "2018-02-11T11:00:00.000+0000",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the user |
|
|
the type of the entity |
|
|
the first name of the user |
|
|
the last name of the user |
|
|
the login of the user |
|
|
the email address of the user |
|
|
whether the user is activate or not |
|
|
the group of the user belong (admin or user) |
|
|
the team of the user participate |
|
|
the date of this user was last connected |
|
|
the user who created this user account |
|
|
the date of this user account was created |
|
|
the user who last modified this user account |
|
|
the date of this user account was last modified |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Create user
A POST
to /users
creates a new user.
HTTP request
POST /api/rest/latest/users HTTP/1.1
Accept: application/json
Content-Length: 180
Content-Type: application/json
Host: localhost:8080
{
"_type" : "user",
"first_name" : "Charles",
"last_name" : "Dupond",
"login" : "User-1",
"password" : "123456",
"email" : "charlesdupond@aaaa@aa",
"group" : "User"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the first name of the user |
|
|
the last name of the user |
|
|
the login of the user |
|
|
the password of the user |
|
|
the email address of the user |
|
|
the group of the user belong (admin, user or testAutomationServer) |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Length: 529
Content-Type: application/json;charset=UTF-8
{
"_type" : "user",
"id" : 987,
"first_name" : "Charles",
"last_name" : "Dupond",
"login" : "User-1",
"email" : "charlesdupond@aaaa.aa",
"active" : true,
"group" : "User",
"teams" : [ ],
"last_connected_on" : "2018-03-05T11:00:00.000+0000",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/987"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the user |
|
|
whether the user is activate or not |
|
|
the team of the user participate |
|
|
the date of this user was last connected |
|
|
the user who created this user account |
|
|
the date of this user account was created |
|
|
the user who last modified this user account |
|
|
the date of this user account was last modified |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this user |
Modify user
A PATCH
to /users/{id}
modifies the user with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the user |
HTTP request
PATCH /api/rest/latest/users/987 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 201
{
"_type" : "user",
"first_name" : "Charles",
"last_name" : "Dupond",
"login" : "User-42",
"password" : "123456",
"email" : "charlesdupond@bbbb@bb",
"active" : false,
"group" : "User"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the first name of the user |
|
|
the last name of the user |
|
|
the login of the user |
|
|
the password of the user |
|
|
the email address of the user |
|
|
whether the user is activate or not |
|
|
the group of the user belong (admin, user or testAutomationServer) |
Request parameters
Parameter | Description |
---|---|
|
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: 531
{
"_type" : "user",
"id" : 987,
"first_name" : "Charles",
"last_name" : "Dupond",
"login" : "User-42",
"email" : "charlesdupond@bbbb.bb",
"active" : false,
"group" : "User",
"teams" : [ ],
"last_connected_on" : "2018-03-05T11:00:00.000+0000",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/987"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the user |
|
|
the team of which the user is a member |
|
|
the date of this user was last connected |
|
|
the user who created this user account |
|
|
the date of this user account was created |
|
|
the user who last modified this user account |
|
|
the date of this user account was last modified |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this user |
Delete user
A DELETE
to /users/{ids}
deletes one or several user(s) with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the users |
HTTP request
DELETE /api/rest/latest/users/169,189 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Get user subscribed teams
A GET
to /users/login/{login}/teams
returns all the subscribed teams of the user with the given login.
Path parameters
Parameter | Description |
---|---|
|
the login of the user |
HTTP request
GET /api/rest/latest/users/login/User-1/teams HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Length: 1125
Content-Type: application/json;charset=UTF-8
{
"_embedded" : {
"teams" : [ {
"_type" : "team",
"id" : 567,
"name" : "Team A",
"description" : "<p>black panther</p>",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/567"
}
}
}, {
"_type" : "team",
"id" : 568,
"name" : "Team B",
"description" : "<p>black widow</p>",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/568"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/login/User-1/teams?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the teams of this user |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Subscribe to teams
A POST
to /users/login/{login}/teams
with teamNames in request parameters subscribes the user with the given login to these teams.
Path parameters
Parameter | Description |
---|---|
|
the login of the user |
HTTP request
POST /api/rest/latest/users/login/User-1/teams HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
teamNames=team-1%2C+team-2
Request parameters
Parameter | Description |
---|---|
|
the list of names of the teams |
Unsubscribe from teams
A DELETE
to /users/login/{loginId}/teams
with teamNames in request parameters unsubscribes the user with the given login from these teams.
Path parameters
Parameter | Description |
---|---|
|
the login of the user |
HTTP request
DELETE /api/rest/latest/users/login/User-1/teams HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
the list of names of the teams |
Welcome Message
This chapter focuses on service for the welcome message of Squash TM.
Get welcome message
A GET
to /welcome-message
returns the welcome message.
HTTP request
GET /api/rest/latest/welcome-message HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 68
{
"_type" : "welcome-message",
"message" : "<h1>Bienvenue<h1>"
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the welcome message of Squash TM |
Modify welcome message
A PATCH
to /welcome-message
modifies the welcome message.
HTTP request
PATCH /api/rest/latest/welcome-message HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 37
{
"message" : "<h1>Bienvenue<h1>"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the welcome message of Squash TM (mandatory) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 68
{
"_type" : "welcome-message",
"message" : "<h1>Bienvenue<h1>"
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the welcome message of Squash TM |