The Administration REST 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.

AI Servers

This chapter focuses on services for the AI servers.

get Get all AI servers

A GET to /ai-servers returns all the AI servers.

HTTP request

GET /api/rest/latest/ai-servers HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

type

which type of the element should be returned (optional)

Example response

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

{
  "_embedded" : {
    "ai-servers" : [ {
      "id" : 3,
      "name" : "first ai server",
      "url" : "https://openai.com/",
      "description" : "a description of the usage and destination of this server",
      "payload_template" : "{\"model\": \"gpt-4-1106-preview\", \"messages\": [{\"role\": \"user\", \"content\": \"You are a manual tester. You must transform a requirement into one or several test cases, written in English. The description of the test case must consist of a sum up of the given requirement. Your answer must have this format : \"{\"testCases\":[{\"name\":\"\",\"description\":\"\",\"prerequisites\":\"\",\"testSteps\":[{\"index\":0,\"action\":\"\",\"expectedResult\":\"\"}]}]\"{{ requirement }}\"}] ,\"temperature\": 0.9, \"top_p\": 0.9, \"n\": 1, \"stream\": false, \"max_tokens\": 2000, \"presence_penalty\": 0, \"frequency_penalty\": 0}",
      "json_path" : "choices[0].message.content",
      "authentication_policy" : "APP_LEVEL",
      "authentication_protocol" : "TOKEN_AUTH",
      "created_by" : "admin",
      "created_on" : "2020-04-06T10:00:00.000+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/ai-servers/3"
        }
      }
    }, {
      "id" : 12,
      "name" : "second ai server",
      "url" : "https://openai.com/",
      "description" : "another description so admin knows what he is doing",
      "payload_template" : "json you can get in the doc of your provider",
      "json_path" : "[42][1984]",
      "authentication_policy" : "APP_LEVEL",
      "authentication_protocol" : "TOKEN_AUTH",
      "created_by" : "admin",
      "created_on" : "2020-04-06T10:00:00.000+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/ai-servers/12"
        }
      }
    }, {
      "id" : 13,
      "name" : "third ai server",
      "url" : "https://otplol.com/",
      "description" : "I think it is clear now",
      "payload_template" : "json you can get in the doc of your provider",
      "json_path" : "can.also.look.like.this",
      "authentication_policy" : "APP_LEVEL",
      "authentication_protocol" : "TOKEN_AUTH",
      "created_by" : "admin",
      "created_on" : "2020-04-06T10:00:00.000+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/ai-servers/13"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/ai-servers?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 3,
    "totalPages" : 1,
    "number" : 0
  }
}

Response fields

Path Type Description

_embedded.ai-servers

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

get Get AI server

A GET to /ai-servers/{id} returns the AI server with the given id.

HTTP request

GET /api/rest/latest/ai-servers/3 HTTP/1.1
Accept: application/json
Host: localhost:8080

Path parameters

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

id

the id of the artificial intelligence server

Example response

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

{
  "id" : 3,
  "name" : "an ai server",
  "url" : "https://api.openai.com/v1/chat/completions",
  "description" : "This server should be used for generating test case, link it with projects 2, 4 and 12",
  "payload_template" : "{\"model\": \"gpt-4-1106-preview\", \"messages\": [{\"role\": \"user\", \"content\": \"You are a manual tester. You must transform a requirement into one or several test cases, written in English. The description of the test case must consist of a sum up of the given requirement. Your answer must have this format : \"{\"testCases\":[{\"name\":\"\",\"description\":\"\",\"prerequisites\":\"\",\"testSteps\":[{\"index\":0,\"action\":\"\",\"expectedResult\":\"\"}]}]\"{{ requirement }}\"}] ,\"temperature\": 0.9, \"top_p\": 0.9, \"n\": 1, \"stream\": false, \"max_tokens\": 2000, \"presence_penalty\": 0, \"frequency_penalty\": 0}",
  "json_path" : "choices[0].message.content",
  "authentication_policy" : "APP_LEVEL",
  "authentication_protocol" : "TOKEN_AUTH",
  "created_by" : "admin",
  "created_on" : "2020-04-06T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/ai-servers/3"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the artificial intelligence server

name

String

the name of the artificial intelligence server

url

String

the url of the remote artificial intelligence server

authentication_policy

String

the authentication policy of the artificial intelligence server (APP_LEVEL by default)

authentication_protocol

String

the authentication protocol of the artificial intelligence server (TOKEN_AUTH by default)

payload_template

String

a pre-formatted payload containing query parameters and a placeholder, designed for submission to an AI service for processing

description

String

a description of the server

json_path

String

a string expression used to navigate and extract specific nodes to access the generated answer in the response

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this artificial intelligence server

post Create AI server

A POST to /ai-servers creates a new AI server.

HTTP request

POST /api/rest/latest/ai-servers HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 874
Host: localhost:8080

{
  "name" : "New Ai Server",
  "url" : "https://openai.com/",
  "description" : "This server should be used for generating test case, link it with projects 1, 11 and 12",
  "payload_template" : "{\"model\": \"gpt-4-1106-preview\", \"messages\": [{\"role\": \"user\", \"content\": \"You are a manual tester. You must transform a requirement into one or several test cases, written in English. The description of the test case must consist of a sum up of the given requirement. Your answer must have this format : \"{\"testCases\":[{\"name\":\"\",\"description\":\"\",\"prerequisites\":\"\",\"testSteps\":[{\"index\":0,\"action\":\"\",\"expectedResult\":\"\"}]}]\"{{ requirement }}\"}] ,\"temperature\": 0.9, \"top_p\": 0.9, \"n\": 1, \"stream\": false, \"max_tokens\": 2000, \"presence_penalty\": 0, \"frequency_penalty\": 0}",
  "json_path" : "choices[0].message.content"
}

Request fields

Path Type Description

name

String

the name of the ai server

url

String

the url of the ai server

description

String

a description of the server

payload_template

String

a pre-formatted payload containing query parameters and a placeholder, designed for submission to an AI service for processing

json_path

String

a string expression used to navigate and extract specific nodes to access the generated answer in the response

Example response

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

{
  "id" : 6,
  "name" : "New Ai Server",
  "url" : "https://openai.com/",
  "description" : "This server should be used for generating test case, link it with projects 1, 11 and 12",
  "payload_template" : "{\"model\": \"gpt-4-1106-preview\", \"messages\": [{\"role\": \"user\", \"content\": \"You are a manual tester. You must transform a requirement into one or several test cases, written in English. The description of the test case must consist of a sum up of the given requirement. Your answer must have this format : \"{\"testCases\":[{\"name\":\"\",\"description\":\"\",\"prerequisites\":\"\",\"testSteps\":[{\"index\":0,\"action\":\"\",\"expectedResult\":\"\"}]}]\"{{ requirement }}\"}] ,\"temperature\": 0.9, \"top_p\": 0.9, \"n\": 1, \"stream\": false, \"max_tokens\": 2000, \"presence_penalty\": 0, \"frequency_penalty\": 0}",
  "json_path" : "choices[0].message.content",
  "authentication_policy" : "APP_LEVEL",
  "authentication_protocol" : "TOKEN_AUTH",
  "created_by" : "admin",
  "created_on" : "2020-04-06T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/ai-servers/6"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the artificial intelligence server

name

String

the name of the artificial intelligence server

url

String

the url of the remote artificial intelligence server

authentication_policy

String

the authentication policy of the artificial intelligence server APP_LEVEL by default

authentication_protocol

String

the authentication protocol of the artificial intelligence server TOKEN_AUTH by default

payload_template

String

a pre-formatted payload containing query parameters and a placeholder, designed for submission to an AI service for processing

description

String

a description of the server

json_path

String

a string expression used to navigate and extract specific nodes to access the generated answer in the response

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this ai server

patch Modify an AI server

A PATCH to /ai-servers/{id} modifies the AI server with the given id.

HTTP request

PATCH /api/rest/latest/ai-servers/4 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 874
Host: localhost:8080

{
  "name" : "New Ai Server",
  "url" : "https://openai.com/",
  "description" : "This server should be used for generating test case, link it with projects 1, 11 and 12",
  "payload_template" : "{\"model\": \"gpt-4-1106-preview\", \"messages\": [{\"role\": \"user\", \"content\": \"You are a manual tester. You must transform a requirement into one or several test cases, written in English. The description of the test case must consist of a sum up of the given requirement. Your answer must have this format : \"{\"testCases\":[{\"name\":\"\",\"description\":\"\",\"prerequisites\":\"\",\"testSteps\":[{\"index\":0,\"action\":\"\",\"expectedResult\":\"\"}]}]\"{{ requirement }}\"}] ,\"temperature\": 0.9, \"top_p\": 0.9, \"n\": 1, \"stream\": false, \"max_tokens\": 2000, \"presence_penalty\": 0, \"frequency_penalty\": 0}",
  "json_path" : "choices[0].message.content"
}

Path parameters

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

id

the id of the ai server

Request fields

Path Type Description

name

String

the name of the ai server

url

String

the url of the ai server

description

String

a description of the server

payload_template

String

a pre-formatted payload containing query parameters and a placeholder, designed for submission to an AI service for processing

json_path

String

a string expression used to navigate and extract specific nodes to access the generated answer in the response

Example response

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

{
  "id" : 4,
  "name" : "New Name for Ai Server",
  "url" : "https://NewAdress.net/",
  "description" : "This server should be used for generating test case, link it with projects 1, 11 and 12",
  "payload_template" : "{\"model\": \"gpt-4-1106-preview\", \"messages\": [{\"role\": \"user\", \"content\": \"You are a manual tester. You must transform a requirement into one or several test cases, written in English. The description of the test case must consist of a sum up of the given requirement. Your answer must have this format : \"{\"testCases\":[{\"name\":\"\",\"description\":\"\",\"prerequisites\":\"\",\"testSteps\":[{\"index\":0,\"action\":\"\",\"expectedResult\":\"\"}]}]\"{{ requirement }}\"}] ,\"temperature\": 0.9, \"top_p\": 0.9, \"n\": 1, \"stream\": false, \"max_tokens\": 2000, \"presence_penalty\": 0, \"frequency_penalty\": 0}",
  "json_path" : "choices[0].message.content",
  "authentication_policy" : "APP_LEVEL",
  "authentication_protocol" : "TOKEN_AUTH",
  "created_by" : "admin",
  "created_on" : "2020-04-06T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/ai-servers/4"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the artificial intelligence server

name

String

the name of the artificial intelligence server

url

String

the url of the remote artificial intelligence server

authentication_policy

String

the authentication policy of the artificial intelligence server (APP_LEVEL by default)

authentication_protocol

String

the authentication protocol of the artificial intelligence server (TOKEN_AUTH by default)

payload_template

String

a pre-formatted payload containing query parameters and a placeholder, designed for submission to an AI service for processing

description

String

a description of the server

json_path

String

a string expression used to navigate and extract specific nodes to access the generated answer in the response

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this ai server

delete Delete AI server

A DELETE to /ai-servers/{ids} deletes one or several AI server(s) with the given id(s).

HTTP request

DELETE /api/rest/latest/ai-servers/3 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Path parameters

Table 1. /api/rest/latest/ai-servers/{ids}
Parameter Description

ids

a list of ids of the ai servers to delete

Example response

HTTP/1.1 204 No Content

get Get AI server credentials

A GET to /ai-servers/{id}/credentials get the credentials of the AI server with the given id.

HTTP request

GET /api/rest/latest/ai-servers/1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Path parameters

Table 1. /api/rest/latest/ai-servers/{id}/credentials
Parameter Description

id

the id of the ai server

Example response

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

{
  "_type" : "token-auth-credentials",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/ai-servers/1/credentials"
    }
  }
}

Response fields

Path Type Description

_type

String

type of credentials, it can only be token-auth-credentials

_links

Object

related links

post Set AI server credentials

A POST to /ai-server/{id}/credentials set the credentials of the AI server with the given id.

HTTP request

POST /api/rest/latest/ai-servers/1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 76
Host: localhost:8080

{
  "_type" : "token-auth-credentials",
  "token" : "qEdK6ZEDfEV14BAPiFHE"
}

Path parameters

Table 1. /api/rest/latest/ai-servers/{id}/credentials
Parameter Description

id

the id of the ai server

Request fields

Path Type Description

_type

String

the type of the credentials: token-auth-credentials

token

String

the token to authenticate to this ai server

Example response

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

{
  "_type" : "token-auth-credentials",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/ai-servers/1/credentials"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the credentials: token-auth-credentials

_links

Object

related links

Test Automation Servers

This chapter focuses on test automation servers.

get Get all test automation servers

A GET to /test-automation-servers returns all the test automation servers that the user is allowed to read.

HTTP request

GET /api/rest/latest/test-automation-servers?size=2&page=1 HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

type

which type of the element should be returned (optional)

Example response

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

{
  "_embedded" : {
    "test-automation-servers" : [ {
      "_type" : "test-automation-server",
      "id" : 569,
      "name" : "TA server 1",
      "url" : "http://1234:4567/jenkins/",
      "kind" : "jenkins",
      "manual_agent_selection" : false,
      "description" : "<p>nice try</p>",
      "created_by" : "admin",
      "created_on" : "2017-06-15T10:00:00.000+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2017-06-15T10:00:00.000+00:00",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-automation-servers/569"
        }
      }
    }, {
      "_type" : "test-automation-server",
      "id" : 654,
      "name" : "TA server 2",
      "url" : "http://127.0.0.1:7774",
      "observer_url" : "http://127.0.0.1:7775",
      "event_bus_url" : "http://127.0.0.1:38368",
      "killswitch_url" : "http://127.0.0.1:7776",
      "kind" : "squashOrchestrator",
      "manual_agent_selection" : false,
      "description" : "<p>second shot</p>",
      "created_by" : "admin",
      "created_on" : "2017-06-15T10:00:00.000+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2017-06-15T10:00:00.000+00:00",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-automation-servers/654"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:8080/api/rest/latest/test-automation-servers?page=0&size=2"
    },
    "prev" : {
      "href" : "http://localhost:8080/api/rest/latest/test-automation-servers?page=0&size=2"
    },
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-automation-servers?page=1&size=2"
    },
    "last" : {
      "href" : "http://localhost:8080/api/rest/latest/test-automation-servers?page=1&size=2"
    }
  },
  "page" : {
    "size" : 2,
    "totalElements" : 4,
    "totalPages" : 2,
    "number" : 1
  }
}

Response fields

Path Type Description

_embedded.test-automation-servers

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

get Get test automation server

A GET to /test-automation-servers/{id} returns the test automation server with the given id.

Path parameters

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

id

the id of the test automation server

HTTP request

GET /api/rest/latest/test-automation-servers/569 HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_type" : "test-automation-server",
  "id" : 569,
  "name" : "TA server",
  "url" : "http://127.0.0.1:7774",
  "observer_url" : "http://127.0.0.1:7775",
  "event_bus_url" : "http://127.0.0.1:38368",
  "killswitch_url" : "http://127.0.0.1:7776",
  "kind" : "squashOrchestrator",
  "manual_agent_selection" : false,
  "description" : "<p>Orchestrator option</p>",
  "created_by" : "admin",
  "created_on" : "2017-06-15T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-06-15T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-automation-servers/569"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the test automation server

_type

String

the type of the entity

name

String

the name of the test automation server

url

String

for a Squash Orchestrator server, the URL of the receptionist endpoint ; for a Jenkins server, the URL where to reach the jenkins server

observer_url

String

the url for the observer endpoint, defaults is the receptionist url (for a Squash Orchestrator server only)

event_bus_url

String

the url for the event bus, defaults is the receptionist url (for a Squash Orchestrator server only)

killswitch_url

String

the url for the killswitch endpoint, defaults is the receptionist url (for a Squash Orchestrator server only)

kind

String

the kind of the test automation server, can be jenkins (default) or squashOrchestrator

manual_agent_selection

Boolean

whether the test automation server is manual agent or not

description

String

the description of the test automation server

created_by

String

the user who created the test automation server

created_on

String

the date the test automation server was created

last_modified_by

String

the user who last modified the test automation server

last_modified_on

String

the date the test automation server was last modified

_links

Object

related links

Relation Description

self

link to this test automation server

post Create test automation server

A POST to /test-automation-servers creates a new test automation server.

Create a Jenkins server

HTTP request
POST /api/rest/latest/test-automation-servers HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 170
Host: localhost:8080

{
  "name" : "TA server",
  "url" : "http://1234:4567/jenkins",
  "kind" : "jenkins",
  "manual_agent_selection" : true,
  "description" : "<p>TA server description/p>"
}
Request fields
Path Type Description

name

String

the name of the test automation server (mandatory)

url

String

the url of the test automation server (mandatory)

kind

String

the kind of the test automation server, defaults is 'jenkins'

manual_agent_selection

Boolean

whether the test automation server is manual agent or not

description

String

the description of the test automation server

Request parameters
Parameter Description

fields

which fields of the elements should be returned (optional)

Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 511

{
  "_type" : "test-automation-server",
  "id" : 569,
  "name" : "TA server",
  "url" : "http://1234:4567/jenkins",
  "kind" : "jenkins",
  "manual_agent_selection" : true,
  "description" : "<p>TA server description</p>",
  "created_by" : "admin",
  "created_on" : "2017-06-15T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-06-15T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-automation-servers/569"
    }
  }
}
Response fields
Path Type Description

_type

String

the type of the entity

id

Number

the id of the test automation server

name

String

the name of the test automation server

url

String

the url where to reach the test automation server

kind

String

the kind of the test automation server, should be 'jenkins' here

manual_agent_selection

Boolean

this field is not used for type squashOrchestrator

description

String

the description of the test automation server

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this test automation server

Create a Squash Orchestrator server

HTTP request
POST /api/rest/latest/test-automation-servers HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 321
Host: localhost:8080

{
  "name" : "Squash Orchestrator",
  "url" : "http://127.0.0.1:7774",
  "observer_url" : "http://127.0.0.1:7775",
  "event_bus_url" : "http://127.0.0.1:38368",
  "killswitch_url" : "http://127.0.0.1:7776",
  "kind" : "squashOrchestrator",
  "description" : "<p>Orchestrator for SquashTm automated test executions.</p>"
}
Request fields
Path Type Description

name

String

the name of the test automation server (mandatory)

url

String

the url for the receptionist endpoint (mandatory)

observer_url

String

the url for the observer endpoint, defaults is the receptionist url (for a Squash Orchestrator server only)

event_bus_url

String

the url for the event bus, defaults is the receptionist url (for a Squash Orchestrator server only)

killswitch_url

String

the url for the killswitch endpoint, defaults is the receptionist url (for a Squash Orchestrator server only)

kind

String

the kind of the test automation server, must be squashOrchestrator here

description

String

the description of the test automation server

Request parameters
Parameter Description

fields

which fields of the elements should be returned (optional)

Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 695

{
  "_type" : "test-automation-server",
  "id" : 14,
  "name" : "Squash Orchestrator",
  "url" : "http://127.0.0.1:7774",
  "observer_url" : "http://127.0.0.1:7775",
  "event_bus_url" : "http://127.0.0.1:38368",
  "killswitch_url" : "http://127.0.0.1:7776",
  "kind" : "squashOrchestrator",
  "manual_agent_selection" : false,
  "description" : "<p>Orchestrator for SquashTm automated test executions.</p>",
  "created_by" : "admin",
  "created_on" : "2017-06-15T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-06-15T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-automation-servers/14"
    }
  }
}
Response fields
Path Type Description

_type

String

the type of the entity

id

Number

the id of the test automation server

name

String

the name of the test automation server

url

String

the url for the receptionist endpoint

observer_url

String

the url for the observer endpoint

event_bus_url

String

the url for the event bus endpoint

killswitch_url

String

the url for the killswitch endpoint

kind

String

the kind of the test automation server, should be 'squashOrchestrator' here

manual_agent_selection

Boolean

this field is not used for type squashOrchestrator

description

String

the description of the test automation server

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this test automation server

patch Modify test automation server

A PATCH to /test-automation-servers/{id} modifies the test automation server with the given id.

Patch a Jenkins server

HTTP request
PATCH /api/rest/latest/test-automation-servers/569 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 154
Host: localhost:8080

{
  "name" : "Update TA server",
  "url" : "http://1234:4569/jenkins",
  "manual_agent_selection" : false,
  "description" : "<p>Update description</p>"
}
Path parameters
Table 1. /api/rest/latest/test-automation-servers/{id}
Parameter Description

id

the id of the test automation server

Request fields
Path Type Description

name

String

the name of the test automation server

url

String

the url of the test automation server

manual_agent_selection

Boolean

whether the test automation server is manual agent or not

description

String

the description of the test automation server

Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 516

{
  "_type" : "test-automation-server",
  "id" : 569,
  "name" : "Update TA server",
  "url" : "http://1234:4569/jenkins",
  "kind" : "jenkins",
  "manual_agent_selection" : false,
  "description" : "<p>Update description</p>",
  "created_by" : "admin",
  "created_on" : "2017-06-15T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-06-15T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-automation-servers/569"
    }
  }
}
Response fields
Path Type Description

_type

String

the type of the entity

id

Number

the id of the test automation server

name

String

the name of the test automation server

url

String

the url where to reach the test automation server

kind

String

the kind of the test automation server, should be 'jenkins' here

manual_agent_selection

Boolean

whether the test automation server is manual agent or not

description

String

the description of the test automation server

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this test automation server

Patch a Squash Orchestrator server

HTTP request
PATCH /api/rest/latest/test-automation-servers/569 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 301
Host: localhost:8080

{
  "name" : "Update TA server",
  "url" : "http://1234:4569/squashOrchestrator",
  "manual_agent_selection" : false,
  "observer_url" : "http://127.0.0.1:7775",
  "event_bus_url" : "http://127.0.0.1:38368",
  "killswitch_url" : "http://127.0.0.1:7776",
  "description" : "<p>Update description</p>"
}
Path parameters
Table 1. /api/rest/latest/test-automation-servers/{id}
Parameter Description

id

the id of the test automation server

Request fields
Path Type Description

name

String

the name of the test automation server

url

String

the url of the test automation server

observer_url

String

the url for the observer endpoint, defaults is the receptionist url (for a Squash Orchestrator server only)

event_bus_url

String

the url for the event bus, defaults is the receptionist url (for a Squash Orchestrator server only)

killswitch_url

String

the url for the killswitch endpoint, defaults is the receptionist url (for a Squash Orchestrator server only)

manual_agent_selection

Boolean

whether the test automation server is manual agent or not

description

String

the description of the test automation server

Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 674

{
  "_type" : "test-automation-server",
  "id" : 569,
  "name" : "Update TA server",
  "url" : "http://1234:4569/squashOrchestrator",
  "observer_url" : "http://127.0.0.1:7775",
  "event_bus_url" : "http://127.0.0.1:38368",
  "killswitch_url" : "http://127.0.0.1:7776",
  "kind" : "squashOrchestrator",
  "manual_agent_selection" : false,
  "description" : "<p>Update description</p>",
  "created_by" : "admin",
  "created_on" : "2017-06-15T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-06-15T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-automation-servers/569"
    }
  }
}
Response fields
Path Type Description

_type

String

the type of the entity

id

Number

the id of the test automation server

name

String

the name of the test automation server

url

String

the url where to reach the test automation server

observer_url

String

the url for the observer endpoint

event_bus_url

String

the url for the event bus endpoint

killswitch_url

String

the url for the killswitch endpoint

kind

String

the kind of the test automation server, should be 'squashOrchestrator' here

manual_agent_selection

Boolean

this field is not used for type squashOrchestrator

description

String

the description of the test automation server

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this test automation server

delete 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

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

ids

the list of ids of the test automation servers

HTTP request

DELETE /api/rest/latest/test-automation-servers/11,12 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Example response

HTTP/1.1 204 No Content

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

Path parameters

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

id

the id of the test automation server

Example response

HTTP/1.1 200 OK
Content-Type: application/json
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

_type

String

the type of the credentials

username

String

the username to authenticate to this test automation server

_links

Object

related links

post Set test automation server credentials

A POST to /test-automation-servers/{id}/credentials set credentials for the given test automation server.

Set basic authentication credentials

HTTP request
POST /api/rest/latest/test-automation-servers/1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 106
Host: localhost:8080

{
  "_type" : "basic-auth-credentials",
  "username" : "user@henix.fr",
  "password" : "qcrGmkQxI0J789F"
}
Path parameters
Table 1. /api/rest/latest/test-automation-servers/{id}/credentials
Parameter Description

id

the id of the test automation server

Request fields
Path Type Description

_type

String

the type of the credentials

username

String

the username to authenticate to this test automation server

password

String

the password to authenticate to this test automation server

Example response
HTTP/1.1 200 OK
Content-Type: application/json
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

_type

String

the type of the credentials

username

String

the username to authenticate to this test automation server

_links

Object

related links

Set token authentication credentials

HTTP request
POST /api/rest/latest/test-automation-servers/3/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 76
Host: localhost:8080

{
  "_type" : "token-auth-credentials",
  "token" : "qEdK6ZEDfEV14BAPiFHE"
}
Path parameters
Table 1. /api/rest/latest/test-automation-servers/{id}/credentials
Parameter Description

id

the id of the test automation server

Request fields
Path Type Description

_type

String

the type of the credentials

token

String

the token to authenticate to this test automation server

Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 174

{
  "_type" : "token-auth-credentials",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-automation-servers/3/credentials"
    }
  }
}
Response fields
Path Type Description

_type

String

the type of the credentials

_links

Object

related links

post Bind environment variables to test automation server

A POST to /test-automation-servers/{id}/environment-variables/{evIds} bind environment variables with the given ids for given test automation server.

HTTP request

POST /api/rest/latest/test-automation-servers/14/environment-variables/2,3 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Path parameters

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

id

the id of the test automation server

evIds

ids of the environment variables

Example response

HTTP/1.1 200 OK

delete Unbind environment variables to test automation server

A DELETE to /test-automation-servers/{id}/environment-variables/{evIds} unbind environment variables with the given ids for given test automation server.

HTTP request

DELETE /api/rest/latest/test-automation-servers/14/environment-variables/2,3 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Path parameters

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

id

the id of the test automation server

evIds

ids of the environment variables

Example response

HTTP/1.1 204 No Content

post Set a default value to an environment variable bind to a test automation server

A POST to /test-automation-servers/{id}/environment-variables/{evId}/value set a default value to given environment variable bind to a given test automation server.

HTTP request

POST /api/rest/latest/test-automation-servers/14/environment-variables/2/value HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 33
Host: localhost:8080

{
  "value" : "new-value-label"
}

Path parameters

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

id

the id of the test automation server

evId

id of the environment variable

Request fields

Path Type Description

value

String

new value to set

Example response

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

{
  "id" : 5,
  "environmentVariable" : {
    "id" : 2
  },
  "entityId" : 14,
  "entityType" : "TEST_AUTOMATION_SERVER",
  "value" : "new-value-label"
}

Example response

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

{
  "id" : 5,
  "environmentVariable" : {
    "id" : 2
  },
  "entityId" : 14,
  "entityType" : "TEST_AUTOMATION_SERVER",
  "value" : "new-value-label"
}

Banner Message

This chapter focuses on the message showing in a banner on top of all pages.

get Get banner message

A GET to /banner-message returns the banner message.

HTTP request

GET /api/rest/latest/banner-message HTTP/1.1
Accept: application/json
Host: localhost:8080

Example response

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

{
  "_type" : "banner-message",
  "message" : "<h1>Banner message<h1>"
}

Response fields

Path Type Description

_type

String

the type of the entity

message

String

the message to show on the banner

patch Modify banner message

A PATCH to /banner-message modifies the banner message.

HTTP request

PATCH /api/rest/latest/banner-message HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 42
Host: localhost:8080

{
  "message" : "<h1>Banner message<h1>"
}

Request fields

Path Type Description

message

String

the message to show on the banner. Set to empty string to hide the banner.

Example response

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

{
  "_type" : "banner-message",
  "message" : "<h1>Banner message<h1>"
}

Response fields

Path Type Description

_type

String

the type of the entity

message

String

the message to show on the banner. Set to empty string to hide the banner.

Bug Trackers

This chapter focuses on services for the bug trackers.

get 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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

type

which type of the element should be returned (optional)

Example response

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

{
  "_embedded" : {
    "bug-trackers" : [ {
      "_type" : "bug-tracker",
      "id" : 1,
      "name" : "bugtracker1",
      "url" : "https://xsquash.atlassian.net/",
      "kind" : "jira.xsquash",
      "description" : "a description of the usage and destination of this server",
      "created_by" : "admin",
      "created_on" : "2020-04-06T10:00:00.000+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
      "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",
      "description" : "a description of the usage and destination of this server",
      "created_by" : "admin",
      "created_on" : "2020-04-06T10:00:00.000+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
      "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

_embedded.bug-trackers

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

get 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

Table 1. /api/rest/latest/bug-trackers/{id}
Parameter Description

id

the id of the bug-tracker

Example response

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

{
  "_type" : "bug-tracker",
  "id" : 3,
  "name" : "bugtracker3",
  "url" : "url3",
  "kind" : "kind3",
  "description" : "a description of the server",
  "created_by" : "admin",
  "created_on" : "2020-04-06T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
  "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

id

Number

the id of the entity

_type

String

the type of the entity

name

String

name of the bug-tracker

url

String

url of the bugtracker

kind

String

kind of the bugtracker : mantis or jira

description

String

a description of the server

created_by

String

the user who created the info list

created_on

String

the creation date of the info list

last_modified_on

String

the last user who modified the info list

last_modified_by

String

the last modification date of the info list

iframe_friendly

Boolean

the bugtracker displays in iframe

authentication_policy

String

authentication Policy : USER or APP

authentication_protocol

String

Protocol of authentification: Basic Auth or Oauth 1

_links

Object

related links

Relation Description

self

link to this bugtracker

post Create bug tracker

A POST to /bug-trackers creates a new bug tracker.

HTTP request

POST /api/rest/latest/bug-trackers HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 289
Host: localhost:8080

{
  "_type" : "bug-tracker",
  "name" : "createdBugtracker",
  "url" : "https://squash.atlassian.net/",
  "kind" : "jira.xsquash",
  "description" : "a description of the server",
  "iframe_friendly" : false,
  "authentication_policy" : "USER",
  "authentication_protocol" : "BASIC_AUTH"
}

Request fields

Path Type Description

_type

String

the type of the entity

name

String

the name of bug tracker

url

String

the url of the bug tracker

kind

String

the kind of the bug tracker

description

String

a description of the server

iframe_friendly

Boolean

the description of the bug tracker

authentication_policy

String

the authentication Policy of the bug tracker : 'USER' or 'APP_LEVEL'

authentication_protocol

String

the authentication Protocol of the bug tracker: 'BASIC_AUTH' or 'OAUTH_A1'

Example response

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

{
  "_type" : "bug-tracker",
  "id" : 4,
  "name" : "createdBugtracker",
  "url" : "https://squash.atlassian.net/",
  "kind" : "jira.xsquash",
  "description" : "a description of the server",
  "created_by" : "admin",
  "created_on" : "2020-04-06T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
  "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

_type

String

the type of the entity

id

Number

the id of the bug tracker

name

String

the name of the bug tracker

url

String

the url of the bug tracker

kind

String

the kind of the bug tracker

description

String

a description of the server

iframe_friendly

Boolean

the description of the bug tracker

authentication_policy

String

the authentication Policy of the bug tracker: 'USER' or 'APP_LEVEL'

authentication_protocol

String

the authentication Protocol of the bug tracker: 'BASIC_AUTH' or 'OAUTH_A1'

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this bug tracker

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

{
  "_type" : "bug-tracker",
  "name" : "updatedBugtracker",
  "url" : "https://squash.atlassian.net/",
  "kind" : "jira.xsquash",
  "description" : "a description of the server",
  "iframe_friendly" : false,
  "authentication_policy" : "USER",
  "authentication_protocol" : "BASIC_AUTH"
}

Path parameters

Table 1. /api/rest/latest/bug-trackers/{id}
Parameter Description

id

the id of the bugtracker you want to update

Request fields

Path Type Description

_type

String

the type of the entity

name

String

the name of bug tracker

url

String

the url of the bug tracker

kind

String

the kind of the bug tracker

description

String

a description of the server

iframe_friendly

Boolean

the description of the bug tracker

authentication_policy

String

the authentication Policy of the bug tracker: 'USER' or 'APP_LEVEL'

authentication_protocol

String

the authentication Protocol of the bug tracker: 'BASIC_AUTH' or 'OAUTH_A1'

Example response

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

{
  "_type" : "bug-tracker",
  "id" : 4,
  "name" : "updatedBugtracker",
  "url" : "https://squash.atlassian.net/",
  "kind" : "jira.xsquash",
  "description" : "a description of the server",
  "created_by" : "admin",
  "created_on" : "2020-04-06T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
  "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

_type

String

the type of the entity

id

Number

the id of the bugtracker

name

String

the name of the bugtracker

url

String

the url of the bugtracker

kind

String

the kind of the bugtracker

description

String

a description of the server

iframe_friendly

Boolean

the description of the bugtracker

authentication_policy

String

the authentication Policy of the bugtracker: 'USER' or 'APP_LEVEL'

authentication_protocol

String

the authentication Protocol of the bugtracker: 'BASIC_AUTH' or 'OAUTH_A1'

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this bug tracker

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

Path parameters

Table 1. /api/rest/latest/bug-trackers/{ids}
Parameter Description

ids

a list id of the bugtracker

get 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
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
Table 1. /api/rest/latest/bug-trackers/{id}/credentials
Parameter Description

id

the id of the bug-tracker

Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 195

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

String

type of credentials, it can be basic-auth-credentials, oauth-1a-credentials or token-auth-credentials

username

String

the username to authenticate to this bug tracker

_links

Object

related links

In case of oauth-1a credentials

HTTP request
GET /api/rest/latest/bug-trackers/1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
Table 1. /api/rest/latest/bug-trackers/{id}/credentials
Parameter Description

id

the id of the bug-tracker

Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 192

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

String

type of credentials, it can be basic-auth-credentials, oauth-1a-credentials or token-auth-credentials

token

String

the user token to authenticate to this bug tracker

_links

Object

related links

In case of token auth credentials

HTTP request
GET /api/rest/latest/bug-trackers/1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
Table 1. /api/rest/latest/bug-trackers/{id}/credentials
Parameter Description

id

the id of the bug-tracker

Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 163

{
  "_type" : "token-auth-credentials",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/bug-trackers/1/credentials"
    }
  }
}
Response fields
Path Type Description

_type

String

type of credentials, it can be basic-auth-credentials, oauth-1a-credentials or token-auth-credentials

_links

Object

related links

post Set bug tracker credentials

A POST to /bug-trackers/{id}/credentials set the credentials of the bug tracker with the given id.

Set basic authentication credentials

HTTP request
POST /api/rest/latest/bug-trackers/1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 106
Host: localhost:8080

{
  "_type" : "basic-auth-credentials",
  "username" : "user@henix.fr",
  "password" : "qcrGmkQxI0J789F"
}
Path parameters
Table 1. /api/rest/latest/bug-trackers/{id}/credentials
Parameter Description

id

the id of the bug tracker

Request fields
Path Type Description

_type

String

the type of the credentials: basic-auth-credentials, oauth-1a-credentials or token-auth-credentials

username

String

the username to authenticate to this bug tracker

password

String

the password to authenticate to this bug tracker

Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 195

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

String

the type of the credentials: basic-auth-credentials, oauth-1a-credentials or token-auth-credentials

username

String

the username to authenticate to this bug tracker

_links

Object

related links

Set oauth-1a authentication credentials

HTTP request
POST /api/rest/latest/bug-trackers/1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 107
Host: localhost:8080

{
  "_type" : "oauth-1a-credentials",
  "token" : "A9b7DD2e4f5g3Hi",
  "token_secret" : "qcrGmkQxI0J789F"
}
Path parameters
Table 1. /api/rest/latest/bug-trackers/{id}/credentials
Parameter Description

id

the id of the bug tracker

Request fields
Path Type Description

_type

String

the type of the credentials: basic-auth-credentials, oauth-1a-credentials or token-auth-credentials

token

String

the user token to authenticate to this bug tracker

token_secret

String

the user token secret to authenticate to this bug tracker

Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 192

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

String

the type of the credentials: basic-auth-credentials, oauth-1a-credentials or token-auth-credentials

token

String

the user token to authenticate to this bug tracker

_links

Object

related links

Set token authentication credentials

HTTP request
POST /api/rest/latest/bug-trackers/1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 76
Host: localhost:8080

{
  "_type" : "token-auth-credentials",
  "token" : "qEdK6ZEDfEV14BAPiFHE"
}
Path parameters
Table 1. /api/rest/latest/bug-trackers/{id}/credentials
Parameter Description

id

the id of the bug tracker

Request fields
Path Type Description

_type

String

the type of the credentials: basic-auth-credentials, oauth-1a-credentials or token-auth-credentials

token

String

the token to authenticate to this bug tracker

Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 163

{
  "_type" : "token-auth-credentials",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/bug-trackers/1/credentials"
    }
  }
}
Response fields
Path Type Description

_type

String

the type of the credentials: basic-auth-credentials, oauth-1a-credentials or token-auth-credentials

_links

Object

related links

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

Path parameters

Table 1. /api/rest/latest/bug-trackers/{id}/auth-configuration
Parameter Description

id

the id of the bug-tracker

Example response

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

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

_type

String

the type of configuration

consumer_key

String

consumer key

request_token_http_method

String

request token Http method

request_token_url

String

request token Url

access_token_http_method

String

access token Http method

access_token_url

String

access token Url

user_authorization_url

String

user authorization Url

client_secret

String

client secret

signature_method

String

signature method

_links

Object

related links

post 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
Content-Type: application/json
Accept: 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

Table 1. /api/rest/latest/bug-trackers/{id}/auth-configuration
Parameter Description

id

the id of the bug tracker

Example response

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

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

_type

String

the type of configuration

consumer_key

String

consumer key

request_token_http_method

String

request token Http method

request_token_url

String

request token Url

access_token_http_method

String

access token Http method

access_token_url

String

access token Url

user_authorization_url

String

user authorization Url

client_secret

String

client secret

signature_method

String

signature method

_links

Object

related links

System Configuration

This chapter focuses on the system configuration of of Squash TM.

get Get upload extention whitelist

A GET to /configuration/upload-extention-whitelist returns the upload extention whitelist.

HTTP request

GET /api/rest/latest/configuration/upload-extention-whitelist HTTP/1.1
Accept: application/json
Host: localhost:8080

Example response

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

{
  "_type" : "upload-extention-whitelist",
  "whitelist" : "txt, doc, xls, ppt, docx, xlsx, pptx, odt, ods, odp, pdf"
}

Response fields

Path Type Description

_type

String

the type of the entity

whitelist

String

upload extention whitelist of Squash TM

post Set upload extention whitelist

A POST to /configuration/upload-extention-whitelist set the upload extention whitelist.

HTTP request

POST /api/rest/latest/configuration/upload-extention-whitelist HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 120
Host: localhost:8080

{
  "_type" : "upload-extention-whitelist",
  "whitelist" : "txt, doc, xls, ppt, docx, xlsx, pptx, odt, ods, odp, pdf"
}

Request fields

Path Type Description

_type

String

the type of the entity

whitelist

String

the welcome message of Squash TM

Example response

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

{
  "_type" : "upload-extention-whitelist",
  "whitelist" : "txt, doc, xls, ppt, docx, xlsx, pptx, odt, ods, odp, pdf"
}

Response fields

Path Type Description

_type

String

the type of the entity

whitelist

String

the welcome message of Squash TM

get Get upload size limit

A GET to /configuration/upload-size-limit returns the upload size limit.

HTTP request

GET /api/rest/latest/configuration/upload-size-limit HTTP/1.1
Accept: application/json
Host: localhost:8080

Example response

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

{
  "_type" : "upload-size-limit",
  "size" : "5000"
}

Response fields

Path Type Description

_type

String

the type of the entity

size

String

upload size limit of Squash TM

post Set upload size limit

A POST to /configuration/upload-size-limit set the upload size limit.

HTTP request

POST /api/rest/latest/configuration/upload-size-limit HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 56
Host: localhost:8080

{
  "_type" : "upload-size-limit",
  "size" : "400000"
}

Request fields

Path Type Description

_type

String

the type of the entity

size

String

the upload size limit of Squash TM

Example response

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

{
  "_type" : "upload-size-limit",
  "size" : "400000"
}

Response fields

Path Type Description

_type

String

the type of the entity

size

String

the upload size limit of Squash TM

get Get import size limit

A GET to /configuration/import-size-limit returns the import size limit.

HTTP request

GET /api/rest/latest/configuration/import-size-limit HTTP/1.1
Accept: application/json
Host: localhost:8080

Example response

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

{
  "_type" : "import-size-limit",
  "size" : "5000"
}

Response fields

Path Type Description

_type

String

the type of the entity

size

String

Import size limit of Squash TM

post Set import size limit

A POST to /configuration/import-size-limit set the import size limit.

HTTP request

POST /api/rest/latest/configuration/import-size-limit HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 56
Host: localhost:8080

{
  "_type" : "import-size-limit",
  "size" : "400000"
}

Request fields

Path Type Description

_type

String

the type of the entity

size

String

the import size limit of Squash TM

Example response

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

{
  "_type" : "import-size-limit",
  "size" : "400000"
}

Response fields

Path Type Description

_type

String

the type of the entity

size

String

the import size limit of Squash TM

get Get squash callback url

A GET to /configuration/squash-callback-url returns the squash callback url.

HTTP request

GET /api/rest/latest/configuration/squash-callback-url HTTP/1.1
Accept: application/json
Host: localhost:8080

Example response

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

{
  "_type" : "squash-callback-url",
  "url" : "http://callback.fr"
}

Response fields

Path Type Description

_type

String

the type of the entity

url

String

callback url of Squash TM

post Set squash callback url

A POST to /configuration/squash-callback-url set the squash callback url.

HTTP request

POST /api/rest/latest/configuration/squash-callback-url HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 69
Host: localhost:8080

{
  "_type" : "squash-callback-url",
  "url" : "http://callback.fr"
}

Request fields

Path Type Description

_type

String

the type of the entity

url

String

the callback url of Squash TM

Example response

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

{
  "_type" : "squash-callback-url",
  "url" : "http://callback.fr"
}

Response fields

Path Type Description

_type

String

the type of the entity

url

String

the callback url of Squash TM

post Enable/disable case insensitive login

A POST to /configuration/case-insensitive-login?enabled=true enable case insensitive login.

HTTP request

POST /api/rest/latest/configuration/case-insensitive-login?enabled=true HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

enabled

takes the values true/false to activate/deactivate login case insensitivity.

Example response

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

"case insentive login: true"

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.

get Get all custom fields

A GET to /custom-fields returns all the custom fields.

HTTP request

GET /api/rest/latest/custom-fields?page=0&size=20 HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

type

which type of the element should be returned (optional)

Example response

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

{
  "_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" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/custom-fields?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

Response fields

Path Type Description

_embedded.custom-fields

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

get Get custom field

A GET to /custom-fields/{id} returns the custom field with the given ID.

Path parameters

Table 1. /api/rest/latest/custom-fields/{id}
Parameter Description

id

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

fields

which fields of the elements should be returned (optional)

Example response

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

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

id

Number

the id of the entity

_type

String

the type of the entity

name

String

name of the custom-field

code

String

code of the custom-field

label

String

label of the custom-field

input_type

String

the type of custom-field

default_value

String

default value of the custom-field

optional

Boolean

if the custom-field is optionnal or not

options

Array

all the options of the custom-field

_links

Object

related links

Relation Description

self

link to this custom-field

post Create custom field

A POST to /custom-fields creates a new custom field.

HTTP request

POST /api/rest/latest/custom-fields HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 209
Host: localhost:8080

{
  "_type" : "custom-field",
  "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

_type

String

the type of the entity

input_type

String

the type of the custom field: DROPDOWN_LIST,PLAIN_TEXT

label

String

the label of the custom field

code

String

the code of the custom field

name

String

the name of the custom field

default_value

String

the default value of the custom field

optional

Boolean

if the custom field is optional or not

options

Array

an array of custom fields

Example response

HTTP/1.1 201 Created
Content-Type: application/json
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

_type

String

the type of the entity

id

Number

id of the entity

input_type

String

the type of the custom field: DROPDOWN_LIST,PLAIN_TEXT

label

String

the label of the custom field

code

String

the code of the custom field

name

String

the name of the custom field

default_value

String

the default value of the custom field

optional

Boolean

if the custom field is optional or not

options

Array

an array of custom fields

_links

Object

related links

Relation Description

self

link to this custom-fields

patch 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
Content-Type: application/json
Accept: application/json
Content-Length: 215
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

Table 1. /api/rest/latest/custom-fields/{id}
Parameter Description

id

the id of the custom field

Request fields

Path Type Description

_type

String

the type of the entity

input_type

String

the type of the custom field: DROPDOWN_LIST,PLAIN_TEXT

label

String

the label of the custom field

code

String

the code of the custom field

name

String

the name of the custom field

default_value

String

the default value of the custom field

optional

Boolean

if the custom field is optional or not

options

Array

an array of custom fields

Example response

HTTP/1.1 200 OK
Content-Type: application/json
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

_type

String

the type of the entity

id

Number

id of the entity

input_type

String

the type of the custom field: DROPDOWN_LIST,PLAIN_TEXT

label

String

the label of the custom field

code

String

the code of the custom field

name

String

the name of the custom field

default_value

String

the default value of the custom field

optional

Boolean

if the custom field is optional or not

options

Array

an array of custom fields

_links

Object

related links

Relation Description

self

link to this custom-fields

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

Path parameters

Table 1. /api/rest/latest/custom-fields/{ids}
Parameter Description

ids

a list id of the custom-fields to delete

Example response

HTTP/1.1 204 No Content
Warning Features about custom field options must be modified.

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

{
  "label" : "opt1",
  "code" : "code opt 1",
  "colour" : "#ff8000"
}

Path parameters

Table 1. /api/rest/latest/custom-fields/{id}/options
Parameter Description

id

the id of the custom-field

Request fields

Path Type Description

label

String

the label of the custom field option

code

String

the code of the custom field option

colour

String

the colour of the custom field option

Example response

HTTP/1.1 201 Created
Content-Type: application/json
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

_type

String

the type of the entity

id

Number

the id of the custom-field

input_type

String

the input type of the custom-field

name

String

the name of the custom-field

code

String

the code of the custom-field

label

String

the label of the custom-field

default_value

String

the code of the custom-field

optional

Boolean

whe custom-field

options

Array

the custom-field’s options

_links

Object

related links

Relation Description

self

link to this custom-field

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

Path parameters

Table 1. /api/rest/latest/custom-fields/{id}/options/{optionLabel}/label/{newValue}
Parameter Description

id

the id of the custom-fields

optionLabel

the label of the option to update

newValue

the new label of the custom-fields

Example response

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

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

_type

String

the type of the entity

id

Number

id of the entity

input_type

String

the type of the custom field: DROPDOWN_LIST,PLAIN_TEXT

label

String

the label of the custom field

code

String

the code of the custom field

name

String

the name of the custom field

default_value

String

the default value of the custom field

optional

Boolean

if the custom field is optional or not

options

Array

an array of custom fields

_links

Object

related links

Relation Description

self

link to this custom-fields

Environment Variables

This chapter focuses on environment variables.

get Get all environment variables

A GET to /environment-variables returns all environment variables.

HTTP request

GET /api/rest/latest/environment-variables?page=0&size=20 HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

type

which type of the element should be returned (optional)

Example response

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

{
  "_embedded" : {
    "environment-variables" : [ {
      "_type" : "environment-variable",
      "id" : 1,
      "name" : "Vivaldi",
      "options" : [ ],
      "input_type" : "PLAIN_TEXT",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/environment-variables/1"
        }
      }
    }, {
      "_type" : "environment-variable",
      "id" : 2,
      "name" : "Brave",
      "options" : [ ],
      "input_type" : "PLAIN_TEXT",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/environment-variables/2"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/environment-variables?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

Response fields

Path Type Description

_embedded.environment-variables

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

get Get environment variable

A GET to /environment-variables/{id} returns the environment variable with the given ID.

Path parameters

Table 1. /api/rest/latest/environment-variables/{id}
Parameter Description

id

the id of the environment-variable

HTTP request

GET /api/rest/latest/environment-variables/3 HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_type" : "environment-variable",
  "id" : 3,
  "name" : "Edge",
  "options" : [ ],
  "input_type" : "PLAIN_TEXT",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/environment-variables/3"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the entity

_type

String

the type of the entity

name

String

name of the environment-variable

input_type

String

the type of environment-variable

options

Array

all the options of the environment-variable

_links

Object

related links

Relation Description

self

link to this environment-variable

post Create environment variable

A POST to /environment-variables creates a new environment variable.

HTTP request

POST /api/rest/latest/environment-variables HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 221
Host: localhost:8080

{
  "_type" : "environment_variable",
  "name" : "create_ev_browser",
  "input_type" : "DROPDOWN_LIST",
  "options" : [ {
    "label" : "Chrome",
    "position" : 0
  }, {
    "label" : "Opera",
    "position" : 1
  } ]
}

Request fields

Path Type Description

_type

String

the type of the entity

input_type

String

the type of the environment variable: DROPDOWN_LIST, PLAIN_TEXT, INTERPRETED_TEXT

name

String

the name of the environment variable

options

Array

an array of environment variable options (for DROPDOWN_LIST)

Example response

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

{
  "_type" : "environment-variable",
  "id" : 4,
  "name" : "create_ev_browser",
  "options" : [ {
    "label" : "Chrome",
    "position" : 0
  }, {
    "label" : "Opera",
    "position" : 1
  } ],
  "input_type" : "DROPDOWN_LIST",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/environment-variables/4"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

id

Number

id of the entity

input_type

String

the type of the environment variable: DROPDOWN_LIST, PLAIN_TEXT, INTERPRETED_TEXT

name

String

the name of the environment variable

options

Array

the array of environment variable options (for DROPDOWN_LIST)

_links

Object

related links

Relation Description

self

link to this environment-variable

delete Delete environment variable

A DELETE to /environment-variables/{ids} deletes the environment variable(s) with the given id(s).

HTTP request

DELETE /api/rest/latest/environment-variables/2,3 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Path parameters

Table 1. /api/rest/latest/environment-variables/{ids}
Parameter Description

ids

a list id of the environment-variables to delete

Example response

HTTP/1.1 204 No Content

patch Modify environment variable name

A PATCH to /environment-variables/{id} modifies the name of the environment variable with the given id.

HTTP request

PATCH /api/rest/latest/environment-variables/5 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 32
Host: localhost:8080

{
  "name" : "updated_browser"
}

Path parameters

Table 1. /api/rest/latest/environment-variables/{id}
Parameter Description

id

the id of the environment variable

Request fields

Path Type Description

name

String

the updated name of the environment variable

Example response

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

{
  "_type" : "environment-variable",
  "id" : 5,
  "name" : "updated_browser",
  "options" : [ {
    "label" : "Firefox",
    "position" : 0
  } ],
  "input_type" : "DROPDOWN_LIST",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/environment-variables/5"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

id

Number

id of the entity

input_type

String

the type of the environment variable: DROPDOWN_LIST, PLAIN_TEXT, INTERPRETED_TEXT

name

String

the name of the environment variable

options

Array

an array of environment variable options

_links

Object

related links

Relation Description

self

link to this environment-variables

post Create environment variable option

A POST to /environment-variables/{id}/options adds option to the environment variable with the given id .

HTTP request

POST /api/rest/latest/environment-variables/7/options HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 23
Host: localhost:8080

{
  "label" : "Opera"
}

Path parameters

Table 1. /api/rest/latest/environment-variables/{id}/options
Parameter Description

id

the id of the environment-variable

Request fields

Path Type Description

label

String

the label of the environment variable option

Example response

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

{
  "_type" : "environment-variable",
  "id" : 7,
  "name" : "browser",
  "options" : [ {
    "label" : "Chrome",
    "position" : 1
  }, {
    "label" : "Safari",
    "position" : 2
  }, {
    "label" : "Opera",
    "position" : 3
  } ],
  "input_type" : "DROPDOWN_LIST",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/environment-variables/7"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

id

Number

the id of the environment variable

input_type

String

the input type of the environment variable

name

String

the name of the environment variable

options

Array

the environment variable’s options

_links

Object

related links

Relation Description

self

link to this environment variable

patch Modify environment variable option

A PATCH to /environment-variables/{id}/options/{optionLabel} modifies the option with given original label.

HTTP request

PATCH /api/rest/latest/environment-variables/6/options/Firefox HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 44
Host: localhost:8080

{
  "label" : "Safari",
  "position" : "0"
}

Path parameters

Table 1. /api/rest/latest/environment-variables/{id}/options/{optionLabel}
Parameter Description

id

the id of the environment variable to update

optionLabel

the label of the environment variable option to update

Example response

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

{
  "_type" : "environment-variable",
  "id" : 6,
  "name" : "evBrowser",
  "options" : [ {
    "label" : "Safari",
    "position" : 0
  } ],
  "input_type" : "DROPDOWN_LIST",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/environment-variables/6"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

id

Number

id of the entity

input_type

String

the type of the environment variable: DROPDOWN_LIST, PLAIN_TEXT, INTERPRETED_TEXT

name

String

the name of the environment variable

options

Array

an array of environment variable options

_links

Object

related links

options[].label

String

the name of the option

options[].position

Number

the position of the option in the dropdown list of the environment variable

Relation Description

self

link to this environment variable

HTTP request

DELETE /api/rest/latest/environment-variables/2,3 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Path parameters

Table 1. /api/rest/latest/environment-variables/{ids}
Parameter Description

ids

a list id of the environment-variables to delete

Example response

HTTP/1.1 204 No Content

delete Delete environment variable option

A DELETE to /environment-variables/{id}/options/{optionsLabel} deletes the environment variable option(s) with the given id and the given options label.

HTTP request

DELETE /api/rest/latest/environment-variables/2/options/opt2 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Path parameters

Table 1. /api/rest/latest/environment-variables/{id}/options/{optionsLabel}
Parameter Description

id

id of the entity

optionsLabel

a list of the environment variable options to delete

Example response

HTTP/1.1 204 No Content

Info Lists

This chapter focuses on info lists.

get 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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

type

which type of the element should be returned (optional)

Example response

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

{
  "_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+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
      "_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+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
      "_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

_embedded.info-lists

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

get 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

Table 1. /api/rest/latest/info-lists/{id}
Parameter Description

id

the id of the info list

Example response

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

{
  "_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+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/info-lists/3"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the entity

_type

String

the type of the entity

label

String

the label of the info list

description

String

the description of the info list

code

String

the code of the info list

items

Array

the items of the info list

created_by

String

the user who created the info list

created_on

String

the creation date of the info list

last_modified_on

String

the last user who modified the info list

last_modified_by

String

the last modification date of the info list

_links

Object

related links

Relation Description

self

link to this info list

post Create info list

A POST to /info-lists creates a new info list.

HTTP request

POST /api/rest/latest/info-lists HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 282
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

_type

String

the type of the entity

label

String

the label of the info list

code

String

the status of the info list

description

String

the description of the info list

items

Array

the info list’s items

Example response

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

{
  "_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+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/info-lists/4"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

id

Number

the id of the info list

label

String

the label of the info list

code

String

the status of the info list

description

String

the description of the info list

items

Array

an array of info list items

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

_links

Object

related links

Relation Description

self

link to this info list

patch 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
Content-Type: application/json
Accept: application/json
Content-Length: 280
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

Table 1. /api/rest/latest/info-lists/{id}
Parameter Description

id

the id of the info list

Request fields

Path Type Description

_type

String

the type of the entity

label

String

the label of the info list

code

String

the status of the info list

description

String

the description of the info list

items

Array

an array of info list items

Example response

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

{
  "_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+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/info-lists/4"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

id

Number

the id of the info list

label

String

the label of the info list

code

String

the status of the info list

description

String

the description of the info list

items

Array

an array of info list items

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this info list

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

Path parameters

Table 1. /api/rest/latest/info-lists/{ids}
Parameter Description

ids

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

Table 1. /api/rest/latest/info-list-items/{id}
Parameter Description

id

the id of the info list item

Example response

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

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

_type

String

the type of the entity

id

Number

the id of the entity

label

String

the label of the info list item

code

String

the code of the info list item

icon_name

String

the name of the icon of the info list item

colour

String

the colour of the info list item (hexadecimal)

default

Boolean

boolean which indicates if the info list item is the default one

info_list

Object

the info list this item is part of

_links

Object

related links

Relation Description

self

link to this info list item

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

{
  "_type" : "info-list-item",
  "label" : "item4",
  "code" : "codeItem4",
  "icon_name" : "cross",
  "colour" : "#ff0000"
}

Path parameters

Table 1. /api/rest/latest/info-lists/{id}/items
Parameter Description

id

the id of the info list

Request fields

Path Type Description

_type

String

the type of the entity

label

String

the label of the info list item

code

String

the code of the info list item

icon_name

String

the name of the icon of the info list item

colour

String

the colour of the info list item (hexadecimal)

Example response

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

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

_type

String

the type of the entity

id

Number

the id of the info list item

label

String

the label of the info list item

code

String

the code of the info list item

icon_name

String

the name of the icon of the info list item

colour

String

the colour of the info list item (hexadecimal)

default

Boolean

boolean which indicates if the info list item is the default one

info_list

Object

the info list this item is part of

_links

Object

related links

Relation Description

self

link to this info list item

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

{
  "_type" : "info-list-item",
  "label" : "item4",
  "code" : "codeItem4",
  "icon_name" : "cross",
  "colour" : "#0000ff",
  "default" : true
}

Path parameters

Table 1. /api/rest/latest/info-list-items/{id}
Parameter Description

id

the id of the info list item

Request fields

Path Type Description

_type

String

the type of the entity

label

String

the label of the info list item

code

String

the code of the info list item

icon_name

String

the name of the icon of the info list item

colour

String

the colour of the info list item (hexadecimal)

default

Boolean

boolean which indicates if the info list item is the default one

Example response

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

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

_type

String

the type of the entity

id

Number

the id of the info list item

label

String

the label of the info list item

code

String

the code of the info list item

icon_name

String

the name of the icon of the info list item

colour

String

the colour of the info list item (hexadecimal)

default

Boolean

boolean which indicates if the info list item is the default one

info_list

Object

the info list this item is part of

_links

Object

related links

Relation Description

self

link to this info list item

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

Path parameters

Table 1. /api/rest/latest/info-list-items/{id}
Parameter Description

id

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

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_type" : "license-info",
  "max_users" : 15,
  "expiration_date" : "2022-10-12T08:00:00.000+00:00",
  "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

_type

String

the type of the entity

max_users

Number

max users number allowed by the license

expiration_date

String

expiration date of the license

license_plugins

Array

all the license plugins

license_plugins[]._type

String

the type of the license plugins

license_plugins[].key

String

key of the license plugin

license_plugins[].available

Boolean

availability of the plugin by the license

valid_license

Boolean

indicates if the license is valid : expiration date + a tolerance period

_links

Object

related links

Relation Description

self

link to the license information

Login Message

This chapter focuses on the message showing in Squash TM Login Page.

get 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-Type: application/json
Content-Length: 70

{
  "_type" : "login-message",
  "message" : "<h1>login Message<h1>"
}

Response fields

Path Type Description

_type

String

the type of the entity

message

String

the message to show on the login page of Squash TM

patch Modify login message

A PATCH to /login-message modifies the login message.

HTTP request

PATCH /api/rest/latest/login-message HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 41
Host: localhost:8080

{
  "message" : "<h1>login Message<h1>"
}

Request fields

Path Type Description

message

String

the message to show on the login page of Squash TM (mandatory)

Example response

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

{
  "_type" : "login-message",
  "message" : "<h1>login Message<h1>"
}

Response fields

Path Type Description

_type

String

the type of the entity

message

String

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 …​

post 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

Request parameters

Parameter Description

enabled

takes the values true/false to activate/deactivate the milestone mode.

Example response

HTTP/1.1 204 No Content

get 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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

type

which type of the element should be returned (optional)

Example response

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

{
  "_embedded" : {
    "milestones" : [ {
      "_type" : "milestone",
      "id" : 11,
      "label" : "Milestone 1",
      "status" : "PLANNED",
      "end_date" : "2020-03-19T00:23:45.000+00:00",
      "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+00:00",
      "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

_embedded.milestones

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

get Get milestone

A GET to /milestones/{id} returns the milestone with the given id.

Path parameters

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

id

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-Type: application/json
Content-Length: 486

{
  "_type" : "milestone",
  "id" : 11,
  "label" : "Milestone 1",
  "status" : "PLANNED",
  "end_date" : "2020-03-19T00:23:45.000+00:00",
  "range" : "GLOBAL",
  "description" : "example of milestone creation",
  "created_by" : "admin",
  "created_on" : "2020-04-06T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/milestones/11"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

id

Number

the id of the milestone

label

String

the label of the milestone

description

String

the description of the milestone

status

String

the status of the milestone

end_date

String

due date of the milestone

range

String

range of the milestone

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this milestone

post Create milestone

A POST to /milestones creates a new milestone.

HTTP request

POST /api/rest/latest/milestones HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 177
Host: localhost:8080

{
  "_type" : "milestone",
  "label" : "Milestone 1",
  "description" : "example of milestone creation",
  "end_date" : "2020-03-19T22:00:00.000+00:00",
  "status" : "PLANNED"
}

Request fields

Path Type Description

_type

String

the type of the entity (mandatory)

label

String

the label of the milestone (mandatory)

description

String

the description of the milestone

status

String

the status of the milestone.

end_date

String

due date of the milestone (mandatory)

Example response

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

{
  "_type" : "milestone",
  "id" : 11,
  "label" : "Milestone 1",
  "status" : "PLANNED",
  "end_date" : "2020-03-19T00:23:45.000+00:00",
  "range" : "GLOBAL",
  "description" : "example of milestone creation",
  "created_by" : "admin",
  "created_on" : "2020-04-06T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/milestones/11"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

id

Number

the id of the milestone

label

String

the label of the milestone

description

String

the description of the milestone

status

String

the status of the milestone

end_date

String

due date of the milestone

range

String

range of the milestone

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this milestone

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

{
  "_type" : "milestone",
  "label" : "Milestone 1",
  "description" : "example of milestone updating",
  "end_date" : "2020-03-19T22:00:00.000+00:00",
  "status" : "PLANNED",
  "range" : "RESTRICTED"
}

Path parameters

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

id

the id of the milestone

Request fields

Path Type Description

_type

String

the type of the entity (mandatory)

label

String

the label of the milestone

description

String

the description of the milestone

status

String

the status of the milestone.

end_date

String

due date of the milestone

range

String

range of the milestone

Example response

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

{
  "_type" : "milestone",
  "id" : 11,
  "label" : "Milestone 1",
  "status" : "PLANNED",
  "end_date" : "2020-03-19T00:23:45.000+00:00",
  "range" : "RESTRICTED",
  "description" : "example of milestone updating",
  "created_by" : "admin",
  "created_on" : "2020-04-06T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/milestones/11"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

id

Number

the id of the milestone

label

String

the label of the milestone

description

String

the description of the milestone

status

String

the status of the milestone

end_date

String

due date of the milestone

range

String

range of the milestone

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this milestone

delete Delete milestone

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

Path parameters

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

ids

the list of ids of the milestones

HTTP request

DELETE /api/rest/latest/milestones/11,12 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Example response

HTTP/1.1 204 No Content

Projects

This chapter focuses on project administration.

get Get all projects

A GET to /projects returns all the projects (standard and template) that the user is allowed to read. A parameter can be specified to retrieve only standard projects or template ones.

Get all projects (included project template)

HTTP request
GET /api/rest/latest/projects?page=0&size=4 HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1171

{
  "_embedded" : {
    "projects" : [ {
      "_type" : "project",
      "id" : 367,
      "name" : "sample project 1",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/367"
        }
      }
    }, {
      "_type" : "project",
      "id" : 456,
      "name" : "sample project 2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/456"
        }
      }
    }, {
      "_type" : "project",
      "id" : 789,
      "name" : "sample project 3",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/789"
        }
      }
    } ],
    "project-templates" : [ {
      "_type" : "project-template",
      "id" : 971,
      "name" : "project template 4",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/971"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects?page=0&size=4"
    }
  },
  "page" : {
    "size" : 4,
    "totalElements" : 4,
    "totalPages" : 1,
    "number" : 0
  }
}
Response fields
Path Type Description

_embedded.projects

Array

all the standard projects

_embedded.project-templates

Array

all the project templates

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

Get only standard projects (without project template)

HTTP request
GET /api/rest/latest/projects?type=STANDARD HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter Description

type

type of project

Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 935

{
  "_embedded" : {
    "projects" : [ {
      "_type" : "project",
      "id" : 367,
      "name" : "standard project 1",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/367"
        }
      }
    }, {
      "_type" : "project",
      "id" : 456,
      "name" : "standard project 2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/456"
        }
      }
    }, {
      "_type" : "project",
      "id" : 789,
      "name" : "standard project 3",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/789"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects?type=STANDARD&page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 3,
    "totalPages" : 1,
    "number" : 0
  }
}
Response fields
Path Type Description

_embedded.projects

Array

all the standard projects

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

Get only project templates

HTTP request
GET /api/rest/latest/projects?type=TEMPLATE HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter Description

type

type of project

Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 965

{
  "_embedded" : {
    "project-templates" : [ {
      "_type" : "project-template",
      "id" : 367,
      "name" : "sample project 1",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/367"
        }
      }
    }, {
      "_type" : "project-template",
      "id" : 456,
      "name" : "sample project 2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/456"
        }
      }
    }, {
      "_type" : "project-template",
      "id" : 789,
      "name" : "sample project 3",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/789"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects?type=TEMPLATE&page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 3,
    "totalPages" : 1,
    "number" : 0
  }
}
Response fields
Path Type Description

_embedded.project-templates

Array

all the project templates

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

get Get project

A GET to /projects/{id} returns the project with the given id. This retrieves a project administration data and is only authorized to administrators.

Path parameters

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

id

the id of the project

HTTP request

GET /api/rest/latest/projects/367 HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_type" : "project",
  "id" : 367,
  "description" : "<p>This project is the main sample project</p>",
  "label" : "Main Sample Project",
  "name" : "sample project",
  "active" : true,
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/367"
    },
    "requirements" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/367/requirements-library/content"
    },
    "test-cases" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/367/test-cases-library/content"
    },
    "campaigns" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/367/campaigns-library/content"
    },
    "permissions" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/367/permissions"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/367/attachments"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the project

_type

String

the type of the entity

name

String

the name of the project

label

String

the label of the project

description

String

the description of the project

active

Boolean

whether the project is active or not

attachments

Array

the attachments of the project

_links

Object

related links

Relation Description

self

link to this project

requirements

link to the content of the requirement library of this project

test-cases

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

campaigns

link to the content of the campaign library of this project

permissions

link to the permission list of this project

attachments

link to the attachments of this project

get Get project by name

A GET to /projects with a request parameter projectName returns the project with the given name. This retrieves a project administration data and is only authorized to administrators. Be careful, both the name of the parameter projectName and the value of the project name are case-sensitive.

HTTP request

GET /api/rest/latest/projects?projectName=sample+project HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

projectName

the name of the project

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_type" : "project",
  "id" : 367,
  "description" : "<p>This project is the main sample project</p>",
  "label" : "Main Sample Project",
  "name" : "sample project",
  "active" : true,
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/367"
    },
    "requirements" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/367/requirements-library/content"
    },
    "test-cases" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/367/test-cases-library/content"
    },
    "campaigns" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/367/campaigns-library/content"
    },
    "permissions" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/367/permissions"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/attachments"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the project

_type

String

the type of the entity

name

String

the name of the project

label

String

the label of the project

description

String

the description of the project

active

Boolean

whether the project is active or not

attachments

Array

the attachments of the project

_links

Object

related links

Relation Description

self

link to this project

requirements

link to the content of the requirement library of this project

test-cases

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

campaigns

link to the content of the campaign library of this project

permissions

link to the permission list of this project

attachments

link to the attachments of this project

post Create project

A POST to /projects creates a new project.

Create new project

HTTP request
POST /api/rest/latest/projects HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 134
Host: localhost:8080

{
  "_type" : "project",
  "name" : "sample project",
  "label" : "no price tag",
  "description" : "<p>do something meaningful</p>"
}
Request fields
Path Type Description

_type

String

the type of the entity (mandatory)

name

String

the name of the project

label

String

the label of the project

description

String

the description of the project

Request parameters
Parameter Description

fields

which fields of the elements should be returned (optional)

Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 670

{
  "_type" : "project",
  "id" : 333,
  "description" : "<p>do something meaningful</p>",
  "label" : "no price tag",
  "name" : "sample project",
  "active" : true,
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/333"
    },
    "requirements" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/333/requirements-library/content"
    },
    "test-cases" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/333/test-cases-library/content"
    },
    "campaigns" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/333/campaigns-library/content"
    }
  }
}
Response fields
Path Type Description

id

Number

the id of the project

active

Boolean

whether the project is active or not

_links

Object

related links

Relation Description

self

link to this project

requirements

link to the content of the requirement library of this project

test-cases

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

campaigns

link to the content of the campaign library of this project

Create new project using template

HTTP request
POST /api/rest/latest/projects HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 394
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

_type

String

the type of the entity (mandatory)

name

String

the name of the project

label

String

the label of the project

description

String

the description of the project

template_id

Number

the id of project template

params

Object

the parameters to create a new project from template

params.copyPermissions

Boolean

whether the project’s permissions will be copied or not

params.copyCUF

Boolean

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

params.copyBugtrackerBinding

Boolean

whether the project’s bugtracker will be copied or not

params.copyAutomatedProjects

Boolean

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

params.copyInfolists

Boolean

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

params.copyMilestone

Boolean

whether the project’s milestones will be copied or not

params.copyAllowTcModifFromExec

Boolean

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

Request parameters
Parameter Description

fields

which fields of the elements should be returned (optional)

Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 670

{
  "_type" : "project",
  "id" : 333,
  "description" : "<p>do something meaningful</p>",
  "label" : "no price tag",
  "name" : "sample project",
  "active" : true,
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/333"
    },
    "requirements" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/333/requirements-library/content"
    },
    "test-cases" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/333/test-cases-library/content"
    },
    "campaigns" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/333/campaigns-library/content"
    }
  }
}
Response fields
Path Type Description

id

Number

the id of the project

active

Boolean

whether the project is active or not

_links

Object

related links

Relation Description

self

link to this project

requirements

link to the content of the requirement library of this project

test-cases

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

campaigns

link to the content of the campaign library of this project

post Create project template

A POST to /projects creates a new project template.

Create new template

HTTP request
POST /api/rest/latest/projects HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 152
Host: localhost:8080

{
  "_type" : "project-template",
  "name" : "sample project template",
  "label" : "no price tag",
  "description" : "<p>do something meaningful</p>"
}
Request fields
Path Type Description

_type

String

the type of the entity (mandatory)

name

String

the name of the project template

label

String

the label of the project template

description

String

the description of the project template

Request parameters
Parameter Description

fields

which fields of the elements should be returned (optional)

Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 688

{
  "_type" : "project-template",
  "id" : 333,
  "description" : "<p>do something meaningful</p>",
  "label" : "no price tag",
  "name" : "sample project template",
  "active" : true,
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/333"
    },
    "requirements" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/333/requirements-library/content"
    },
    "test-cases" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/333/test-cases-library/content"
    },
    "campaigns" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/333/campaigns-library/content"
    }
  }
}
Response fields
Path Type Description

id

Number

the id of the project template

active

Boolean

whether the project template is active or not

_links

Object

related links

Relation Description

self

link to this project

requirements

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

test-cases

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

campaigns

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

Create new template from existing project

HTTP request
POST /api/rest/latest/projects HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 411
Host: localhost:8080

{
  "_type" : "project-template",
  "name" : "sample project template",
  "label" : "no price tag",
  "description" : "<p>do something meaningful</p>",
  "project_id" : 55,
  "params" : {
    "copyPermissions" : true,
    "copyCUF" : true,
    "copyBugtrackerBinding" : true,
    "copyAutomatedProjects" : true,
    "copyInfolists" : true,
    "copyMilestone" : true,
    "copyAllowTcModifFromExec" : true
  }
}
Request fields
Path Type Description

_type

String

the type of the entity (mandatory)

name

String

the name of the project

label

String

the label of the project

description

String

the description of the project

project_id

Number

the id of project template

params

Object

the parameters to create a new project from template

params.copyPermissions

Boolean

whether the project’s permissions will be copied or not

params.copyCUF

Boolean

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

params.copyBugtrackerBinding

Boolean

whether the project’s bugtracker will be copied or not

params.copyAutomatedProjects

Boolean

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

params.copyInfolists

Boolean

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

params.copyMilestone

Boolean

whether the project’s milestones will be copied or not

params.copyAllowTcModifFromExec

Boolean

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

Request parameters
Parameter Description

fields

which fields of the elements should be returned (optional)

Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 688

{
  "_type" : "project-template",
  "id" : 333,
  "description" : "<p>do something meaningful</p>",
  "label" : "no price tag",
  "name" : "sample project template",
  "active" : true,
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/333"
    },
    "requirements" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/333/requirements-library/content"
    },
    "test-cases" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/333/test-cases-library/content"
    },
    "campaigns" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/333/campaigns-library/content"
    }
  }
}
Response fields
Path Type Description

id

Number

the id of the project template

active

Boolean

whether the project template is active or not

_links

Object

related links

Relation Description

self

link to this project

requirements

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

test-cases

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

campaigns

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

delete Delete projects

A DELETE to /projects/{ids} deletes projects with the given ids (separated with comma). If you delete a project template, the binding will be removed on the projects associated with the project template.

Path parameters

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

ids

the ids of the projects

HTTP request

DELETE /api/rest/latest/projects/2 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Example response

HTTP/1.1 204 No Content

get Get project permissions

A GET to /projects/{id}/permissions returns the permission groups of the project with the given id.

Path parameters

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

id

the id of the project

HTTP request

GET /api/rest/latest/projects/367/permissions HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "content" : {
    "validator" : [ {
      "_type" : "team",
      "id" : 852,
      "name" : "Team B",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/teams/852"
        }
      }
    } ],
    "project_viewer" : [ {
      "_type" : "user",
      "id" : 486,
      "login" : "User-1",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/users/486"
        }
      }
    }, {
      "_type" : "user",
      "id" : 521,
      "login" : "User-2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/users/521"
        }
      }
    } ],
    "advanced_tester" : [ {
      "_type" : "team",
      "id" : 567,
      "name" : "Team A",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/teams/567"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/367/permissions"
    }
  }
}
Relation Description

self

the link to this project permissions

post Add permissions to project

A POST to /projects/{id}/permissions/{permissionGroup} adds certain users or teams to the permission group of the project with the given id.

The possible {permissionGroup} are test_editor, project_viewer, project_manager, test_runner, test_designer, advanced_tester and validator.

Path parameters

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

projectId

the id of the project

permissionGroup

the permission group of which the users/teams will be add in

HTTP request

POST /api/rest/latest/projects/367/permissions/advanced_tester?ids=486,521 HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

ids

the ids of the users/teams

Example response

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

{
  "content" : {
    "advanced_tester" : [ {
      "_type" : "user",
      "id" : 486,
      "login" : "User-1",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/users/486"
        }
      }
    }, {
      "_type" : "user",
      "id" : 521,
      "login" : "User-2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/users/521"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/367/permissions"
    }
  }
}
Relation Description

self

the link to this project permissions

get Get campaigns of project

A GET to /projects/{id}/campaigns returns the campaigns in the project with the given id.

Path parameters

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

id

the id of the project

HTTP request

GET /api/rest/latest/projects/14/campaigns?page=2&size=3&sort=name,desc HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_embedded" : {
    "campaigns" : [ {
      "_type" : "campaign",
      "id" : 255,
      "name" : "campaign 1",
      "reference" : "C-1",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/campaigns/255"
        }
      }
    }, {
      "_type" : "campaign",
      "id" : 122,
      "name" : "campaign 2",
      "reference" : "C-2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/campaigns/122"
        }
      }
    }, {
      "_type" : "campaign",
      "id" : 147,
      "name" : "campaign 3",
      "reference" : "C-3",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/campaigns/147"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns?page=0&size=3&sort=name,desc"
    },
    "prev" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns?page=1&size=3&sort=name,desc"
    },
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns?page=2&size=3&sort=name,desc"
    },
    "next" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns?page=3&size=3&sort=name,desc"
    },
    "last" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns?page=3&size=3&sort=name,desc"
    }
  },
  "page" : {
    "size" : 3,
    "totalElements" : 10,
    "totalPages" : 4,
    "number" : 2
  }
}

Response fields

Path Type Description

_embedded.campaigns

Array

the test cases of this project

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

get Get requirements of project

A GET to /projects/{id}/requirements returns the requirements in the project with the given id.

Path parameters

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

id

the id of the project

HTTP request

GET /api/rest/latest/projects/14/requirements?page=2&size=3&sort=id,desc HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_embedded" : {
    "requirements" : [ {
      "_type" : "requirement",
      "id" : 122,
      "name" : "requirement 1",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/requirements/122"
        }
      }
    }, {
      "_type" : "requirement",
      "id" : 147,
      "name" : "requirement 2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/requirements/147"
        }
      }
    }, {
      "_type" : "requirement",
      "id" : 255,
      "name" : "requirement 3",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/requirements/255"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/requirements?page=0&size=3&sort=id,desc"
    },
    "prev" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/requirements?page=1&size=3&sort=id,desc"
    },
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/requirements?page=2&size=3&sort=id,desc"
    },
    "next" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/requirements?page=3&size=3&sort=id,desc"
    },
    "last" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/requirements?page=3&size=3&sort=id,desc"
    }
  },
  "page" : {
    "size" : 3,
    "totalElements" : 10,
    "totalPages" : 4,
    "number" : 2
  }
}

Response fields

Path Type Description

_embedded.requirements

Array

the requirements of this project

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

get Get test cases of project

A GET to /projects/{id}/test-cases returns the test cases in the project with the given id.

Path parameters

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

id

the id of the project

HTTP request

GET /api/rest/latest/projects/14/test-cases?page=2&size=3&sort=name,desc HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_embedded" : {
    "test-cases" : [ {
      "_type" : "test-case",
      "id" : 122,
      "name" : "test case 1",
      "reference" : "TC-1",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/122"
        }
      }
    }, {
      "_type" : "test-case",
      "id" : 147,
      "name" : "test case 2",
      "reference" : "TC-2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/147"
        }
      }
    }, {
      "_type" : "scripted-test-case",
      "id" : 222,
      "name" : "scripted test case 1",
      "reference" : "STC-1",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/222"
        }
      }
    }, {
      "_type" : "scripted-test-case",
      "id" : 247,
      "name" : "scripted test case 2",
      "reference" : "STC-2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/247"
        }
      }
    }, {
      "_type" : "keyword-test-case",
      "id" : 322,
      "name" : "keyword test case 1",
      "reference" : "KTC-1",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/322"
        }
      }
    }, {
      "_type" : "keyword-test-case",
      "id" : 347,
      "name" : "keyword test case 2",
      "reference" : "KTC-2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/347"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases?page=0&size=3&sort=name,desc"
    },
    "prev" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases?page=1&size=3&sort=name,desc"
    },
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases?page=2&size=3&sort=name,desc"
    },
    "next" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases?page=3&size=3&sort=name,desc"
    },
    "last" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases?page=3&size=3&sort=name,desc"
    }
  },
  "page" : {
    "size" : 3,
    "totalElements" : 10,
    "totalPages" : 4,
    "number" : 2
  }
}

Response fields

Path Type Description

_embedded.test-cases

Array

the test cases of this project

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

get Get campaign library contents

A GET to /projects/{id}/campaigns-library/content returns the contents of the campaign library in the project with the given id.

Path parameters

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

id

the id of the project

HTTP request

GET /api/rest/latest/projects/14/campaigns-library/content?page=2&size=3&sort=name,desc&fields=name,reference&include=nested HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

include

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

Example response

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

{
  "_embedded" : {
    "campaign-library-content" : [ {
      "_type" : "campaign",
      "id" : 122,
      "name" : "root-level campaign",
      "reference" : "C-R",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/campaigns/122"
        }
      }
    }, {
      "_type" : "campaign-folder",
      "id" : 255,
      "name" : "root-level folder",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/campaign-folders/255"
        }
      }
    }, {
      "_type" : "campaign",
      "id" : 147,
      "name" : "content of root-level folder",
      "reference" : "C-N",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/campaigns/147"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns-library/content?fields=name,reference&include=nested&page=0&size=3&sort=name,desc"
    },
    "prev" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns-library/content?fields=name,reference&include=nested&page=1&size=3&sort=name,desc"
    },
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns-library/content?fields=name,reference&include=nested&page=2&size=3&sort=name,desc"
    },
    "next" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns-library/content?fields=name,reference&include=nested&page=3&size=3&sort=name,desc"
    },
    "last" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/campaigns-library/content?fields=name,reference&include=nested&page=3&size=3&sort=name,desc"
    }
  },
  "page" : {
    "size" : 3,
    "totalElements" : 10,
    "totalPages" : 4,
    "number" : 2
  }
}

Response fields

Path Type Description

_embedded.campaign-library-content

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

get Get requirement library contents

A GET to /projects/{id}/requirements-library/content returns the contents of the requirement library in the project with the given id.

Path parameters

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

id

the id of the project

HTTP request

GET /api/rest/latest/projects/14/requirements-library/content?page=2&size=3&include=nested&sort=id,desc HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

include

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

Example response

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

{
  "_embedded" : {
    "requirement-library-content" : [ {
      "_type" : "requirement-folder",
      "id" : 255,
      "name" : "root-level folder",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/requirement-folders/255"
        }
      }
    }, {
      "_type" : "requirement",
      "id" : 147,
      "name" : "content of root-level folder",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/requirements/147"
        }
      }
    }, {
      "_type" : "requirement",
      "id" : 122,
      "name" : "root-level requirement",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/requirements/122"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/requirements-library/content?include=nested&page=0&size=3&sort=id,desc"
    },
    "prev" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/requirements-library/content?include=nested&page=1&size=3&sort=id,desc"
    },
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/requirements-library/content?include=nested&page=2&size=3&sort=id,desc"
    },
    "next" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/requirements-library/content?include=nested&page=3&size=3&sort=id,desc"
    },
    "last" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/requirements-library/content?include=nested&page=3&size=3&sort=id,desc"
    }
  },
  "page" : {
    "size" : 3,
    "totalElements" : 10,
    "totalPages" : 4,
    "number" : 2
  }
}

Response fields

Path Type Description

_embedded.requirement-library-content

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

get Get test case library contents

A GET to /projects/{id}/test-cases-library/content returns the contents of the test case library in the project with the given id.

Path parameters

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

id

the id of the project

HTTP request

GET /api/rest/latest/projects/14/test-cases-library/content?page=2&size=3&sort=name,desc&fields=name,reference&include=nested HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

include

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

Example response

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

{
  "_embedded" : {
    "test-case-library-content" : [ {
      "_type" : "test-case",
      "id" : 122,
      "name" : "root-level test case",
      "reference" : "TC-R",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/122"
        }
      }
    }, {
      "_type" : "test-case-folder",
      "id" : 255,
      "name" : "root-level folder",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-case-folders/255"
        }
      }
    }, {
      "_type" : "scripted-test-case",
      "id" : 147,
      "name" : "content of root-level folder",
      "reference" : "TC-N",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/147"
        }
      }
    }, {
      "_type" : "keyword-test-case",
      "id" : 148,
      "name" : "content of root-level folder",
      "reference" : "TC-N",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/148"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases-library/content?fields=name,reference&include=nested&page=0&size=3&sort=name,desc"
    },
    "prev" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases-library/content?fields=name,reference&include=nested&page=1&size=3&sort=name,desc"
    },
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases-library/content?fields=name,reference&include=nested&page=2&size=3&sort=name,desc"
    },
    "next" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases-library/content?fields=name,reference&include=nested&page=3&size=3&sort=name,desc"
    },
    "last" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/test-cases-library/content?fields=name,reference&include=nested&page=3&size=3&sort=name,desc"
    }
  },
  "page" : {
    "size" : 3,
    "totalElements" : 10,
    "totalPages" : 4,
    "number" : 2
  }
}

Response fields

Path Type Description

_embedded.test-case-library-content

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

delete Delete permission(s) in project

A DELETE to /projects/{projectId}/users/{partyIds} deletes one or several user(s) with the given id(s) (separated with comma).

Path parameters

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

projectId

the id of the project

partyIds

the list of user/team ids to be deleted

HTTP request

DELETE /api/rest/latest/projects/44/users/77,99 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

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

cufId=80

Path parameters

Table 1. /api/rest/latest/projects/{id}/custom-fields/{entity-type}
Parameter Description

id

the id of the project

entity-type

entity to bind (REQUIREMENT_FOLDER, CAMPAIGN_FOLDER, TESTCASE_FOLDER, TEST_CASE, TEST_STEP, CAMPAIGN, ITERATION, TEST_SUITE, REQUIREMENT_VERSION, EXECUTION, EXECUTION_STEP)

Request parameters

Parameter Description

cufId

the id of the custom-fields

Example response

HTTP/1.1 200 OK

delete 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?cufId=80 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Path parameters

Table 1. /api/rest/latest/projects/{id}/custom-fields/{entity-type}
Parameter Description

id

the id of the project

entity-type

entity to bind (REQUIREMENT_FOLDER, CAMPAIGN_FOLDER, TESTCASE_FOLDER, TEST_CASE, TEST_STEP, CAMPAIGN, ITERATION, TEST_SUITE, REQUIREMENT_VERSION, EXECUTION, EXECUTION_STEP)

Request parameters

Parameter Description

cufId

the id of the custom-fields

Example response

HTTP/1.1 204 No Content

post Bind environment variables to project

A POST to /projects/{id}/environment-variables/{evIds} bind environment variables with the given ids for given project.

HTTP request

POST /api/rest/latest/projects/14/environment-variables/2,3 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Path parameters

Table 1. /api/rest/latest/projects/{id}/environment-variables/{evIds}
Parameter Description

id

the id of the project

evIds

ids of the environment variables

Example response

HTTP/1.1 200 OK

delete Unbind environment variables to project

A DELETE to /projects/{id}/environment-variables/{evIds} unbind environment variables with the given ids for given project.

HTTP request

DELETE /api/rest/latest/projects/14/environment-variables/2,3 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Path parameters

Table 1. /api/rest/latest/projects/{id}/environment-variables/{evIds}
Parameter Description

id

the id of the project

evIds

ids of the environment variables

Example response

HTTP/1.1 204 No Content

post Set a default value to an environment variable bind to a project

A POST to projects/{id}/environment-variables/{evId}/value set a default value to given environment variable bind to a given project.

HTTP request

POST /api/rest/latest/projects/14/environment-variables/2/value HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 33
Host: localhost:8080

{
  "value" : "new-value-label"
}

Path parameters

Table 1. /api/rest/latest/projects/{id}/environment-variables/{evId}/value
Parameter Description

id

the id of the project

evId

id of the environment variable bind to the project

Request fields

Path Type Description

value

String

new value to set

Example response

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

{
  "id" : 5,
  "environmentVariable" : {
    "id" : 2
  },
  "entityId" : 14,
  "entityType" : "PROJECT",
  "value" : "new-value-label"
}

Response fields

Path Type Description

id

Number

id of the environment variable binding

entityId

Number

id of the entity

entityType

String

type of the entity

value

String

new value to set

environmentVariable

Object

environment variable bind to the entity

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

infolist-id=1

Path parameters

Table 1. /api/rest/latest/projects/{id}/info-lists/{list-type}
Parameter Description

id

the id of the project

list-type

type of list to bind. list-type have 3 values : requirement-category, test-case-nature ou test-case-type

Request parameters

Parameter Description

infolist-id

the id of the info list

Example response

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

"infolist '1' bind to project 14 for requirement-category"

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

milestoneIds=1

Path parameters

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

id

the id of the project

Request parameters

Parameter Description

milestoneIds

the ids of the milestones

Example response

HTTP/1.1 200 OK
Content-Type: application/json
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

id

Number

the id of the project

_type

String

the type of the entity

name

String

the name of the project

label

String

the label of the project

description

String

the description of the project

active

Boolean

whether the project is active or not

attachments

Array

the attachments of the project

_links

Object

related links

Relation Description

self

link to this project

milestones

link to milestones associated with the project

get 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

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

id

the id of the project

HTTP request

GET /api/rest/latest/projects/14/milestones HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Example response

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

{
  "_embedded" : {
    "milestones" : [ {
      "_type" : "milestone",
      "id" : 11,
      "label" : "Milestone 1",
      "status" : "PLANNED",
      "end_date" : "2020-03-19T00:23:45.000+00:00",
      "range" : null,
      "description" : "example of milestone creation",
      "created_by" : "admin",
      "created_on" : "2020-04-06T10:00:00.000+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
      "_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+00:00",
      "range" : null,
      "description" : "example of milestone creation number 2 ",
      "created_by" : "admin",
      "created_on" : "2020-04-06T10:00:00.000+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
      "_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
  }
}

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

bugtrackerId=1

Path parameters

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

id

the id of the project

Request parameters

Parameter Description

bugtrackerId

the id of the bug-tracker

Example response

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

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

id

Number

the id of the project

_type

String

the type of the entity

name

String

the name of the project

label

String

the label of the project

description

String

the description of the project

active

Boolean

whether the project is active or not

attachments

Array

the attachments of the project

_links

Object

related links

Relation Description

self

link to this project

bug-tracker

link to the bug tracker of this project

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

Example response

HTTP/1.1 200 OK
Content-Type: application/json
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"
    }
  }
}
Relation Description

self

link to this project

get 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

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

id

the id of the project

HTTP request

GET /api/rest/latest/projects/1/bug-trackers HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Example response

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

{
  "_type" : "bug-tracker",
  "id" : 3,
  "name" : "bugtracker3",
  "url" : "url3",
  "kind" : "kind3",
  "description" : "a description of the server",
  "created_by" : "admin",
  "created_on" : "2020-04-06T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
  "iframe_friendly" : false,
  "authentication_policy" : "USER",
  "authentication_protocol" : "BASIC_AUTH",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/bug-trackers/3"
    }
  }
}

get Get all the bug-tracker project name bind to a Squash project

A GET to projects/{id}/bug-trackers-projects to find all the bug-tracker project name linked to a project.

Path parameters

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

id

the id of the project

HTTP request

GET /api/rest/latest/projects/14/bug-trackers-projects HTTP/1.1
Accept: application/json
Host: localhost:8080

Example response

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

{
  "_type" : "bug-tracker-project",
  "bugtracker" : {
    "_type" : "bug-tracker",
    "id" : 1,
    "name" : "bugtracker1",
    "url" : "https://henix.atlassian.net/",
    "kind" : "jira.xsquash",
    "description" : "",
    "created_by" : "admin",
    "created_on" : "2020-04-06T10:00:00.000+00:00",
    "last_modified_by" : "admin",
    "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
    "iframe_friendly" : false,
    "authentication_policy" : "USER",
    "authentication_protocol" : "BASIC_AUTH"
  },
  "bugtracker_project_names" : [ "gfa1", "gfa2" ]
}

Response fields

Path Type Description

_type

String

the type of the entity

bugtracker

Object

the current bugtracker

bugtracker_project_names

Array

list of bugtracker project name

post Bind bug-tracker project names to a Squash project

A POST to projects/{id}/bug-trackers-projects to bind bug-tracker project names to a Squash-TM project.

Path parameters

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

id

the id of the project

HTTP request

POST /api/rest/latest/projects/14/bug-trackers-projects HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 80
Host: localhost:8080

{
  "_type" : "bug-tracker-project",
  "bugtracker_project_names" : [ "gfa3" ]
}

Example response

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

{
  "_type" : "bug-tracker-project",
  "bugtracker" : {
    "_type" : "bug-tracker",
    "id" : 1,
    "name" : "bugtracker1",
    "url" : "https://henix.atlassian.net/",
    "kind" : "jira.xsquash",
    "description" : "",
    "created_by" : "admin",
    "created_on" : "2020-04-06T10:00:00.000+00:00",
    "last_modified_by" : "admin",
    "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
    "iframe_friendly" : false,
    "authentication_policy" : "USER",
    "authentication_protocol" : "BASIC_AUTH"
  },
  "bugtracker_project_names" : [ "gfa1", "gfa2", "gfa3" ]
}

Response fields

Path Type Description

_type

String

the type of the entity

bugtracker

Object

the current bugtracker

bugtracker_project_names

Array

list of bugtracker project name

delete Delete bug-tracker project names to a Squash project

A DELETE to projects/{id}/bug-trackers-projects to delete bug-tracker project names to a Squash-TM project.

Path parameters

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

id

the id of the project

HTTP request

POST /api/rest/latest/projects/14/bug-trackers-projects HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 80
Host: localhost:8080

{
  "_type" : "bug-tracker-project",
  "bugtracker_project_names" : [ "gfa3" ]
}

Example response

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

{
  "_type" : "bug-tracker-project",
  "bugtracker" : {
    "_type" : "bug-tracker",
    "id" : 1,
    "name" : "bugtracker1",
    "url" : "https://henix.atlassian.net/",
    "kind" : "jira.xsquash",
    "description" : "",
    "created_by" : "admin",
    "created_on" : "2020-04-06T10:00:00.000+00:00",
    "last_modified_by" : "admin",
    "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
    "iframe_friendly" : false,
    "authentication_policy" : "USER",
    "authentication_protocol" : "BASIC_AUTH"
  },
  "bugtracker_project_names" : [ "gfa1", "gfa2", "gfa3" ]
}

Response fields

Path Type Description

_type

String

the type of the entity

bugtracker

Object

the current bugtracker

bugtracker_project_names

Array

list of bugtracker project name

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

scmRepositoryId=11

Path parameters

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

id

the id of the project

Request parameters

Parameter Description

scmRepositoryId

the id of the scm repository

Example response

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

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

self

link to this project

scm-repository

link to the scm repository of this project

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

Path parameters

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

id

the id of the project

Example response

HTTP/1.1 200 OK
Content-Type: application/json
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"
    }
  }
}
Relation Description

self

link to this project

get Get project automation configuration

A GET to projects/{id}/automation-conf to find a project automation configuration.

Path parameters

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

id

the id of the project

HTTP request

GET /api/rest/latest/projects/1/automation-conf HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Example response

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

{
  "_type" : "project-automation-configuration",
  "bdd_implementation_technology" : "ROBOT",
  "bdd_implementation_language" : "ENGLISH",
  "automation_workflow_type" : "NATIVE",
  "_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

_type

String

the type of the entity

bdd_implementation_technology

String

the technology used to implement bdd tests

bdd_implementation_language

String

the language used to implement bdd tests

automation_workflow_type

String

the type of automation workflow among 'NONE', 'NATIVE' or 'NATIVE_SIMPLIFIED'

_links

Object

related links

Relation Description

self

link to this configuration

project

link to the project

patch Modify project automation configuration

A PATCH to projects/{id}/automation-conf modifies the automation configuration of the projet with the given id.

Path parameters

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

id

the id of the project

HTTP request

PATCH /api/rest/latest/projects/1/automation-conf HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 185
Host: localhost:8080

{
  "_type" : "project-automation-configuration",
  "bdd_implementation_technology" : "CUCUMBER_4",
  "bdd_implementation_language" : "GERMAN",
  "automation_workflow_type" : "NATIVE"
}

Request fields

Path Type Description

_type

String

the type of the entity

bdd_implementation_technology

String

the technology used to implement bdd tests

bdd_implementation_language

String

the language used to implement bdd tests

automation_workflow_type

String

the type of automation workflow among 'NONE', 'NATIVE' or 'NATIVE_SIMPLIFIED'

Example response

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

{
  "_type" : "project-automation-configuration",
  "bdd_implementation_technology" : "CUCUMBER_4",
  "bdd_implementation_language" : "GERMAN",
  "automation_workflow_type" : "NATIVE",
  "_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

_type

String

the type of the entity

bdd_implementation_technology

String

the technology used to implement bdd tests

bdd_implementation_language

String

the language used to implement bdd tests

automation_workflow_type

String

the type of automation workflow among 'NONE', 'NATIVE' or 'NATIVE_SIMPLIFIED'

_links

Object

related links

Relation Description

self

link to this configuration

project

link to the project

post Bind a test automation server to a project

A POST to /projects/{id}/test-automation-server associates the project with given id to the test automation server given as parameter.

HTTP request

POST /api/rest/latest/projects/13/test-automation-server HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

testAutomationServerId=3

Path parameters

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

id

the id of the project

Request parameters

Parameter Description

testAutomationServerId

the id of the automation server

Example response

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

{
  "_type" : "project",
  "id" : 13,
  "description" : "<p>Project for automated executions.</p>",
  "label" : "Automated executions project",
  "name" : "sample project",
  "active" : true,
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/13"
    },
    "test-automation-server" : {
      "href" : "http://localhost:8080/api/rest/latest/test-automation-servers/3"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the project

_type

String

the type of the entity

name

String

the name of the project

label

String

the label of the project

description

String

the description of the project

active

Boolean

whether the project is active or not

attachments

Array

the attachments of the project

_links

Object

related links

Relation Description

self

link to this project

test-automation-server

link to the automation server of this project

delete Unbind a test automation server from a project

A DELETE to /projects/{id}/test-automation-server dissociates the project with the given id from its test automation server.

HTTP request

DELETE /api/rest/latest/projects/13/test-automation-server HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Path parameters

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

id

the id of the project

Example response

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

{
  "_type" : "project",
  "id" : 13,
  "description" : "<p>Project for automated executions.</p>",
  "label" : "Automated executions project",
  "name" : "sample project",
  "active" : true,
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/13"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the project

_type

String

the type of the entity

name

String

the name of the project

label

String

the label of the project

description

String

the description of the project

active

Boolean

whether the project is active or not

attachments

Array

the attachments of the project

_links

Object

related links

Relation Description

self

link to this project

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

Path parameters

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

id

the id of the project

pluginId

the string corresponding to the id of the plugin to activate or deactivate

Request parameters

Parameter Description

enabled

true to activate the plugin, false to deactivate it

saveConfig

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

post Bind an AI server to a project

A POST to /projects/{projectId}/ai-servers/{aiServerId} associates the project with given projectId to the AI server with given aiServerId.

HTTP request

POST /api/rest/latest/projects/13/ai-servers/2 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Path parameters

Table 1. /api/rest/latest/projects/{projectId}/ai-servers/{aiServerId}
Parameter Description

projectId

the id of the project

aiServerId

the id of the ai server to bind

Example response

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

{
  "_type" : "project",
  "id" : 13,
  "description" : "<p>Project for automated executions.</p>",
  "label" : "Project bound to ai server",
  "name" : "sample project",
  "active" : true,
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/13"
    },
    "ai-server" : {
      "href" : "http://localhost:8080/api/rest/latest/ai-servers/2"
    }
  }
}

get Get AI server bound to a project

A GET to projects/{id}/ai-servers to find the AI server bound to a project.

Path parameters

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

id

the id of the artificial intelligence server

HTTP request

GET /api/rest/latest/projects/3/ai-servers HTTP/1.1
Accept: application/json
Host: localhost:8080

Example response

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

{
  "id" : 123,
  "name" : "an ai server",
  "url" : "https://api.openai.com/v1/chat/completions",
  "description" : "This server should be used for generating test case, link it with projects 2, 4 and 12",
  "payload_template" : "{\"model\": \"gpt-4-1106-preview\", \"messages\": [{\"role\": \"user\", \"content\": \"You are a manual tester. You must transform a requirement into one or several test cases, written in English. The description of the test case must consist of a sum up of the given requirement. Your answer must have this format : \"{\"testCases\":[{\"name\":\"\",\"description\":\"\",\"prerequisites\":\"\",\"testSteps\":[{\"index\":0,\"action\":\"\",\"expectedResult\":\"\"}]}]\"{{ requirement }}\"}] ,\"temperature\": 0.9, \"top_p\": 0.9, \"n\": 1, \"stream\": false, \"max_tokens\": 2000, \"presence_penalty\": 0, \"frequency_penalty\": 0}",
  "json_path" : "choices[0].message.content",
  "authentication_policy" : "APP_LEVEL",
  "authentication_protocol" : "TOKEN_AUTH",
  "created_by" : "admin",
  "created_on" : "2020-04-06T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/3/ai-servers"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the artificial intelligence server

name

String

the name of the artificial intelligence server

url

String

the url of the remote artificial intelligence server

authentication_policy

String

the authentication policy of the artificial intelligence server (APP_LEVEL by default)

authentication_protocol

String

the authentication protocol of the artificial intelligence server (TOKEN_AUTH by default)

payload_template

String

a pre-formatted payload containing query parameters and a placeholder, designed for submission to an AI service for processing

description

String

a description of the server

json_path

String

a string expression used to navigate and extract specific nodes to access the generated answer in the response

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this artificial intelligence server

delete Unbind an AI server from a project

A DELETE to /projects/{id}/ai-servers dissociate the project with given id from its AI server.

HTTP request

DELETE /api/rest/latest/projects/13/ai-servers HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Path parameters

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

id

the id of the project

Example response

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

{
  "_type" : "project",
  "id" : 13,
  "description" : "<p>Project for automated executions.</p>",
  "label" : "Project bound to ai server",
  "name" : "sample project",
  "active" : true,
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/13"
    }
  }
}
Relation Description

self

link to this project

This chapter focuses on types of links between requirements.

A GET to /requirement-link-types returns all the link types.

GET /api/rest/latest/requirement-link-types HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

type

which type of the element should be returned (optional)

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

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

_embedded.requirement-version-link-types

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

A GET to /requirement-link-types/{id} returns the link type with the given id.

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

id

the id of the link type

GET /api/rest/latest/requirement-link-types/1 HTTP/1.1
Accept: application/json
Host: localhost:8080
Parameter Description

fields

which fields of the elements should be returned (optional)

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

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

_type

String

the type of the entity

id

Number

the id of the link type

role1

String

the first role of the link between requirement

role1_code

String

the first role code

role2

String

the second role of the link between requirement

role2_code

String

the second role code

default

Boolean

the default link type

_links

Object

related links

Relation Description

self

link to this link type

A GET to /requirement-link-types returns the link type with the given code role.

GET /api/rest/latest/requirement-link-types?codeRole=Role1code HTTP/1.1
Accept: application/json
Host: localhost:8080
Parameter Description

codeRole

role code of the link to search

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

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

_type

String

the type of the entity

id

Number

the id of the milestone

role1

String

the first role of the link between requirement

role1_code

String

the first role code

role2

String

the second role of the link between requirement

role2_code

String

the second role code

default

Boolean

the default link type

_links

Object

related links

Relation Description

self

link to this link type

A POST to /requirement-link-types creates a new link type.

POST /api/rest/latest/requirement-link-types HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 108
Host: localhost:8080

{
  "role1" : "Role1",
  "role1_code" : "Role 1 code",
  "role2" : "Role2",
  "role2_code" : "Role 2 code"
}
Path Type Description

role1

String

the first role of the link between requirement (mandatory)

role1_code

String

the first role code (mandatory)

role2

String

the second role of the link between requirement (mandatory)

role2_code

String

the second role code (mandatory)

Parameter Description

fields

which fields of the elements should be returned (optional)

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

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

_type

String

the type of the entity

id

Number

the id of the milestone

role1

String

the first role of the link between requirement

role1_code

String

the first role code

role2

String

the second role of the link between requirement

role2_code

String

the second role code

default

Boolean

the default link type

_links

Object

related links

Relation Description

self

link to this milestone

A PATCH to /requirement-link-types/{id} modifies the link type with the given id.

PATCH /api/rest/latest/requirement-link-types/1 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 136
Host: localhost:8080

{
  "role1" : "Update role1",
  "role1_code" : "Update role 1 code",
  "role2" : "Update role2",
  "role2_code" : "Update role 2 code"
}
Table 1. /api/rest/latest/requirement-link-types/{id}
Parameter Description

id

the id of the link type

Path Type Description

role1

String

the first role of the link between requirement

role1_code

String

the first role code

role2

String

the second role of the link between requirement

role2_code

String

the second role code

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

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

A DELETE to /requirement-link-types/{ids} deletes one or several link type(s) with the given id(s).

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

ids

the list of ids of the link type

DELETE /api/rest/latest/requirement-link-types/11%2012 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
HTTP/1.1 204 No Content

Source Code Management Repositories

This chapter is managed on source code management repositories.

get Get scm repository

A GET to /scm-repositories/{id} returns the source code management repository with the given id.

Path parameters

Table 1. /api/rest/latest/scm-repositories/{id}
Parameter Description

id

the id of the source code management repository

HTTP request

GET /api/rest/latest/scm-repositories/1 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

Example response

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

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

_type

String

the type of the entity

id

Number

the id of the source code management repository

name

String

the name of the source code management repository

repository_path

String

the repository path of the source code management repository

working_folder_path

String

the working folder path of the source code management repository

working_branch

String

the working branch of the source code management repository

scm_server

Object

the scm server this source code management repository belongs to

_links

Object

related links

Relation Description

self

link to this source code management repository

patch 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

Table 1. /api/rest/latest/scm-repositories/{id}
Parameter Description

id

the id of the source code management repository

Request parameters

Parameter Description

branch

the new working branch of the source code management repository

fields

which fields of the elements should be returned (optional)

Example response

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

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

_type

String

the type of the entity

id

Number

the id of the source code management repository

name

String

the name of the source code management repository

repository_path

String

the repository path of the source code management repository

working_folder_path

String

the working folder path of the source code management repository

working_branch

String

the working branch of the source code management repository

scm_server

Object

the scm server this source code management repository belongs to

_links

Object

related links

delete Delete scm repository

A DELETE to /scm-repositories/{ids} deletes one or several source code management repositories with the given id(s).

Path parameters

Table 1. /api/rest/latest/scm-repositories/{ids}
Parameter Description

ids

the list of ids of the source code management repositories

HTTP request

DELETE /api/rest/latest/scm-repositories/9,10 HTTP/1.1
Content-Type: application/json
Accept: 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 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
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

type

which type of the element should be returned (optional)

Example response

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

{
  "_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",
      "description" : "a description of the server",
      "created_by" : "admin",
      "created_on" : "2020-04-06T10:00:00.000+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
      "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",
      "description" : "a description of the server",
      "created_by" : "admin",
      "created_on" : "2020-04-06T10:00:00.000+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
      "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

_embedded.scm-servers

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

get Get scm server

A GET to /scm-servers/{id} returns the source code management server with the given id.

Path parameters

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

id

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

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_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",
  "description" : "a description of the server",
  "created_by" : "admin",
  "created_on" : "2020-04-06T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
  "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

_type

String

the type of the entity

id

Number

the id of the source code management server

name

String

the name of the source code management server

url

String

the url of the source code management server

kind

String

the kind of the source code management server

committer_mail

String

the committer mail used for the source code management server

authentication_policy

String

the authentication policy of the source code management server

authentication_protocol

String

the authentication protocol of the source code management server

description

String

a description of the server

repositories

Array

the repositories of this source code management server

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this source code management server

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

{
  "name" : "New scmServer",
  "url" : "https://github.com/",
  "kind" : "git",
  "committer_mail" : "henix@git.fr",
  "description" : "a description of the server"
}

Request fields

Path Type Description

name

String

the name of the source code management server (mandatory)

url

String

the url of the source code management server (mandatory)

kind

String

the kind of the source code management server (mandatory)

committer_mail

String

the committer mail used for the source code management server

description

String

a description of the server

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_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",
  "description" : "a description of the server",
  "created_by" : "admin",
  "created_on" : "2020-04-06T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
  "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

_type

String

the type of the entity

id

Number

the id of the source code management server

name

String

the name of the source code management server

url

String

the url of the source code management server

kind

String

the kind of the source code management server

committer_mail

String

the committer mail used for the source code management server

authentication_policy

String

the authentication policy of the source code management server

authentication_protocol

String

the authentication protocol of the source code management server

description

String

a description of the server

repositories

Array

the repositories of this source code management server

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this source code management server

patch Modify scm server

A PATCH to /scm-servers/{id} modifies the source code management server with the given id.

Path parameters

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

id

the id of the source code management server

HTTP request

PATCH /api/rest/latest/scm-servers/2 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 155
Host: localhost:8080

{
  "name" : "update scmServer",
  "url" : "https://bitbucket.org/",
  "committer_mail" : "git@henix.fr",
  "description" : "a description of the server"
}

Request fields

Path Type Description

name

String

the name of the source code management server

url

String

the url of the source code management server

committer_mail

String

the committer mail used for the source code management server

description

String

a description of the server

Example response

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

{
  "_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",
  "description" : "a description of the server",
  "created_by" : "admin",
  "created_on" : "2020-04-06T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-06T10:00:00.000+00:00",
  "repositories" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/scm-servers/2"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

id

Number

the id of the source code management server

name

String

the name of the source code management server

url

String

the url of the source code management server

kind

String

the kind of the source code management server

committer_mail

String

the committer mail used for the source code management server

authentication_policy

String

the authentication policy of the source code management server

authentication_protocol

String

the authentication protocol of the source code management server

description

String

a description of the server

repositories

Array

the repositories of this source code management server

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this source code management server

delete Delete scm server

A DELETE to /scm-servers/{ids} deletes one or several source code management servers with the given id(s).

Path parameters

Table 1. /api/rest/latest/scm-servers/{ids}
Parameter Description

ids

the list of ids of the source code management servers

HTTP request

DELETE /api/rest/latest/scm-servers/11,12 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Example response

HTTP/1.1 204 No Content

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

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

type

which type of the element should be returned (optional)

Example response

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

{
  "_embedded" : {
    "scm-repositories" : [ {
      "_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

_embedded.scm-repositories

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

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

{
  "name" : "GherkinTestCase",
  "working_branch" : "master",
  "repository_path" : "home/Git1",
  "working_folder_path" : "resources/features",
  "params" : {
    "clone_repository" : true
  }
}

Path parameters

Table 1. /api/rest/latest/scm-servers/{id}/scm-repositories
Parameter Description

id

the id of the source code management server

Request fields

Path Type Description

name

String

the name of the source code management repository (mandatory)

repository_path

String

the repository path of the source code management repository (mandatory if cloning)

working_folder_path

String

the working folder path of the source code management repository

working_branch

String

the working branch of the source code management repository (mandatory)

params

Object

the parameters to create a new source code management repository

params.clone_repository

Boolean

whether the repository must be cloned on squash server file system

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

Example response

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

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

_type

String

the type of the entity

id

Number

the id of the source code management repository

name

String

the name of the source code management repository

repository_path

String

the repository path of the source code management repository

working_folder_path

String

the working folder path of the source code management repository

working_branch

String

the working branch of the source code management repository

scm_server

Object

the scm server this source code management repository belongs to

_links

Object

related links

Relation Description

self

link to this source code management repository

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

Path parameters

Table 1. /api/rest/latest/scm-servers/{id}/credentials
Parameter Description

id

the id of the scm server

Example response

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

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

_type

String

the type of the credentials

username

String

the username to authenticate to this scm server

_links

Object

related links

post Set scm server credentials

A POST to /scm-servers/{id}/credentials set credentials for the given source code management server.

Set basic authentication credentials

HTTP request
POST /api/rest/latest/scm-servers/1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 106
Host: localhost:8080

{
  "_type" : "basic-auth-credentials",
  "username" : "user@henix.fr",
  "password" : "qcrGmkQxI0J789F"
}
Path parameters
Table 1. /api/rest/latest/scm-servers/{id}/credentials
Parameter Description

id

the id of the scm server

Request fields
Path Type Description

_type

String

the type of the credentials

username

String

the username to authenticate to this scm server

password

String

the password to authenticate to this scm server

Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 194

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

_type

String

the type of the credentials

username

String

the username to authenticate to this scm server

_links

Object

related links

Set token authentication credentials

HTTP request
POST /api/rest/latest/scm-servers/3/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 76
Host: localhost:8080

{
  "_type" : "token-auth-credentials",
  "token" : "qEdK6ZEDfEV14BAPiFHE"
}
Path parameters
Table 1. /api/rest/latest/scm-servers/{id}/credentials
Parameter Description

id

the id of the scm server

Request fields
Path Type Description

_type

String

the type of the credentials

token

String

the token to authenticate to this scm server

Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 162

{
  "_type" : "token-auth-credentials",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/scm-servers/3/credentials"
    }
  }
}
Response fields
Path Type Description

_type

String

the type of the credentials

_links

Object

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 Get all teams

A GET to /teams returns all the teams.

HTTP request

GET /api/rest/latest/teams?page=2&size=1 HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

type

which type of the element should be returned (optional)

Example response

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

{
  "_embedded" : {
    "teams" : [ {
      "_type" : "team",
      "id" : 567,
      "name" : "Team A",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/teams/567"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:8080/api/rest/latest/teams?page=0&size=1"
    },
    "prev" : {
      "href" : "http://localhost:8080/api/rest/latest/teams?page=1&size=1"
    },
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/teams?page=2&size=1"
    },
    "next" : {
      "href" : "http://localhost:8080/api/rest/latest/teams?page=3&size=1"
    },
    "last" : {
      "href" : "http://localhost:8080/api/rest/latest/teams?page=4&size=1"
    }
  },
  "page" : {
    "size" : 1,
    "totalElements" : 5,
    "totalPages" : 5,
    "number" : 2
  }
}

Response fields

Path Type Description

_embedded.teams

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

post Create team

A POST to /teams creates a new team.

HTTP request

POST /api/rest/latest/teams HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 85
Host: localhost:8080

{
  "_type" : "team",
  "name" : "Team A",
  "description" : "<p>black panther</p>"
}

Request fields

Path Type Description

_type

String

the type of the entity

name

String

the name of the team

description

String

the description of the team

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_type" : "team",
  "id" : 332,
  "name" : "Team A",
  "description" : "<p>black panther</p>",
  "members" : [ ],
  "created_by" : "admin",
  "created_on" : "2017-07-04T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-07-05T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/teams/332"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the team

members

Array

the members of this team

created_by

String

the user who created this team

created_on

String

the date of this team account was created

last_modified_by

String

the user who last modified this team

last_modified_on

String

the date of this team was last modified

_links

Object

related links

Relation Description

self

link to this user

get Get team

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

Path parameters

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

id

the id of the team

HTTP request

GET /api/rest/latest/teams/567 HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_type" : "team",
  "id" : 567,
  "name" : "Team A",
  "description" : "<p>black panther</p>",
  "members" : [ ],
  "created_by" : "admin",
  "created_on" : "2017-07-04T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-07-05T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/teams/567"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

id

Number

the id of the team

name

String

the name of the team

description

String

the description of the team

members

Array

the members of this team

created_by

String

the user who created this team

created_on

String

the date of this team account was created

last_modified_by

String

the user who last modified this team

last_modified_on

String

the date of this team was last modified

_links

Object

related links

Relation Description

self

link to this user

patch Modify team

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

Path parameters

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

id

the id of the team

HTTP request

PATCH /api/rest/latest/teams/567 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 85
Host: localhost:8080

{
  "_type" : "team",
  "name" : "Team A",
  "description" : "<p>black panther</p>"
}

Request fields

Path Type Description

_type

String

the type of the entity

name

String

the name of the team

description

String

the description of the team

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_type" : "team",
  "id" : 332,
  "name" : "Team A",
  "description" : "<p>black panther</p>",
  "members" : [ ],
  "created_by" : "admin",
  "created_on" : "2017-07-04T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-07-05T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/teams/332"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the team

members

Array

the members of this team

created_by

String

the user who created this team

created_on

String

the date of this team account was created

last_modified_by

String

the user who last modified this team

last_modified_on

String

the date of this team was last modified

_links

Object

related links

Relation Description

self

link to this user

delete Delete team

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

Path parameters

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

ids

the list of ids of the teams

HTTP request

DELETE /api/rest/latest/teams/169,189 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

get Get team members

A GET to /teams/team-name/{teamName}/members returns all the members of the team with the given teamName.

Path parameters

Table 1. /api/rest/latest/teams/team-name/{teamName}/members
Parameter Description

teamName

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_embedded" : {
    "members" : [ {
      "_type" : "user",
      "id" : 1,
      "first_name" : "Charles",
      "last_name" : "Dupond",
      "login" : "User-1",
      "email" : "charlesdupond@aaaa.aa",
      "active" : true,
      "group" : "User",
      "can_delete_from_front" : true,
      "teams" : [ ],
      "last_connected_on" : "2018-02-11T11:00:00.000+00:00",
      "created_by" : "admin",
      "created_on" : "2017-07-04T10:00:00.000+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2017-07-05T10:00:00.000+00:00",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/users/1"
        }
      }
    }, {
      "_type" : "user",
      "id" : 2,
      "first_name" : "Chris",
      "last_name" : "Dupond",
      "login" : "User-2",
      "email" : "chrisdupond@aaaa.aa",
      "active" : true,
      "group" : "User",
      "can_delete_from_front" : true,
      "teams" : [ ],
      "last_connected_on" : "2018-03-11T11:00:00.000+00:00",
      "created_by" : "admin",
      "created_on" : "2017-07-04T10:00:00.000+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2017-07-05T10:00:00.000+00:00",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/users/2"
        }
      }
    }, {
      "_type" : "user",
      "id" : 3,
      "first_name" : "Victor",
      "last_name" : "Dupond",
      "login" : "User-3",
      "email" : "victordupond@aaaa.aa",
      "active" : true,
      "group" : "User",
      "can_delete_from_front" : true,
      "teams" : [ ],
      "last_connected_on" : "2018-03-11T11:00:00.000+00:00",
      "created_by" : "admin",
      "created_on" : "2017-07-04T10:00:00.000+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2017-07-05T10:00:00.000+00:00",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/users/3"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/teams/team-name/Team%20A/members?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 3,
    "totalPages" : 1,
    "number" : 0
  }
}

Response fields

Path Type Description

_embedded.members

Array

the members of this team

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

post 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

Table 1. /api/rest/latest/teams/team-name/{teamName}/members
Parameter Description

teamName

the name of the team

HTTP request

POST /api/rest/latest/teams/team-name/Team%20A/members HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

userLogins=John+Doe%2C+Jane+Doe

Request parameters

Parameter Description

userLogins

the logins of the members to add

delete 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

Table 1. /api/rest/latest/teams/team-name/{teamName}/members
Parameter Description

teamName

the name of the team

HTTP request

DELETE /api/rest/latest/teams/team-name/Team%20A/members?userLogins=John+Doe%2C+Jane+Doe HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

userLogins

the logins of the members to remove

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 Get all users

A GET to /users returns all the users.

HTTP request

GET /api/rest/latest/users?page=2&size=1 HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

type

which type of the element should be returned (optional)

Example response

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

{
  "_embedded" : {
    "users" : [ {
      "_type" : "user",
      "id" : 486,
      "login" : "User-1",
      "active" : true,
      "group" : "User",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/users/486"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:8080/api/rest/latest/users?page=0&size=1"
    },
    "prev" : {
      "href" : "http://localhost:8080/api/rest/latest/users?page=1&size=1"
    },
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/users?page=2&size=1"
    },
    "next" : {
      "href" : "http://localhost:8080/api/rest/latest/users?page=3&size=1"
    },
    "last" : {
      "href" : "http://localhost:8080/api/rest/latest/users?page=4&size=1"
    }
  },
  "page" : {
    "size" : 1,
    "totalElements" : 5,
    "totalPages" : 5,
    "number" : 2
  }
}

Response fields

Path Type Description

_embedded.users

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

get Get user

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

Path parameters

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

login

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

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_type" : "user",
  "id" : 486,
  "first_name" : "Charles",
  "last_name" : "Dupond",
  "login" : "User-1",
  "email" : "charlesdupond@aaaa.aa",
  "active" : true,
  "group" : "User",
  "can_delete_from_front" : true,
  "teams" : [ ],
  "last_connected_on" : "2018-02-11T11:00:00.000+00:00",
  "created_by" : "admin",
  "created_on" : "2017-07-04T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-07-05T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/users/486"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the user

_type

String

the type of the entity

first_name

String

the first name of the user

last_name

String

the last name of the user

login

String

the login of the user

email

String

the email address of the user

active

Boolean

whether the user is activate or not

group

String

the group of the user belong (admin or user)

can_delete_from_front

Boolean

whether the user can delete library entities from the front-end with the Squash TM Premium plugin

teams

Array

the team of the user participate

last_connected_on

String

the date of this user was last connected

created_by

String

the user who created this user account

created_on

String

the date of this user account was created

last_modified_by

String

the user who last modified this user account

last_modified_on

String

the date of this user account was last modified

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

post Create user

A POST to /users creates a new user.

HTTP request

POST /api/rest/latest/users HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 214
Host: localhost:8080

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

Request fields

Path Type Description

_type

String

the type of the entity

first_name

String

the first name of the user

last_name

String

the last name of the user

login

String

the login of the user

password

String

the password of the user

email

String

the email address of the user

group

String

the group of the user belong (admin, user or testAutomationServer)

can_delete_from_front

Boolean

whether the user can delete library entities from the front-end with the Squash TM Premium plugin

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_type" : "user",
  "id" : 987,
  "first_name" : "Charles",
  "last_name" : "Dupond",
  "login" : "User-1",
  "email" : "charlesdupond@aaaa.aa",
  "active" : true,
  "group" : "User",
  "can_delete_from_front" : true,
  "teams" : [ ],
  "last_connected_on" : "2018-03-05T11:00:00.000+00:00",
  "created_by" : "admin",
  "created_on" : "2017-07-04T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-07-05T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/users/987"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the user

active

Boolean

whether the user is activate or not

teams

Array

the team of the user participate

last_connected_on

String

the date of this user was last connected

created_by

String

the user who created this user account

created_on

String

the date of this user account was created

last_modified_by

String

the user who last modified this user account

last_modified_on

String

the date of this user account was last modified

_links

Object

related links

Relation Description

self

link to this user

patch Modify user

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

Path parameters

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

id

the id of the user

HTTP request

PATCH /api/rest/latest/users/987 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 236
Host: localhost:8080

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

Request fields

Path Type Description

_type

String

the type of the entity

first_name

String

the first name of the user

last_name

String

the last name of the user

login

String

the login of the user

password

String

the password of the user

email

String

the email address of the user

active

Boolean

whether the user is activate or not

group

String

the group of the user belong (admin, user or testAutomationServer)

can_delete_from_front

Boolean

whether the user can delete library entities from the front-end with the Squash TM Premium plugin

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_type" : "user",
  "id" : 987,
  "first_name" : "Charles",
  "last_name" : "Dupond",
  "login" : "User-42",
  "email" : "charlesdupond@bbbb.bb",
  "active" : false,
  "group" : "User",
  "can_delete_from_front" : false,
  "teams" : [ ],
  "last_connected_on" : "2018-03-05T11:00:00.000+00:00",
  "created_by" : "admin",
  "created_on" : "2017-07-04T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-07-05T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/users/987"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the user

teams

Array

the team of which the user is a member

last_connected_on

String

the date of this user was last connected

created_by

String

the user who created this user account

created_on

String

the date of this user account was created

last_modified_by

String

the user who last modified this user account

last_modified_on

String

the date of this user account was last modified

can_delete_from_front

Boolean

whether the user can delete library entities from the front-end with the Squash TM Premium plugin

_links

Object

related links

Relation Description

self

link to this user

delete Delete user

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

Path parameters

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

ids

the list of ids of the users

HTTP request

DELETE /api/rest/latest/users/169,189 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

get 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

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

login

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "_embedded" : {
    "teams" : [ {
      "_type" : "team",
      "id" : 567,
      "name" : "Team A",
      "description" : "<p>black panther</p>",
      "created_by" : "admin",
      "created_on" : "2017-07-04T10:00:00.000+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2017-07-05T10:00:00.000+00:00",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/teams/567"
        }
      }
    }, {
      "_type" : "team",
      "id" : 568,
      "name" : "Team B",
      "description" : "<p>black widow</p>",
      "created_by" : "admin",
      "created_on" : "2017-07-04T10:00:00.000+00:00",
      "last_modified_by" : "admin",
      "last_modified_on" : "2017-07-05T10:00:00.000+00:00",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/teams/568"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/users/login/User-1/teams?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

Response fields

Path Type Description

_embedded.teams

Array

the teams of this user

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

post 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

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

login

the login of the user

HTTP request

POST /api/rest/latest/users/login/User-1/teams HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

teamNames=team-1%2C+team-2

Request parameters

Parameter Description

teamNames

the list of names of the teams

delete 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

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

login

the login of the user

HTTP request

DELETE /api/rest/latest/users/login/User-1/teams?teamNames=team-1%2C+team-2 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

teamNames

the list of names of the teams

get Get user permissions

A GET to /users/{id}/permissions returns the permission groups of the user with the given id.

Path parameters

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

id

the id of the user

HTTP request

GET /api/rest/latest/users/486/permissions HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

Example response

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

{
  "content" : {
    "validator" : [ {
      "_type" : "project",
      "id" : 369,
      "description" : "<p>This project is the main sample project</p>",
      "label" : "Main Sample Project",
      "name" : "proj3",
      "active" : true,
      "attachments" : [ ],
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/369"
        }
      }
    } ],
    "advanced_tester" : [ {
      "_type" : "project",
      "id" : 367,
      "description" : "<p>This project is the main sample project</p>",
      "label" : "Main Sample Project",
      "name" : "proj1",
      "active" : true,
      "attachments" : [ ],
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/367"
        }
      }
    }, {
      "_type" : "project",
      "id" : 368,
      "description" : "<p>This project is the main sample project</p>",
      "label" : "Main Sample Project",
      "name" : "proj2",
      "active" : true,
      "attachments" : [ ],
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/368"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/users/486/permissions"
    }
  }
}
Relation Description

self

the link to this user permissions

post Add permissions to user

A POST to /users/{id}/permissions/{permissionGroup} adds permission group of the user with the given id.

The possible {permissionGroup} are test_editor, project_viewer, project_manager, test_runner, test_designer, advanced_tester and validator.

Path parameters

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

id

the id of the user

permissionGroup

the permission group

HTTP request

POST /api/rest/latest/users/486/permissions/advanced_tester?ids=369 HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

ids

the ids of the projects

Example response

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

{
  "content" : {
    "advanced_tester" : [ {
      "_type" : "project",
      "id" : 369,
      "description" : "<p>This project is the main sample project</p>",
      "label" : "Main Sample Project",
      "name" : "proj3",
      "active" : true,
      "attachments" : [ ],
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/369"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/users/486/permissions"
    }
  }
}
Relation Description

self

the link to this user permissions

delete Delete permission(s) for user

A DELETE to /users/{id}/permissions deletes one or several permissions for the given user (ids of projects separated with comma).

Path parameters

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

id

the id of the user

HTTP request

DELETE /api/rest/latest/users/486/permissions?ids=369 HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

ids

the ids of the projects

Welcome Message

This chapter focuses on service for the welcome message of Squash TM.

get 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
Content-Length: 68

{
  "_type" : "welcome-message",
  "message" : "<h1>Bienvenue<h1>"
}

Response fields

Path Type Description

_type

String

the type of the entity

message

String

the welcome message of Squash TM

patch Modify welcome message

A PATCH to /welcome-message modifies the welcome message.

HTTP request

PATCH /api/rest/latest/welcome-message HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 37
Host: localhost:8080

{
  "message" : "<h1>Bienvenue<h1>"
}

Request fields

Path Type Description

message

String

the welcome message of Squash TM (mandatory)

Example response

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

{
  "_type" : "welcome-message",
  "message" : "<h1>Bienvenue<h1>"
}

Response fields

Path Type Description

_type

String

the type of the entity

message

String

the welcome message of Squash TM