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 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
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
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 |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get 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
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the id of the artificial intelligence server |
|
|
the name of the artificial intelligence server |
|
|
the url of the remote artificial intelligence server |
|
|
the authentication policy of the artificial intelligence server (APP_LEVEL by default) |
|
|
the authentication protocol of the artificial intelligence server (TOKEN_AUTH by default) |
|
|
a pre-formatted payload containing query parameters and a placeholder, designed for submission to an AI service for processing |
|
|
a description of the server |
|
|
a string expression used to navigate and extract specific nodes to access the generated answer in the response |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this artificial intelligence server |
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 |
|---|---|---|
|
|
the name of the ai server |
|
|
the url of the ai server |
|
|
a description of the server |
|
|
a pre-formatted payload containing query parameters and a placeholder, designed for submission to an AI service for processing |
|
|
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 |
|---|---|---|
|
|
the id of the artificial intelligence server |
|
|
the name of the artificial intelligence server |
|
|
the url of the remote artificial intelligence server |
|
|
the authentication policy of the artificial intelligence server APP_LEVEL by default |
|
|
the authentication protocol of the artificial intelligence server TOKEN_AUTH by default |
|
|
a pre-formatted payload containing query parameters and a placeholder, designed for submission to an AI service for processing |
|
|
a description of the server |
|
|
a string expression used to navigate and extract specific nodes to access the generated answer in the response |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this ai server |
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
| Parameter | Description |
|---|---|
|
the id of the ai server |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the name of the ai server |
|
|
the url of the ai server |
|
|
a description of the server |
|
|
a pre-formatted payload containing query parameters and a placeholder, designed for submission to an AI service for processing |
|
|
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 |
|---|---|---|
|
|
the id of the artificial intelligence server |
|
|
the name of the artificial intelligence server |
|
|
the url of the remote artificial intelligence server |
|
|
the authentication policy of the artificial intelligence server (APP_LEVEL by default) |
|
|
the authentication protocol of the artificial intelligence server (TOKEN_AUTH by default) |
|
|
a pre-formatted payload containing query parameters and a placeholder, designed for submission to an AI service for processing |
|
|
a description of the server |
|
|
a string expression used to navigate and extract specific nodes to access the generated answer in the response |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this ai server |
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
| Parameter | Description |
|---|---|
|
a list of ids of the ai servers to delete |
Example response
HTTP/1.1 204 No Content
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
| Parameter | Description |
|---|---|
|
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 of credentials, it can only be token-auth-credentials |
|
|
related links |
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
| Parameter | Description |
|---|---|
|
the id of the ai server |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the credentials: token-auth-credentials |
|
|
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 |
|---|---|---|
|
|
the type of the credentials: token-auth-credentials |
|
|
related links |
Test Automation Servers
This chapter focuses on test automation servers.
Get all test automation servers
A GET to /test-automation-servers returns all the test automation servers that the 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
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
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 |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get test automation server
A GET to /test-automation-servers/{id} returns the test automation server with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the test automation server |
HTTP request
GET /api/rest/latest/test-automation-servers/569 HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the id of the test automation server |
|
|
the type of the entity |
|
|
the name of the test automation server |
|
|
for a Squash Orchestrator server, the URL of the receptionist endpoint ; for a Jenkins server, the URL where to reach the jenkins server |
|
|
the url for the observer endpoint, defaults is the receptionist url (for a Squash Orchestrator server only) |
|
|
the url for the event bus, defaults is the receptionist url (for a Squash Orchestrator server only) |
|
|
the url for the killswitch endpoint, defaults is the receptionist url (for a Squash Orchestrator server only) |
|
|
the kind of the test automation server, can be jenkins (default) or squashOrchestrator |
|
|
whether the test automation server is manual agent or not |
|
|
the description of the test automation server |
|
|
the user who created the test automation server |
|
|
the date the test automation server was created |
|
|
the user who last modified the test automation server |
|
|
the date the test automation server was last modified |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this test automation server |
Create test automation server
A POST to /test-automation-servers creates a new test automation server. This endpoint is not available for users of the Squash Cloud offer.
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: 171
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 |
|---|---|---|
|
|
the name of the test automation server (mandatory) |
|
|
the url of the test automation server (mandatory) |
|
|
the kind of the test automation server, defaults is 'jenkins' |
|
|
whether the test automation server is manual agent or not |
|
|
the description of the test automation server |
Query parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the test automation server |
|
|
the name of the test automation server |
|
|
the url where to reach the test automation server |
|
|
the kind of the test automation server, should be 'jenkins' here |
|
|
this field is not used for type squashOrchestrator |
|
|
the description of the test automation server |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this test automation server |
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 |
|---|---|---|
|
|
the name of the test automation server (mandatory) |
|
|
the url for the receptionist endpoint (mandatory) |
|
|
the url for the observer endpoint, defaults is the receptionist url (for a Squash Orchestrator server only) |
|
|
the url for the event bus, defaults is the receptionist url (for a Squash Orchestrator server only) |
|
|
the url for the killswitch endpoint, defaults is the receptionist url (for a Squash Orchestrator server only) |
|
|
the kind of the test automation server, must be squashOrchestrator here |
|
|
the description of the test automation server |
Query parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the test automation server |
|
|
the name of the test automation server |
|
|
the url for the receptionist endpoint |
|
|
the url for the observer endpoint |
|
|
the url for the event bus endpoint |
|
|
the url for the killswitch endpoint |
|
|
the kind of the test automation server, should be 'squashOrchestrator' here |
|
|
this field is not used for type squashOrchestrator |
|
|
the description of the test automation server |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this test automation server |
Modify test automation server
A PATCH to /test-automation-servers/{id} modifies the test automation server with the given id. This endpoint is not available for users of the Squash Cloud offer.
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
| Parameter | Description |
|---|---|
|
the id of the test automation server |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the name of the test automation server |
|
|
the url of the test automation server |
|
|
whether the test automation server is manual agent or not |
|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the test automation server |
|
|
the name of the test automation server |
|
|
the url where to reach the test automation server |
|
|
the kind of the test automation server, should be 'jenkins' here |
|
|
whether the test automation server is manual agent or not |
|
|
the description of the test automation server |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this test automation server |
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
| Parameter | Description |
|---|---|
|
the id of the test automation server |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the name of the test automation server |
|
|
the url of the test automation server |
|
|
the url for the observer endpoint, defaults is the receptionist url (for a Squash Orchestrator server only) |
|
|
the url for the event bus, defaults is the receptionist url (for a Squash Orchestrator server only) |
|
|
the url for the killswitch endpoint, defaults is the receptionist url (for a Squash Orchestrator server only) |
|
|
whether the test automation server is manual agent or not |
|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the test automation server |
|
|
the name of the test automation server |
|
|
the url where to reach the test automation server |
|
|
the url for the observer endpoint |
|
|
the url for the event bus endpoint |
|
|
the url for the killswitch endpoint |
|
|
the kind of the test automation server, should be 'squashOrchestrator' here |
|
|
this field is not used for type squashOrchestrator |
|
|
the description of the test automation server |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this test automation server |
Delete test automation server
A DELETE to /test-automation-servers/{ids} deletes one or several test automation server(s) with the given id(s). This endpoint is not available for users of the Squash Cloud offer.
Path parameters
| Parameter | Description |
|---|---|
|
the list of ids of the test automation servers |
HTTP request
DELETE /api/rest/latest/test-automation-servers/11,12 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 204 No Content
Get test automation server credentials
A GET to /test-automation-servers/{id}/credentials get the credentials for the given test automation server.
HTTP request
GET /api/rest/latest/test-automation-servers/1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the test automation server |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 206
{
"_type" : "basic-auth-credentials",
"username" : "user@henix.fr",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-automation-servers/1/credentials"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the credentials |
|
|
the username to authenticate to this test automation server |
|
|
related links |
Set test automation server credentials
A POST to /test-automation-servers/{id}/credentials set credentials for the given test automation server. This endpoint is not available for users of the Squash Cloud offer.
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
| Parameter | Description |
|---|---|
|
the id of the test automation server |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the credentials |
|
|
the username to authenticate to this test automation server |
|
|
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 |
|---|---|---|
|
|
the type of the credentials |
|
|
the username to authenticate to this test automation server |
|
|
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
| Parameter | Description |
|---|---|
|
the id of the test automation server |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the credentials |
|
|
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 |
|---|---|---|
|
|
the type of the credentials |
|
|
related links |
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
| Parameter | Description |
|---|---|
|
the id of the test automation server |
|
ids of the environment variables |
Example response
HTTP/1.1 200 OK
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
| Parameter | Description |
|---|---|
|
the id of the test automation server |
|
ids of the environment variables |
Example response
HTTP/1.1 204 No Content
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
| Parameter | Description |
|---|---|
|
the id of the test automation server |
|
id of the environment variable |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
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"
}
Banner Message
This chapter focuses on the message showing in a banner on top of all pages.
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the message to show on the banner |
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 |
|---|---|---|
|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
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 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
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
which type of the element should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1632
{
"_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_2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/2"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get bug tracker
A GET to /bug-trackers/{id} returns the bug tracker with the given id.
HTTP request
GET /api/rest/latest/bug-trackers/3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the bug-tracker |
Example response
HTTP/1.1 200 OK
Content-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 |
|---|---|---|
|
|
the id of the entity |
|
|
the type of the entity |
|
|
name of the bug-tracker |
|
|
url of the bugtracker |
|
|
kind of the bugtracker : mantis or jira |
|
|
a description of the server |
|
|
the user who created the info list |
|
|
the creation date of the info list |
|
|
the last user who modified the info list |
|
|
the last modification date of the info list |
|
|
the bugtracker displays in iframe |
|
|
authentication Policy : USER or APP |
|
|
Protocol of authentification: Basic Auth or Oauth 1 |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this bugtracker |
Create bug tracker
A POST to /bug-trackers creates a new bug tracker.
HTTP request
POST /api/rest/latest/bug-trackers HTTP/1.1
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the name of bug tracker |
|
|
the url of the bug tracker |
|
|
the kind of the bug tracker |
|
|
a description of the server |
|
|
the description of the bug tracker |
|
|
the authentication Policy of the bug tracker : 'USER' or 'APP_LEVEL' |
|
|
the authentication Protocol of the bug tracker: 'BASIC_AUTH' or 'OAUTH_A1' |
Example response
HTTP/1.1 201 Created
Content-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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the bug tracker |
|
|
the name of the bug tracker |
|
|
the url of the bug tracker |
|
|
the kind of the bug tracker |
|
|
a description of the server |
|
|
the description of the bug tracker |
|
|
the authentication Policy of the bug tracker: 'USER' or 'APP_LEVEL' |
|
|
the authentication Protocol of the bug tracker: 'BASIC_AUTH' or 'OAUTH_A1' |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this bug tracker |
Modify bug tracker
A PATCH to /bug-trackers/{id} modifies the bug trackers with the given id.
HTTP request
PATCH /api/rest/latest/bug-trackers/4 HTTP/1.1
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
| Parameter | Description |
|---|---|
|
the id of the bugtracker you want to update |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the name of bug tracker |
|
|
the url of the bug tracker |
|
|
the kind of the bug tracker |
|
|
a description of the server |
|
|
the description of the bug tracker |
|
|
the authentication Policy of the bug tracker: 'USER' or 'APP_LEVEL' |
|
|
the authentication Protocol of the bug tracker: 'BASIC_AUTH' or 'OAUTH_A1' |
Example response
HTTP/1.1 200 OK
Content-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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the bugtracker |
|
|
the name of the bugtracker |
|
|
the url of the bugtracker |
|
|
the kind of the bugtracker |
|
|
a description of the server |
|
|
the description of the bugtracker |
|
|
the authentication Policy of the bugtracker: 'USER' or 'APP_LEVEL' |
|
|
the authentication Protocol of the bugtracker: 'BASIC_AUTH' or 'OAUTH_A1' |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this bug tracker |
Delete bug tracker
A DELETE to /bug-trackers/{ids} deletes one or several bug tracker(s) with the given id(s).
HTTP request
DELETE /api/rest/latest/bug-trackers/2,3 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
a list id of the bugtracker |
Get bug tracker credentials
A GET to /bug-trackers/{id}/credentials get the credentials of the bug tracker with the given id.
In case of basic auth credentials
HTTP request
GET /api/rest/latest/bug-trackers/1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
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 of credentials, it can be basic-auth-credentials or token-auth-credentials |
|
|
the username to authenticate to this bug tracker |
|
|
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
| Parameter | Description |
|---|---|
|
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 of credentials, it can be basic-auth-credentials, oauth-2-credentials or token-auth-credentials |
|
|
related links |
In case of oauth 2 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
| Parameter | Description |
|---|---|
|
the id of the bug-tracker |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 160
{
"_type" : "oauth-2-credentials",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/1/credentials"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
type of credentials, it can be basic-auth-credentials, oauth-2-credentials or token-auth-credentials |
|
|
related links |
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
| Parameter | Description |
|---|---|
|
the id of the bug tracker |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the credentials: basic-auth-credentials, oauth-2-credentials or token-auth-credentials |
|
|
the username to authenticate to this bug tracker |
|
|
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 |
|---|---|---|
|
|
the type of the credentials: basic-auth-credentials, oauth-2-credentials or token-auth-credentials |
|
|
the username to authenticate to this bug tracker |
|
|
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
| Parameter | Description |
|---|---|
|
the id of the bug tracker |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the credentials: basic-auth-credentials, oauth-2-credentials or token-auth-credentials |
|
|
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 |
|---|---|---|
|
|
the type of the credentials: basic-auth-credentials, oauth-2-credentials or token-auth-credentials |
|
|
related links |
Get bug tracker authentication configuration
A GET to /bug-trackers/{id}/auth-configuration get the authentication configuration of the bug tracker with the given id.
Only a bug tracker using OAuth 2 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
| Parameter | Description |
|---|---|
|
the id of the bug-tracker |
Response example is for a Jira Data Center
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 458
{
"_type" : "oauth-2-configuration",
"grant_type" : "code",
"client_id" : "<client_id>",
"authorization_url" : "https://jira.org/rest/oauth2/latest/authorize",
"request_token_url" : "https://jira.org/rest/oauth2/latest/token",
"callback_url" : "https://squash.net/squash/oauth2/authentication",
"scope" : "WRITE",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/1/auth-configuration"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of configuration |
|
|
specifies the OAuth 2.0 flow being used (squash only uses code) |
|
|
a unique identifier assigned to the application by the authorization server during registration |
|
|
the URL where the user is directed to authorize the application |
|
|
the URL used to exchange an authorization code for an access token or to directly request a token in other grant flows |
|
|
the URL where the authorization server redirects the user after they have authorized the application |
|
|
a space-separated list of permissions the application is requesting access to |
|
|
related links |
Set bug tracker authentication configuration
Post and response examples are for a Jira Data Center
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 2 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: 342
Host: localhost:8080
{
"_type" : "oauth-2-configuration",
"client_id" : "<client_id>",
"client_secret" : "<client_secret>",
"authorization_url" : "https://jira.org/rest/oauth2/latest/authorize",
"request_token_url" : "https://jira.org/rest/oauth2/latest/token",
"callback_url" : "https://squash.net/squash/oauth2/authentication",
"scope" : "WRITE"
}
Path parameters
| Parameter | Description |
|---|---|
|
the id of the bug tracker |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of configuration |
|
|
a unique identifier assigned to the application by the authorization server during registration |
|
|
a confidential key assigned to the application, used to authenticate with the authorization server |
|
|
the URL where the user is directed to authorize the application |
|
|
the URL used to exchange an authorization code for an access token or to directly request a token in other grant flows |
|
|
the URL where the authorization server redirects the user after they have authorized the application |
|
|
a space-separated list of permissions the application is requesting access to |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 458
{
"_type" : "oauth-2-configuration",
"grant_type" : "code",
"client_id" : "<client_id>",
"authorization_url" : "https://jira.org/rest/oauth2/latest/authorize",
"request_token_url" : "https://jira.org/rest/oauth2/latest/token",
"callback_url" : "https://squash.net/squash/oauth2/authentication",
"scope" : "WRITE",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/1/auth-configuration"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of configuration |
|
|
specifies the OAuth 2.0 flow being used (squash only uses code) |
|
|
a unique identifier assigned to the application by the authorization server during registration |
|
|
the URL where the user is directed to authorize the application |
|
|
the URL used to exchange an authorization code for an access token or to directly request a token in other grant flows |
|
|
the URL where the authorization server redirects the user after they have authorized the application |
|
|
a space-separated list of permissions the application is requesting access to |
|
|
related links |
System Configuration
This chapter focuses on the system configuration of of Squash TM.
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 |
|---|---|---|
|
|
the type of the entity |
|
|
upload extention whitelist of Squash TM |
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 |
|---|---|---|
|
|
the type of the entity |
|
|
defines the list of allowed file extensions for uploads in 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 |
|---|---|---|
|
|
the type of the entity |
|
|
defines the list of allowed file extensions for uploads in Squash TM |
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 |
|---|---|---|
|
|
the type of the entity |
|
|
upload size limit of Squash TM |
Set upload size limit
A POST to /configuration/upload-size-limit set the upload size limit. This endpoint is not available for users of the Squash Cloud offer.
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 |
|---|---|---|
|
|
the type of the entity |
|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the upload size limit of Squash TM |
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 |
|---|---|---|
|
|
the type of the entity |
|
|
Import size limit of Squash TM |
Set import size limit
A POST to /configuration/import-size-limit set the import size limit. This endpoint is not available for users of the Squash Cloud offer.
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 |
|---|---|---|
|
|
the type of the entity |
|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the import size limit of Squash TM |
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 |
|---|---|---|
|
|
the type of the entity |
|
|
callback url of Squash TM |
Set squash callback url
A POST to /configuration/squash-callback-url set the squash callback url. This endpoint is not available for users of the Squash Cloud offer.
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 |
|---|---|---|
|
|
the type of the entity |
|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the callback url of Squash TM |
Get case insensitive login
A GET to /configuration/case-insensitive-login returns whether case insensitive login is enabled or disabled.
HTTP request
GET /api/rest/latest/configuration/case-insensitive-login HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 29
"case insentive login: false"
Enable/disable case insensitive login
A POST to /configuration/case-insensitive-login?enabled=true enables case insensitive login.
When this option is enabled, you cannot create duplicated logins containing lowercase and uppercase.
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
Query parameters
| Parameter | Description |
|---|---|
|
takes the values true/false to enable/disable login case insensitivity. |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 28
"case insentive login: true"
Get case insensitive action word
A GET to /configuration/case-insensitive-action-word returns whether case insensitive action word is enabled or disabled.
HTTP request
GET /api/rest/latest/configuration/case-insensitive-action-word HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 35
"case insentive action word: false"
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 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
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
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 |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get custom field
A GET to /custom-fields/{id} returns the custom field with the given ID.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the custom-field |
HTTP request
GET /api/rest/latest/custom-fields/3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the id of the entity |
|
|
the type of the entity |
|
|
name of the custom-field |
|
|
code of the custom-field |
|
|
label of the custom-field |
|
|
the type of custom-field |
|
|
default value of the custom-field |
|
|
if the custom-field is optionnal or not |
|
|
all the options of the custom-field |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this custom-field |
Create custom field
A POST to /custom-fields creates a new custom field.
HTTP request
POST /api/rest/latest/custom-fields HTTP/1.1
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the type of the custom field: DROPDOWN_LIST,PLAIN_TEXT |
|
|
the label of the custom field |
|
|
the code of the custom field |
|
|
the name of the custom field |
|
|
the default value of the custom field |
|
|
if the custom field is optional or not |
|
|
an array of custom fields |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 333
{
"_type" : "custom-field",
"id" : 4,
"name" : "cuf date",
"code" : "code date",
"label" : "label date",
"optional" : true,
"options" : [ ],
"input_type" : "DATE_PICKER",
"default_value" : "2020-04-22",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/custom-fields/4"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
id of the entity |
|
|
the type of the custom field: DROPDOWN_LIST,PLAIN_TEXT |
|
|
the label of the custom field |
|
|
the code of the custom field |
|
|
the name of the custom field |
|
|
the default value of the custom field |
|
|
if the custom field is optional or not |
|
|
an array of custom fields |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this custom-fields |
Modify custom field
A PATCH to /custom-fields/{id} modifies the custom field with the given id.
HTTP request
PATCH /api/rest/latest/custom-fields/5 HTTP/1.1
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
| Parameter | Description |
|---|---|
|
the id of the custom field |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the type of the custom field: DROPDOWN_LIST,PLAIN_TEXT |
|
|
the label of the custom field |
|
|
the code of the custom field |
|
|
the name of the custom field |
|
|
the default value of the custom field |
|
|
if the custom field is optional or not |
|
|
an array of custom fields |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 338
{
"_type" : "custom-field",
"id" : 5,
"name" : "cuf text",
"code" : "code text",
"label" : "label text",
"optional" : true,
"options" : [ ],
"input_type" : "PLAIN_TEXT",
"default_value" : "ceci est un test",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/custom-fields/5"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
id of the entity |
|
|
the type of the custom field: DROPDOWN_LIST,PLAIN_TEXT |
|
|
the label of the custom field |
|
|
the code of the custom field |
|
|
the name of the custom field |
|
|
the default value of the custom field |
|
|
if the custom field is optional or not |
|
|
an array of custom fields |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this custom-fields |
Delete custom field
A DELETE to /custom-fields/{ids} deletes the custom field(s) with the given id(s).
HTTP request
DELETE /api/rest/latest/custom-fields/2,3 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
a list id of the custom-fields to delete |
Example response
HTTP/1.1 204 No Content
|
|
Features about custom field options must be modified. |
Add custom field option
A POST to /custom-fields/{id}/options adds option to the custom field with the given id .
HTTP request
POST /api/rest/latest/custom-fields/7/options HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 71
Host: localhost:8080
{
"label" : "opt1",
"code" : "code opt 1",
"colour" : "#ff8000"
}
Path parameters
| Parameter | Description |
|---|---|
|
the id of the custom-field |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the label of the custom field option |
|
|
the code of the custom field option |
|
|
the colour of the custom field option |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 465
{
"_type" : "custom-field",
"id" : 7,
"name" : "cuf ddl",
"code" : "code ddl",
"label" : "label ddl",
"optional" : true,
"options" : [ {
"label" : "opt1",
"code" : "1",
"colour" : "#ffffff"
}, {
"label" : "opt2",
"code" : "2",
"colour" : "#ff8000"
} ],
"input_type" : "DROPDOWN_LIST",
"default_value" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/custom-fields/7"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the custom-field |
|
|
the input type of the custom-field |
|
|
the name of the custom-field |
|
|
the code of the custom-field |
|
|
the label of the custom-field |
|
|
the code of the custom-field |
|
|
whe custom-field |
|
|
the custom-field’s options |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this custom-field |
Update custom field option label
A PATCH to /custom-fields/{id}/options/{optionLabel}/label/{newValue} modifies the label of the option with given original label .
HTTP request
PATCH /api/rest/latest/custom-fields/6/options/opt/label/opt1 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the custom-fields |
|
the label of the option to update |
|
the new label of the custom-fields |
Example response
HTTP/1.1 200 OK
Content-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 |
|---|---|---|
|
|
the type of the entity |
|
|
id of the entity |
|
|
the type of the custom field: DROPDOWN_LIST,PLAIN_TEXT |
|
|
the label of the custom field |
|
|
the code of the custom field |
|
|
the name of the custom field |
|
|
the default value of the custom field |
|
|
if the custom field is optional or not |
|
|
an array of custom fields |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this custom-fields |
Environment Variables
This chapter focuses on environment variables.
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
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
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 |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get environment variable
A GET to /environment-variables/{id} returns the environment variable with the given ID.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the environment-variable |
HTTP request
GET /api/rest/latest/environment-variables/3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the id of the entity |
|
|
the type of the entity |
|
|
name of the environment-variable |
|
|
the type of environment-variable |
|
|
all the options of the environment-variable |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this environment-variable |
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the type of the environment variable: DROPDOWN_LIST, PLAIN_TEXT, INTERPRETED_TEXT |
|
|
the name of the environment variable |
|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
id of the entity |
|
|
the type of the environment variable: DROPDOWN_LIST, PLAIN_TEXT, INTERPRETED_TEXT |
|
|
the name of the environment variable |
|
|
the array of environment variable options (for DROPDOWN_LIST) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this environment-variable |
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
| Parameter | Description |
|---|---|
|
a list id of the environment-variables to delete |
Example response
HTTP/1.1 204 No Content
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
| Parameter | Description |
|---|---|
|
the id of the environment variable |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
id of the entity |
|
|
the type of the environment variable: DROPDOWN_LIST, PLAIN_TEXT, INTERPRETED_TEXT |
|
|
the name of the environment variable |
|
|
an array of environment variable options |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this environment-variables |
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
| Parameter | Description |
|---|---|
|
the id of the environment-variable |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the environment variable |
|
|
the input type of the environment variable |
|
|
the name of the environment variable |
|
|
the environment variable’s options |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this environment variable |
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
| Parameter | Description |
|---|---|
|
the id of the environment variable to update |
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
id of the entity |
|
|
the type of the environment variable: DROPDOWN_LIST, PLAIN_TEXT, INTERPRETED_TEXT |
|
|
the name of the environment variable |
|
|
an array of environment variable options |
|
|
related links |
|
|
the name of the option |
|
|
the position of the option in the dropdown list of the environment variable |
Links
| Relation | Description |
|---|---|
|
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
| Parameter | Description |
|---|---|
|
a list id of the environment-variables to delete |
Example response
HTTP/1.1 204 No Content
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
| Parameter | Description |
|---|---|
|
id of the entity |
|
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 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
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
which type of the element should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1624
{
"_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
} ],
"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
} ],
"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 |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get info list
A GET to /info-lists/{id} returns the info list with the given id.
HTTP request
GET /api/rest/latest/info-lists/3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the info list |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 580
{
"_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
} ],
"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 |
|---|---|---|
|
|
the id of the entity |
|
|
the type of the entity |
|
|
the label of the info list |
|
|
the description of the info list |
|
|
the code of the info list |
|
|
the items of the info list |
|
|
the user who created the info list |
|
|
the creation date of the info list |
|
|
the last user who modified the info list |
|
|
the last modification date of the info list |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this info list |
Create info list
A POST to /info-lists creates a new info list.
HTTP request
POST /api/rest/latest/info-lists HTTP/1.1
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the label of the info list |
|
|
the status of the info list |
|
|
the description of the info list |
|
|
the info list’s items |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 494
{
"_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
} ],
"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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the info list |
|
|
the label of the info list |
|
|
the status of the info list |
|
|
the description of the info list |
|
|
an array of info list items |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this info list |
Modify info list
A PATCH to /info-lists/{id} modifies the info list with the given id.
HTTP request
PATCH /api/rest/latest/info-lists/4 HTTP/1.1
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
| Parameter | Description |
|---|---|
|
the id of the info list |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the label of the info list |
|
|
the status of the info list |
|
|
the description of the info list |
|
|
an array of info list items |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 580
{
"_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
} ],
"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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the info list |
|
|
the label of the info list |
|
|
the status of the info list |
|
|
the description of the info list |
|
|
an array of info list items |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this info list |
Delete info list
A DELETE to /info-lists/{ids} deletes the info list(s) with the given id(s).
If associated with at least one project, the objects will permanently be disassociated with the info list(s). The default list will be activated and the values associated to the objects will be reset to the default 'Undefined' value.
HTTP request
DELETE /api/rest/latest/info-lists/2,3 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the ids of the info list to delete |
Example response
HTTP/1.1 204 No Content
Info List Items
This chapter focuses on info list items.
Get info list item
A GET to /info-list-items/{id} returns the info list item with the given id.
HTTP request
GET /api/rest/latest/info-list-items/3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the info list item |
Example response
HTTP/1.1 200 OK
Content-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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the entity |
|
|
the label of the info list item |
|
|
the code of the info list item |
|
|
the name of the icon of the info list item |
|
|
the colour of the info list item (hexadecimal) |
|
|
boolean which indicates if the info list item is the default one |
|
|
the info list this item is part of |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this info list item |
Create info list item
A POST to /info-lists/{id}/items creates a new info list item.
HTTP request
POST /api/rest/latest/info-lists/4/items HTTP/1.1
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
| Parameter | Description |
|---|---|
|
the id of the info list |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the label of the info list item |
|
|
the code of the info list item |
|
|
the name of the icon of the info list item |
|
|
the colour of the info list item (hexadecimal) |
Example response
HTTP/1.1 201 Created
Content-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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the info list item |
|
|
the label of the info list item |
|
|
the code of the info list item |
|
|
the name of the icon of the info list item |
|
|
the colour of the info list item (hexadecimal) |
|
|
boolean which indicates if the info list item is the default one |
|
|
the info list this item is part of |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this info list item |
Modify info list item
A PATCH to /info-list-items/{id} modifies the info list item with the given id.
HTTP request
PATCH /api/rest/latest/info-list-items/4 HTTP/1.1
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
| Parameter | Description |
|---|---|
|
the id of the info list item |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the label of the info list item |
|
|
the code of the info list item |
|
|
the name of the icon of the info list item |
|
|
the colour of the info list item (hexadecimal) |
|
|
boolean which indicates if the info list item is the default one |
Example response
HTTP/1.1 200 OK
Content-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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the info list item |
|
|
the label of the info list item |
|
|
the code of the info list item |
|
|
the name of the icon of the info list item |
|
|
the colour of the info list item (hexadecimal) |
|
|
boolean which indicates if the info list item is the default one |
|
|
the info list this item is part of |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this info list item |
Delete info list item
A DELETE to /info-list-items/{id} deletes the info list item with the given id.
If the info list item to delete is the default one, then it cannot be deleted.
HTTP request
DELETE /api/rest/latest/info-list-items/2 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the info list item |
Example response
HTTP/1.1 204 No Content
License Information
This chapter focuses on information from the license file.
Get information from the Premium license file
A GET to /license/info returns information from the Premium license file.
HTTP request
GET /api/rest/latest/license/info HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
max users number allowed by the license |
|
|
expiration date of the license |
|
|
all the license plugins |
|
|
the type of the license plugins |
|
|
key of the license plugin |
|
|
availability of the plugin by the license |
|
|
indicates if the license is valid : expiration date + a tolerance period |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the license information |
Login Message
This chapter focuses on the message showing in Squash TM Login Page.
Get login message
A GET to /login-message returns the login message.
HTTP request
GET /api/rest/latest/login-message HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 70
{
"_type" : "login-message",
"message" : "<h1>login Message<h1>"
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the message to show on the login page of Squash TM |
Modify login message
A PATCH to /login-message modifies the login message.
HTTP request
PATCH /api/rest/latest/login-message HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 41
Host: localhost:8080
{
"message" : "<h1>login Message<h1>"
}
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the message to show on the login page of Squash TM (mandatory) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 70
{
"_type" : "login-message",
"message" : "<h1>login Message<h1>"
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the message to show on the login page of Squash TM |
Milestones
This chapter focuses on milestones. Milestones allow you to “version” your test repository and to view only the objects (requirements, test cases and campaigns) associated with them. With milestones, you can in particular organize your object libraries by version, create a new version of the repository from an existing version, synchronize two versions …
Activate / deactivate milestones mode
A POST to /milestones/activate activate / deactivate milestones mode, according to the value sent in the parameter.
HTTP request
POST /api/rest/latest/milestones/activate?enabled=true HTTP/1.1
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
takes the values true/false to activate/deactivate the milestone mode. |
Example response
HTTP/1.1 204 No Content
Get all milestones
A GET to /milestones returns all the milestones that the user is allowed to read.
HTTP request
GET /api/rest/latest/milestones HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
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 |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get milestone
A GET to /milestones/{id} returns the milestone with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the milestone |
HTTP request
GET /api/rest/latest/milestones/11 HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the milestone |
|
|
the label of the milestone |
|
|
the description of the milestone |
|
|
the status of the milestone |
|
|
due date of the milestone |
|
|
range of the milestone |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this milestone |
Create milestone
A POST to /milestones creates a new milestone.
HTTP request
POST /api/rest/latest/milestones HTTP/1.1
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 |
|---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the label of the milestone (mandatory) |
|
|
the description of the milestone |
|
|
the status of the milestone. |
|
|
due date of the milestone (mandatory) |
Example response
HTTP/1.1 201 Created
Content-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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the milestone |
|
|
the label of the milestone |
|
|
the description of the milestone |
|
|
the status of the milestone |
|
|
due date of the milestone |
|
|
range of the milestone |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this milestone |
Modify milestone
A PATCH to /milestones/{id} modifies the milestone with the given id.
HTTP request
PATCH /api/rest/latest/milestones/11 HTTP/1.1
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
| Parameter | Description |
|---|---|
|
the id of the milestone |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the label of the milestone |
|
|
the description of the milestone |
|
|
the status of the milestone. |
|
|
due date of the milestone |
|
|
range of the milestone |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the milestone |
|
|
the label of the milestone |
|
|
the description of the milestone |
|
|
the status of the milestone |
|
|
due date of the milestone |
|
|
range of the milestone |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this milestone |
Delete milestone
A DELETE to /milestones/{ids} deletes one or several milestone(s) with the given id(s).
Path parameters
| Parameter | Description |
|---|---|
|
the list of ids of the milestones |
HTTP request
DELETE /api/rest/latest/milestones/11,12 HTTP/1.1
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 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 |
|---|---|---|
|
|
all the standard projects |
|
|
all the project templates |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get only standard projects (without project template)
HTTP request
GET /api/rest/latest/projects?type=STANDARD HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
all the standard projects |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get only project templates
HTTP request
GET /api/rest/latest/projects?type=TEMPLATE HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
all the project templates |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get project
A GET to /projects/{id} returns the project with the given id. This retrieves a project administration data and is only authorized to administrators.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/367 HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 890
{
"_type" : "project",
"id" : 367,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"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"
},
"clearances" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/clearances"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/attachments"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the id of the project |
|
|
the type of the entity |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
the attachments of the project |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this project |
|
link to the requirement library content for this project |
|
link to the test case library content for this project |
|
link to the execution library content for this project |
|
link to the clearances for this project |
|
link to the attachments for this project |
Get project by name
A GET to /projects with a request parameter projectName returns the project with the given name.
This retrieves a project administration data and is only authorized to administrators.
Be careful, both the name of the parameter projectName and the value of the project name are case-sensitive.
HTTP request
GET /api/rest/latest/projects?projectName=sample+project HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
the name of the project |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 886
{
"_type" : "project",
"id" : 367,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"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"
},
"clearances" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/clearances"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/projects/attachments"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the id of the project |
|
|
the type of the entity |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
the attachments of the project |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this project |
|
link to the requirement library content for this project |
|
link to the test case library content for this project |
|
link to the execution library content for this project |
|
link to the clearances for this project |
|
link to the attachments for this project |
Create project
A POST to /projects creates a new project.
Create new project
HTTP request
POST /api/rest/latest/projects HTTP/1.1
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 |
|---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
Query parameters
| Parameter | Description |
|---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 651
{
"_type" : "project",
"id" : 333,
"description" : "<p>do something meaningful</p>",
"label" : "no price tag",
"name" : "sample project",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333"
},
"requirements" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/requirements-library/content"
},
"test-cases" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/test-cases-library/content"
},
"campaigns" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/campaigns-library/content"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the id of the project |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this project |
|
link to the requirement library content for this project |
|
link to the test case library content for this project |
|
link to the execution library content for 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: 636
Host: localhost:8080
{
"_type" : "project",
"name" : "sample project",
"label" : "no price tag",
"description" : "<p>do something meaningful</p>",
"template_id" : 23,
"params" : {
"copy_permissions" : true,
"copy_cuf" : true,
"copy_bugtracker_binding" : true,
"copy_ai_server_binding" : true,
"copy_automated_projects" : true,
"copy_infolists" : true,
"copy_milestone" : true,
"copy_allow_tc_modif_from_exec" : true,
"copy_optional_exec_statuses" : true,
"copy_plugins_activation" : true,
"keep_template_binding" : true,
"copy_plugins_configuration" : true,
"keep_plugins_binding" : true
}
}
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
the id of project template |
|
|
the parameters to create a new project from template |
|
|
whether the template’s permissions will be copied or not |
|
|
whether the template’s custom fields will be copied or not |
|
|
whether the template’s bugtracker will be copied or not |
|
|
whether the project’s ai server will be linked to the template’s |
|
|
whether the template’s test automation management will be copied or not |
|
|
whether the template’s information lists will be copied or not |
|
|
whether the template’s milestones will be copied or not |
|
|
whether the template’s execution option will be copied or not |
|
|
whether the template’s optional execution statuses will be copied or not |
|
|
whether the template’s plugins activation will be copied or not |
|
|
whether the template binding will be kept or not (true by default) |
|
|
whether the template’s plugins configuration will be copied or not |
|
|
whether the project’s plugins configuration will be tied to the template’s plugin configuration |
Query parameters
| Parameter | Description |
|---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 651
{
"_type" : "project",
"id" : 333,
"description" : "<p>do something meaningful</p>",
"label" : "no price tag",
"name" : "sample project",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333"
},
"requirements" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/requirements-library/content"
},
"test-cases" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/test-cases-library/content"
},
"campaigns" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/campaigns-library/content"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the id of the project |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this project |
|
link to the requirement library content for this project |
|
link to the test case library content for this project |
|
link to the execution library content for this project |
Create project template
A POST to /projects creates a new project template.
Create new template
HTTP request
POST /api/rest/latest/projects HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 152
Host: localhost:8080
{
"_type" : "project-template",
"name" : "sample project template",
"label" : "no price tag",
"description" : "<p>do something meaningful</p>"
}
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the name of the project template |
|
|
the label of the project template |
|
|
the description of the project template |
Query parameters
| Parameter | Description |
|---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 669
{
"_type" : "project-template",
"id" : 333,
"description" : "<p>do something meaningful</p>",
"label" : "no price tag",
"name" : "sample project template",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333"
},
"requirements" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/requirements-library/content"
},
"test-cases" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/test-cases-library/content"
},
"campaigns" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/campaigns-library/content"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the id of the project template |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this project |
|
link to the requirement library content for this project template |
|
link to the test case library content for this project template |
|
link to the execution library content for 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: 582
Host: localhost:8080
{
"_type" : "project-template",
"name" : "sample project template",
"label" : "no price tag",
"description" : "<p>do something meaningful</p>",
"project_id" : 55,
"params" : {
"copy_permissions" : true,
"copy_cuf" : true,
"copy_bugtracker_binding" : true,
"copy_automated_projects" : true,
"copy_ai_server_binding" : true,
"copy_optional_exec_statuses" : true,
"copy_plugins_activation" : true,
"copy_infolists" : true,
"copy_milestone" : true,
"copy_allow_tc_modif_from_exec" : true,
"copy_plugins_configuration" : true
}
}
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity (mandatory) |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
the id of project template |
|
|
the parameters to create a new project from template |
|
|
whether the project’s permissions will be copied or not |
|
|
whether the project’s custom fields will be copied or not |
|
|
whether the project’s bugtracker will be copied or not |
|
|
whether the project’s test automation management will be copied or not |
|
|
whether the project’s ai server will be linked to the template’s |
|
|
whether the template’s optional execution statuses will be copied or not |
|
|
whether the template’s plugins activation will be copied or not |
|
|
whether the project’s information lists will be copied or not |
|
|
whether the project’s milestones will be copied or not |
|
|
whether the project’s execution option will be copied or not |
|
|
whether the project’s plugins' configuration will be copied or not |
Query parameters
| Parameter | Description |
|---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 669
{
"_type" : "project-template",
"id" : 333,
"description" : "<p>do something meaningful</p>",
"label" : "no price tag",
"name" : "sample project template",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333"
},
"requirements" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/requirements-library/content"
},
"test-cases" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/test-cases-library/content"
},
"campaigns" : {
"href" : "http://localhost:8080/api/rest/latest/projects/333/campaigns-library/content"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the id of the project template |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this project |
|
link to the requirement library content for this project template |
|
link to the test case library content for this project template |
|
link to the execution library content for this project template |
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
| Parameter | Description |
|---|---|
|
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 project clearances
A GET to /projects/{id}/clearances returns the clearances grouped by profiles for the project with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/367/clearances HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1826
{
"content" : {
"test_runner" : {
"_type" : "profile",
"id" : 6,
"name" : "TestRunner",
"type" : "system",
"users" : [ {
"_type" : "team",
"id" : 567,
"name" : "Team A",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/567"
}
}
} ]
},
"test_designer" : {
"_type" : "profile",
"id" : 7,
"name" : "TestDesigner",
"type" : "system",
"users" : [ {
"_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"
}
}
} ]
},
"validator" : {
"_type" : "profile",
"id" : 9,
"name" : "Validator",
"type" : "system",
"users" : [ {
"_type" : "team",
"id" : 852,
"name" : "Team B",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/852"
}
}
} ]
},
"custom_tester" : {
"_type" : "profile",
"id" : 11,
"name" : "Custom Tester",
"type" : "custom",
"users" : [ {
"_type" : "team",
"id" : 853,
"name" : "Team C",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/853"
}
}
} ]
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/clearances"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
contains clearances grouped by profiles |
|
|
contains the profile attributes (example of the validator profile) |
|
|
the type of the entity |
|
|
the id of the profile |
|
|
the name of the profile |
|
|
system if the profile is a system profile, custom if the profile is a custom profile |
|
|
the list of users/teams linked to the profile |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
the link to this project clearances |
Get project clearances (deprecated)
A GET to /projects/{id}/permissions returns the clearances grouped by profiles for the project with the given id.
This endpoint is still functional but is deprecated. Please use the more comprehensive /projects/{id}/clearances endpoint instead.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/367/permissions HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1021
{
"content" : {
"test_runner" : [ {
"_type" : "team",
"id" : 567,
"name" : "Team A",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/567"
}
}
} ],
"test_designer" : [ {
"_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"
}
}
} ],
"validator" : [ {
"_type" : "team",
"id" : 852,
"name" : "Team B",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/852"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/permissions"
}
}
}
Links
| Relation | Description |
|---|---|
|
the link to this project clearances |
Add clearances to project
A POST to /projects/{projectId}/clearances/{profileId}/users/{partyIds} adds users or teams to the profile for the project with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
the id of the profile |
|
the ids of the users/teams |
HTTP request
POST /api/rest/latest/projects/367/clearances/4/users/486,521 HTTP/1.1
Accept: application/json
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 731
{
"content" : {
"test_designer" : {
"_type" : "profile",
"id" : 7,
"name" : "TestDesigner",
"type" : "system",
"users" : [ {
"_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/clearances"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
contains the added clearance |
|
|
contains the profile attributes (example of the test designer profile) |
|
|
the type of the entity |
|
|
the id of the profile |
|
|
the name of the profile |
|
|
system if the profile is a system profile, custom if the profile is a custom profile |
|
|
the list of users/teams linked to the profile |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
the link to this project clearances |
Add clearances to project (deprecated - only for system profiles)
A POST to /projects/{projectId}/permissions/{permissionGroup} adds users or teams to the system profile for the project with the given id.
The possible {permissionGroup} are test_editor, project_viewer, project_manager, test_runner, test_designer, advanced_tester and validator.
This endpoint is still functional but is deprecated. Please use the more comprehensive /projects/{projectId}/clearances/{profileId}/users/{partyIds} endpoint instead.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
the profile in which the users/teams will be added |
HTTP request
POST /api/rest/latest/projects/367/permissions/test_designer?ids=486,521 HTTP/1.1
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
the ids of the users/teams |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 573
{
"content" : {
"test_designer" : [ {
"_type" : "user",
"id" : 486,
"login" : "User-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486"
}
}
}, {
"_type" : "user",
"id" : 521,
"login" : "User-2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/521"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/367/permissions"
}
}
}
Links
| Relation | Description |
|---|---|
|
the link to this project clearances |
Delete clearances in project
A DELETE to /projects/{projectId}/users/{partyIds} deletes users/teams with the given ids (separated with comma).
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
the list of user/team ids to be deleted |
HTTP request
DELETE /api/rest/latest/projects/44/users/77,99 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Get campaigns of project
A GET to /projects/{id}/campaigns returns the campaigns in the project with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
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
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
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 |
|---|---|---|
|
|
the test cases of this project |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get requirements of project
A GET to /projects/{id}/requirements returns the requirements in the project with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
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
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
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 |
|---|---|---|
|
|
the requirements of this project |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get test cases of project
A GET to /projects/{id}/test-cases returns the test cases in the project with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
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
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
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 |
|---|---|---|
|
|
the test cases of this project |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get custom report library contents
A GET to /projects/{id}/reporting-library/content returns the contents of the custom report library in the project with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/14/reporting-library/content?page=2&size=3&include=nested HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
level of depth of the content that should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1524
{
"_embedded" : {
"reporting-library-content" : [ {
"entity_type" : "FOLDER",
"id" : 3,
"name" : "Folder",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/reports/3"
}
}
}, {
"entity_type" : "REPORT",
"id" : 44,
"name" : "Report",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/reports/44"
}
}
}, {
"entity_type" : "CHART",
"id" : 42,
"name" : "Chart",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/reports/42"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/reporting-library/content?include=nested&page=0&size=3"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/reporting-library/content?include=nested&page=1&size=3"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/reporting-library/content?include=nested&page=2&size=3"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/reporting-library/content?include=nested&page=3&size=3"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/reporting-library/content?include=nested&page=3&size=3"
}
},
"page" : {
"size" : 3,
"totalElements" : 10,
"totalPages" : 4,
"number" : 2
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get execution library contents
A GET to /projects/{id}/campaigns-library/content returns the contents of the execution library in the project with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
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
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
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 |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get 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
| Parameter | Description |
|---|---|
|
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
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
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 |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get test 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
| Parameter | Description |
|---|---|
|
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
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
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 |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
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?cufId=80 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
entity to bind (REQUIREMENT_FOLDER, CAMPAIGN_FOLDER, TESTCASE_FOLDER, TEST_CASE, TEST_STEP, CAMPAIGN, ITERATION, TEST_SUITE, REQUIREMENT_VERSION, EXECUTION, EXECUTION_STEP) |
Query parameters
| Parameter | Description |
|---|---|
|
the id of the custom-fields |
Example response
HTTP/1.1 200 OK
Unbind custom field to project
A DELETE to /projects/{id}/custom-fields/{entity-type} unbind custom field with the given id to given entity for given project.
HTTP request
DELETE /api/rest/latest/projects/14/custom-fields/REQUIREMENT_FOLDER?cufId=80 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
entity to bind (REQUIREMENT_FOLDER, CAMPAIGN_FOLDER, TESTCASE_FOLDER, TEST_CASE, TEST_STEP, CAMPAIGN, ITERATION, TEST_SUITE, REQUIREMENT_VERSION, EXECUTION, EXECUTION_STEP) |
Query parameters
| Parameter | Description |
|---|---|
|
the id of the custom-fields |
Example response
HTTP/1.1 204 No Content
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
| Parameter | Description |
|---|---|
|
the id of the project |
|
ids of the environment variables |
Example response
HTTP/1.1 200 OK
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
| Parameter | Description |
|---|---|
|
the id of the project |
|
ids of the environment variables |
Example response
HTTP/1.1 204 No Content
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
| Parameter | Description |
|---|---|
|
the id of the project |
|
id of the environment variable bind to the project |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
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 of the environment variable binding |
|
|
id of the entity |
|
|
type of the entity |
|
|
new value to set |
|
|
environment variable bind to the entity |
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?infolist-id=1 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
type of list to bind. list-type have 3 values : requirement-category, test-case-nature ou test-case-type |
Query parameters
| Parameter | Description |
|---|---|
|
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"
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?milestoneIds=1 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
Query parameters
| Parameter | Description |
|---|---|
|
the ids of the milestones |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 407
{
"_type" : "project",
"id" : 14,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"milestones" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/milestones"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the id of the project |
|
|
the type of the entity |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
the attachments of the project |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this project |
|
link to milestones associated with the project |
Get all milestones bound to a project
A GET to /projects/{id}/milestones to find all the milestones that are linked to a project
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/14/milestones HTTP/1.1
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
}
}
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?bugtrackerId=1 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
Query parameters
| Parameter | Description |
|---|---|
|
the id of the bug-tracker |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 400
{
"_type" : "project",
"id" : 14,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"bug-tracker" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/1"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the id of the project |
|
|
the type of the entity |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
the attachments of the project |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this project |
|
link to the bug tracker of this project |
Unbind a bug tracker from a project
A DELETE to /projects/{id}/bug-tracker dissociate the project with given id from its bug tracker.
HTTP request
DELETE /api/rest/latest/projects/14/bug-tracker HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 301
{
"_type" : "project",
"id" : 14,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
}
Links
| Relation | Description |
|---|---|
|
link to this project |
Get the bug tracker bound to a project
A GET to projects/{id}/bug-trackers to find the bug-tracker linked to a project.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/1/bug-trackers HTTP/1.1
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 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
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the current bugtracker |
|
|
list of bugtracker project name |
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
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the current bugtracker |
|
|
list of bugtracker project name |
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
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the current bugtracker |
|
|
list of bugtracker project name |
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?scmRepositoryId=11 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
Query parameters
| Parameter | Description |
|---|---|
|
the id of the scm repository |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 408
{
"_type" : "project",
"id" : 14,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"scm-repository" : {
"href" : "http://localhost:8080/api/rest/latest/scm-repositories/11"
}
}
}
Links
| Relation | Description |
|---|---|
|
link to this project |
|
link to the scm repository of this project |
Unbind a scm repository from a project
A DELETE to /projects/{id}/scm-repository dissociate the project with given id from its scm repository.
HTTP request
DELETE /api/rest/latest/projects/14/scm-repository HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 301
{
"_type" : "project",
"id" : 14,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
}
Links
| Relation | Description |
|---|---|
|
link to this project |
Get project automation configuration
A GET to projects/{id}/automation-conf to find a project automation configuration.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/1/automation-conf HTTP/1.1
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the technology used to implement bdd tests |
|
|
the language used to implement bdd tests |
|
|
the type of automation workflow among 'NONE', 'NATIVE' or 'NATIVE_SIMPLIFIED' |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this configuration |
|
link to the project |
Modify project automation configuration
A PATCH to projects/{id}/automation-conf modifies the automation configuration of the projet with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
HTTP request
PATCH /api/rest/latest/projects/1/automation-conf HTTP/1.1
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the technology used to implement bdd tests |
|
|
the language used to implement bdd tests |
|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the technology used to implement bdd tests |
|
|
the language used to implement bdd tests |
|
|
the type of automation workflow among 'NONE', 'NATIVE' or 'NATIVE_SIMPLIFIED' |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this configuration |
|
link to the project |
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?testAutomationServerId=3 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
Query parameters
| Parameter | Description |
|---|---|
|
the id of the automation server |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 425
{
"_type" : "project",
"id" : 13,
"description" : "<p>Project for automated executions.</p>",
"label" : "Automated executions project",
"name" : "sample project",
"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 |
|---|---|---|
|
|
the id of the project |
|
|
the type of the entity |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
the attachments of the project |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this project |
|
link to the automation server of this project |
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
| Parameter | Description |
|---|---|
|
the id of the project |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 304
{
"_type" : "project",
"id" : 13,
"description" : "<p>Project for automated executions.</p>",
"label" : "Automated executions project",
"name" : "sample project",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/13"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the id of the project |
|
|
the type of the entity |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
the attachments of the project |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this project |
Enable or disable plugin of project
A POST to projects/{id}/plugin/{pluginId}/activate activates or deactivates the plugin with the given id.
HTTP request
POST /api/rest/latest/projects/14/plugins/squash.tm.plugin.jirasync/activate?enabled=false&saveConfig=false HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
the string corresponding to the id of the plugin to activate or deactivate |
Query parameters
| Parameter | Description |
|---|---|
|
true to activate the plugin, false to deactivate it |
|
only relevant when deactivating a plugin, set it to true if you want to keep your configuration |
Example response
HTTP/1.1 204 No Content
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
| Parameter | Description |
|---|---|
|
the id of the project |
|
the id of the ai server to bind |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 397
{
"_type" : "project",
"id" : 13,
"description" : "<p>Project for automated executions.</p>",
"label" : "Project bound to ai server",
"name" : "sample project",
"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 AI server bound to a project
A GET to projects/{id}/ai-servers to find the AI server bound to a project.
Path parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the id of the artificial intelligence server |
|
|
the name of the artificial intelligence server |
|
|
the url of the remote artificial intelligence server |
|
|
the authentication policy of the artificial intelligence server (APP_LEVEL by default) |
|
|
the authentication protocol of the artificial intelligence server (TOKEN_AUTH by default) |
|
|
a pre-formatted payload containing query parameters and a placeholder, designed for submission to an AI service for processing |
|
|
a description of the server |
|
|
a string expression used to navigate and extract specific nodes to access the generated answer in the response |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this artificial intelligence server |
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
| Parameter | Description |
|---|---|
|
the id of the project |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 302
{
"_type" : "project",
"id" : 13,
"description" : "<p>Project for automated executions.</p>",
"label" : "Project bound to ai server",
"name" : "sample project",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/13"
}
}
}
Links
| Relation | Description |
|---|---|
|
link to this project |
Requirement Version Link Types
This chapter focuses on types of links between requirements.
Get all link type
A GET to /requirement-link-types returns all the link types.
HTTP request
GET /api/rest/latest/requirement-link-types HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
which type of the element should be returned (optional) |
Example response
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
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get link type by id
A GET to /requirement-link-types/{id} returns the link type with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the link type |
HTTP request
GET /api/rest/latest/requirement-link-types/1 HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
which fields of the elements should be returned (optional) |
Example response
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"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the link type |
|
|
the first role of the link between requirement |
|
|
the first role code |
|
|
the second role of the link between requirement |
|
|
the second role code |
|
|
the default link type |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this link type |
Get link type by code role
A GET to /requirement-link-types returns the link type with the given code role.
HTTP request
GET /api/rest/latest/requirement-link-types?codeRole=Role1code HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
role code of the link to search |
Example response
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"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the milestone |
|
|
the first role of the link between requirement |
|
|
the first role code |
|
|
the second role of the link between requirement |
|
|
the second role code |
|
|
the default link type |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this link type |
Create link type
A POST to /requirement-link-types creates a new link type.
HTTP request
POST /api/rest/latest/requirement-link-types HTTP/1.1
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"
}
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the first role of the link between requirement (mandatory) |
|
|
the first role code (mandatory) |
|
|
the second role of the link between requirement (mandatory) |
|
|
the second role code (mandatory) |
Query parameters
| Parameter | Description |
|---|---|
|
which fields of the elements should be returned (optional) |
Example response
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"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the milestone |
|
|
the first role of the link between requirement |
|
|
the first role code |
|
|
the second role of the link between requirement |
|
|
the second role code |
|
|
the default link type |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this milestone |
Modify link type
A PATCH to /requirement-link-types/{id} modifies the link type with the given id.
HTTP request
PATCH /api/rest/latest/requirement-link-types/1 HTTP/1.1
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"
}
Path parameters
| Parameter | Description |
|---|---|
|
the id of the link type |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the first role of the link between requirement |
|
|
the first role code |
|
|
the second role of the link between requirement |
|
|
the second role code |
Example response
HTTP/1.1 200 OK
Content-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"
}
}
}
Delete link type
A DELETE to /requirement-link-types/{ids} deletes one or several link type(s) with the given id(s).
Path parameters
| Parameter | Description |
|---|---|
|
the list of ids of the link type |
HTTP request
DELETE /api/rest/latest/requirement-link-types/11%2012 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 204 No Content
Source Code Management Repositories
This chapter is managed on source code management repositories.
Get scm repository
A GET to /scm-repositories/{id} returns the source code management repository with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the source code management repository |
HTTP request
GET /api/rest/latest/scm-repositories/1 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 641
{
"_type" : "scm-repository",
"id" : 1,
"name" : "myRepo",
"repository_path" : "../git-repositories/gitlab%2Ecom%myRepo_20241015T220620",
"working_folder_path" : "src/test/resources",
"working_branch" : "main",
"scm_server" : {
"_type" : "scm-server",
"id" : 9,
"name" : "server1",
"url" : "https://gitlab.com/",
"kind" : "git",
"committer_mail" : "henix@git.fr",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/9"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-repositories/1"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the source code management repository |
|
|
the name of the source code management repository |
|
|
the repository path of the source code management repository. This field is managed by Squash TM. |
|
|
the working folder path of the source code management repository. |
|
|
the working branch of the source code management repository |
|
|
the scm server this source code management repository belongs to |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this source code management repository |
Modify scm repository
A PATCH to /scm-repositories/{id} modifies the source code management repository with the given id.
HTTP request
PATCH /api/rest/latest/scm-repositories/1?branch=main HTTP/1.1
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the source code management repository |
Query parameters
| Parameter | Description |
|---|---|
|
the new working branch of the source code management repository |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 641
{
"_type" : "scm-repository",
"id" : 1,
"name" : "myRepo",
"repository_path" : "../git-repositories/gitlab%2Ecom%myRepo_20241015T220620",
"working_folder_path" : "src/test/resources",
"working_branch" : "main",
"scm_server" : {
"_type" : "scm-server",
"id" : 9,
"name" : "server1",
"url" : "https://gitlab.com/",
"kind" : "git",
"committer_mail" : "henix@git.fr",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/9"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-repositories/1"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the source code management repository |
|
|
the name of the source code management repository |
|
|
the repository path of the source code management repository. This field is managed by Squash TM and cannot be overridden. If included in the request body, it will be ignored. |
|
|
the working folder path of the source code management repository. |
|
|
the working branch of the source code management repository |
|
|
the scm server this source code management repository belongs to |
|
|
related links |
Delete scm repository
A DELETE to /scm-repositories/{ids} deletes one or several source code management repositories with the given id(s).
Path parameters
| Parameter | Description |
|---|---|
|
the list of ids of the source code management repositories |
HTTP request
DELETE /api/rest/latest/scm-repositories/9,10 HTTP/1.1
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 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
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
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://gitlab.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 |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get scm server
A GET to /scm-servers/{id} returns the source code management server with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the source code management server |
HTTP request
GET /api/rest/latest/scm-servers/1 HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 940
{
"_type" : "scm-server",
"id" : 1,
"name" : "server1",
"url" : "https://gitlab.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" : "myRepo",
"repository_path" : "../git-repositories/gitlab%2Ecom%myRepo_20241015T220620",
"working_folder_path" : "src/test/resources",
"working_branch" : "main",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-repositories/9"
}
}
} ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/1"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the source code management server |
|
|
the name of the source code management server |
|
|
the url of the source code management server |
|
|
the kind of the source code management server |
|
|
the committer mail used for the source code management server |
|
|
the authentication policy of the source code management server |
|
|
the authentication protocol of the source code management server |
|
|
a description of the server |
|
|
the repositories of this source code management server |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this source code management server |
Create scm server
A POST to /scm-servers creates a new source code management server.
HTTP request
POST /api/rest/latest/scm-servers HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 167
Host: localhost:8080
{
"name" : "New scmServer",
"url" : "https://gitlab.com/",
"kind" : "git",
"committer_mail" : "henix@git.fr",
"description" : "a description of the server"
}
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the name of the source code management server (mandatory) |
|
|
the url of the source code management server (mandatory) |
|
|
the kind of the source code management server (mandatory) |
|
|
the committer mail used for the source code management server |
|
|
a description of the server |
Query parameters
| Parameter | Description |
|---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 946
{
"_type" : "scm-server",
"id" : 1,
"name" : "New scmServer",
"url" : "https://gitlab.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" : "myRepo",
"repository_path" : "../git-repositories/gitlab%2Ecom%myRepo_20241015T220620",
"working_folder_path" : "src/test/resources",
"working_branch" : "main",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-repositories/9"
}
}
} ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/1"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the source code management server |
|
|
the name of the source code management server |
|
|
the url of the source code management server |
|
|
the kind of the source code management server |
|
|
the committer mail used for the source code management server |
|
|
the authentication policy of the source code management server |
|
|
the authentication protocol of the source code management server |
|
|
a description of the server |
|
|
the repositories of this source code management server |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this source code management server |
Modify scm server
A PATCH to /scm-servers/{id} modifies the source code management server with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the source code management server |
HTTP request
PATCH /api/rest/latest/scm-servers/2 HTTP/1.1
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 |
|---|---|---|
|
|
the name of the source code management server |
|
|
the url of the source code management server |
|
|
the committer mail used for the source code management server |
|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the source code management server |
|
|
the name of the source code management server |
|
|
the url of the source code management server |
|
|
the kind of the source code management server |
|
|
the committer mail used for the source code management server |
|
|
the authentication policy of the source code management server |
|
|
the authentication protocol of the source code management server |
|
|
a description of the server |
|
|
the repositories of this source code management server |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this source code management server |
Delete scm server
A DELETE to /scm-servers/{ids} deletes one or several source code management servers with the given id(s).
Path parameters
| Parameter | Description |
|---|---|
|
the list of ids of the source code management servers |
HTTP request
DELETE /api/rest/latest/scm-servers/11,12 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 204 No Content
Get all scm repositories from the scm server
A GET to /scm-servers/{id}/scm-repositories returns all the source code management repository for the scm server.
HTTP request
GET /api/rest/latest/scm-servers/11/scm-repositories HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
which type of the element should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1807
{
"_embedded" : {
"scm-repositories" : [ {
"_type" : "scm-repository",
"id" : 1,
"name" : "myRepo",
"repository_path" : "../git-repositories/gitlab%2Ecom%myRepo_20241015T220620",
"working_folder_path" : "src/test/resources",
"working_branch" : "main",
"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" : "mySecondRepo",
"repository_path" : "../git-repositories/gitlab%2Ecom%mySecondRepo_20241015T220620",
"working_folder_path" : "src/test/resources",
"working_branch" : "main",
"scm_server" : {
"_type" : "scm-server",
"id" : 11,
"name" : "scmServer",
"url" : "https://bitbucket.org/",
"kind" : "git",
"committer_mail" : "git@henix.fr",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/11"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-repositories/2"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/11/scm-repositories?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Add a scm repository to a scm server
A POST to /scm-servers/{id}/scm-repositories creates a new source code management repository for the given scm server id .
HTTP request
POST /api/rest/latest/scm-servers/9/scm-repositories HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 150
Host: localhost:8080
{
"name" : "myRepo",
"working_folder_path" : "src/test/resources",
"working_branch" : "main",
"params" : {
"clone_repository" : true
}
}
Path parameters
| Parameter | Description |
|---|---|
|
the id of the source code management server |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the name of the source code management repository (mandatory) |
|
|
the working folder path of the source code management repository (mandatory if cloning) |
|
|
the working branch of the source code management repository (mandatory) |
|
|
the parameters to create a new source code management repository |
|
|
whether the repository must be cloned on squash server file system |
Query parameters
| Parameter | Description |
|---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 653
{
"_type" : "scm-repository",
"id" : 1,
"name" : "myRepo",
"repository_path" : "../git-repositories/gitlab%2Ecom%myRepo_20241015T220620",
"working_folder_path" : "src/test/resources",
"working_branch" : "main",
"scm_server" : {
"_type" : "scm-server",
"id" : 9,
"name" : "server1",
"url" : "https://gitlab.com/",
"kind" : "git",
"committer_mail" : "henix@git.fr",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/9"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/scm-servers/9/scm-repositories"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the source code management repository |
|
|
the name of the source code management repository |
|
|
the working folder path of the source code management repository. |
|
|
the repository path of the source code management repository. This field is managed by Squash TM and cannot be overridden. If included in the request body, it will be ignored. |
|
|
the working branch of the source code management repository |
|
|
the scm server this source code management repository belongs to |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this source code management repository |
Get scm server credentials
A GET to /scm-servers/{id}/credentials get the credentials for the given source code management server.
HTTP request
GET /api/rest/latest/scm-servers/1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the type of the credentials |
|
|
the username to authenticate to this scm server |
|
|
related links |
Set scm server credentials
A POST to /scm-servers/{id}/credentials set credentials for the given source code management server.
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
| Parameter | Description |
|---|---|
|
the id of the scm server |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the credentials |
|
|
the username to authenticate to this scm server |
|
|
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 |
|---|---|---|
|
|
the type of the credentials |
|
|
the username to authenticate to this scm server |
|
|
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
| Parameter | Description |
|---|---|
|
the id of the scm server |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the credentials |
|
|
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 |
|---|---|---|
|
|
the type of the credentials |
|
|
related links |
Teams
This chapter focuses on additional services for the teams. These services extend driven-by-id methods implemented in the Rest Services API by allowing search by Team name.
Get all teams
A GET to /teams returns all the teams.
HTTP request
GET /api/rest/latest/teams?page=2&size=1 HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
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 |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Create team
A POST to /teams creates a new team.
HTTP request
POST /api/rest/latest/teams HTTP/1.1
Content-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 |
|---|---|---|
|
|
the type of the entity |
|
|
the name of the team |
|
|
the description of the team |
Query parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the id of the team |
|
|
the members of this team |
|
|
the user who created this team |
|
|
the date of this team account was created |
|
|
the user who last modified this team |
|
|
the date of this team was last modified |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this user |
Get team
A GET to /teams/{id} returns the team with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the team |
HTTP request
GET /api/rest/latest/teams/567 HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the team |
|
|
the name of the team |
|
|
the description of the team |
|
|
the members of this team |
|
|
the user who created this team |
|
|
the date of this team account was created |
|
|
the user who last modified this team |
|
|
the date of this team was last modified |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this user |
Modify team
A PATCH to /teams/{id} modifies the team with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the team |
HTTP request
PATCH /api/rest/latest/teams/567 HTTP/1.1
Content-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 |
|---|---|---|
|
|
the type of the entity |
|
|
the name of the team |
|
|
the description of the team |
Query parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the id of the team |
|
|
the members of this team |
|
|
the user who created this team |
|
|
the date of this team account was created |
|
|
the user who last modified this team |
|
|
the date of this team was last modified |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this user |
Delete team
A DELETE to /teams/{ids} deletes one or several team(s) with the given id(s).
Path parameters
| Parameter | Description |
|---|---|
|
the list of ids of the teams |
HTTP request
DELETE /api/rest/latest/teams/169,189 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Get team members
A GET to return all the members of the team, either by id or by name.
Get team members by id
A GET to /teams/{teamId}/members returns all the members of the team with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the team |
HTTP request
GET /api/rest/latest/teams/888/members HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2147
{
"_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,
"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,
"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,
"last_connected_on" : "2018-03-11T11:00:00.000+00:00",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/3"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/888/members?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 3,
"totalPages" : 1,
"number" : 0
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the members of this team |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get team members by name
A GET to /teams/team-name/{teamName}/members returns all the members of the team with the given teamName.
Path parameters
| Parameter | Description |
|---|---|
|
the name of the team |
HTTP request
GET /api/rest/latest/teams/team-name/Team%20A/members HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
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 |
|---|---|---|
|
|
the members of this team |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Add members
A POST to add users to the team, either by ids or by names.
Add members by ids
A POST to /teams/{teamId}/members with userIds in request parameters adds these users to the team with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the team |
HTTP request
POST /api/rest/latest/teams/888/members?userIds=486,521 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
the ids of the members to add |
Add members by names
A POST to /teams/team-name/{teamName}/members with userLogins in request parameters adds these users to the team with the given teamName.
Path parameters
| Parameter | Description |
|---|---|
|
the name of the team |
HTTP request
POST /api/rest/latest/teams/team-name/Team%20A/members?userLogins=John%20Doe,%20Jane%20Doe HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
the logins of the members to add |
Remove members
A DELETE to remove users from the team, either by ids or by names.
Remove members by ids
A DELETE to /teams/{teamId}/members with userIds in request parameters removes these users from the team with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the team |
HTTP request
DELETE /api/rest/latest/teams/888/members?userIds=486,521 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
the ids of the members to remove |
Remove members by names
A DELETE to /teams/team-name/{teamName}/members with userLogins in request parameters removes these users from the team with the given teamName.
Path parameters
| Parameter | Description |
|---|---|
|
the name of the team |
HTTP request
DELETE /api/rest/latest/teams/team-name/Team%20A/members?userLogins=John%20Doe,%20Jane%20Doe HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
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 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
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
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 |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get user
A GET to /users/login/{login} returns the user with the given login.
Path parameters
| Parameter | Description |
|---|---|
|
the login of the user |
HTTP request
GET /api/rest/latest/users/login/User-1 HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the id of the user |
|
|
the type of the entity |
|
|
the first name of the user |
|
|
the last name of the user |
|
|
the login of the user |
|
|
the email address of the user |
|
|
whether the user is activate or not |
|
|
the group of the user belong (admin or user) |
|
|
whether the user can delete library entities from the front-end with the Squash TM Premium plugin |
|
|
the team of the user participate |
|
|
the date of this user was last connected |
|
|
the user who created this user account |
|
|
the date of this user account was created |
|
|
the user who last modified this user account |
|
|
the date of this user account was last modified |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Create user
A POST to /users creates a new user.
HTTP request
POST /api/rest/latest/users HTTP/1.1
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the first name of the user |
|
|
the last name of the user |
|
|
the login of the user |
|
|
the password of the user |
|
|
the email address of the user |
|
|
the group of the user belong (admin, user or testAutomationServer) |
|
|
whether the user can delete library entities from the front-end with the Squash TM Premium plugin |
Query parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the id of the user |
|
|
whether the user is activate or not |
|
|
the team of the user participate |
|
|
the date of this user was last connected |
|
|
the user who created this user account |
|
|
the date of this user account was created |
|
|
the user who last modified this user account |
|
|
the date of this user account was last modified |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this user |
Modify user
A PATCH to /users/{id} modifies the user with the given id.
|
|
Once a user has been created with the Technical Account group, it is no longer possible to modify this group. Similarly, it is not possible to modify a user in the User or Administrator group for the Test Automation Server group. |
Path parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the first name of the user |
|
|
the last name of the user |
|
|
the login of the user |
|
|
the password of the user |
|
|
the email address of the user |
|
|
whether the user is activate or not |
|
|
the group of the user belong (admin, user or testAutomationServer) |
|
|
whether the user can delete library entities from the front-end with the Squash TM Premium plugin |
Query parameters
| Parameter | Description |
|---|---|
|
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 |
|---|---|---|
|
|
the id of the user |
|
|
the team of which the user is a member |
|
|
the date of this user was last connected |
|
|
the user who created this user account |
|
|
the date of this user account was created |
|
|
the user who last modified this user account |
|
|
the date of this user account was last modified |
|
|
whether the user can delete library entities from the front-end with the Squash TM Premium plugin |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this user |
Delete user
A DELETE to /users/{ids} deletes one or several user(s) with the given id(s).
Path parameters
| Parameter | Description |
|---|---|
|
the list of ids of the users |
HTTP request
DELETE /api/rest/latest/users/169,189 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Get user subscribed teams
A GET to return all the subscribed teams of the user, either by id or by login.
Get user subscribed teams by id
A GET to /users/{userId}/teams returns all the subscribed teams of the user with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the user |
HTTP request
GET /api/rest/latest/users/486/teams HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1120
{
"_embedded" : {
"teams" : [ {
"_type" : "team",
"id" : 567,
"name" : "Team A",
"description" : "<p>black panther</p>",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/567"
}
}
}, {
"_type" : "team",
"id" : 568,
"name" : "Team B",
"description" : "<p>black widow</p>",
"created_by" : "admin",
"created_on" : "2017-07-04T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-05T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/teams/568"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486/teams?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the teams of this user |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get user subscribed teams by login
A GET to /users/login/{login}/teams returns all the subscribed teams of the user with the given login.
Path parameters
| Parameter | Description |
|---|---|
|
the login of the user |
HTTP request
GET /api/rest/latest/users/login/User-1/teams HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
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 |
|---|---|---|
|
|
the teams of this user |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Subscribe to teams
A POST to subscribe the user to their teams, either by ids or by names.
Subscribe to teams by ids
A POST to /users/{userId}/teams with teamIds in request parameters subscribes the user with the given id to these teams.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the user |
HTTP request
POST /api/rest/latest/users/987/teams?teamIds=486,487 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
the list of ids of the teams |
Subscribe to teams by names
A POST to /users/login/{login}/teams with teamNames in request parameters subscribes the user with the given login to these teams.
Path parameters
| Parameter | Description |
|---|---|
|
the login of the user |
HTTP request
POST /api/rest/latest/users/login/User-1/teams?teamNames=team-1,%20team-2 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
the list of names of the teams |
Unsubscribe from teams
A DELETE to unsubscribe the user from their teams, either by ids or by names.
Unsubscribe from teams by ids
A DELETE to /users/{userId}/teams with teamIds in request parameters unsubscribes the user with the given id from these teams.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the user |
HTTP request
DELETE /api/rest/latest/users/987/teams?teamIds=486,487 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
the list of ids of the teams |
Unsubscribe from teams by names
A DELETE to /users/login/{login}/teams with teamNames in request parameters unsubscribes the user with the given login from these teams.
Path parameters
| Parameter | Description |
|---|---|
|
the login of the user |
HTTP request
DELETE /api/rest/latest/users/login/User-1/teams?teamNames=team-1,%20team-2 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
the list of names of the teams |
Get user clearances
A GET to /users/{id}/clearances returns the clearances grouped by profiles for the user with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the user |
HTTP request
GET /api/rest/latest/users/486/clearances HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1540
{
"content" : {
"test_designer" : {
"_type" : "profile",
"id" : 7,
"name" : "TestDesigner",
"type" : "system",
"projects" : [ {
"_type" : "project",
"id" : 367,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "proj1",
"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",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/368"
}
}
} ]
},
"validator" : {
"_type" : "profile",
"id" : 9,
"name" : "Validator",
"type" : "system",
"projects" : [ {
"_type" : "project",
"id" : 369,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "proj3",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/369"
}
}
} ]
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486/clearances"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
contains clearances grouped by profiles |
|
|
contains the profile attributes (example of the validator profile) |
|
|
the type of the entity |
|
|
the id of the profile |
|
|
the name of the profile |
|
|
system if the profile is a system profile, custom if the profile is a custom profile |
|
|
the list of projects linked to the profile |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
the link to this user clearances |
Get user clearances (deprecated)
A GET to /users/{id}/permissions returns the clearances grouped by profiles for the user with the given id.
This endpoint is still functional but is deprecated. Please use the more comprehensive /users/{id}/clearances endpoint instead.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the user |
HTTP request
GET /api/rest/latest/users/486/permissions HTTP/1.1
Accept: application/json
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1220
{
"content" : {
"test_designer" : [ {
"_type" : "project",
"id" : 367,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "proj1",
"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",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/368"
}
}
} ],
"validator" : [ {
"_type" : "project",
"id" : 369,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "proj3",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/369"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486/permissions"
}
}
}
Links
| Relation | Description |
|---|---|
|
the link to this user clearances |
Add clearances to user
A POST to /users/{userId}/clearances/{profileId}/projects/{projectIds} adds given project ids to the given profile id of the user with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the user |
|
the id of the profile |
|
the ids of the projects |
HTTP request
POST /api/rest/latest/users/486/clearances/9/projects/369 HTTP/1.1
Accept: application/json
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 659
{
"content" : {
"test_designer" : {
"_type" : "profile",
"id" : 4,
"name" : "TestDesigner",
"type" : "system",
"projects" : [ {
"_type" : "project",
"id" : 369,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "proj3",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/369"
}
}
} ]
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486/clearances"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
contains the added clearance |
|
|
contains the profile attributes (example of the test designer profile) |
|
|
the type of the entity |
|
|
the id of the profile |
|
|
the name of the profile |
|
|
system if the profile is a system profile, custom if the profile is a custom profile |
|
|
the list of projects linked to the profile |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
the link to this user clearances |
Add clearances to user (deprecated - only for system profile)
A POST to /users/{userId}/permissions/{permissionGroup} adds system profile to the user with the given id.
The possible {permissionGroup} are test_editor, project_viewer, project_manager, test_runner, test_designer, advanced_tester and validator.
This endpoint is still functional but is deprecated. Please use the more comprehensive /users/{userId}/clearances/{profileId}/projects/{projectIds} endpoint instead.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the user |
|
the profile |
HTTP request
POST /api/rest/latest/users/486/permissions/test_designer?ids=369 HTTP/1.1
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
the ids of the projects |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 510
{
"content" : {
"test_designer" : [ {
"_type" : "project",
"id" : 369,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "proj3",
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/369"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/486/permissions"
}
}
}
Links
| Relation | Description |
|---|---|
|
the link to this user clearances |
Delete clearances for user
A DELETE to /users/{userId}/clearances/{projectIds} deletes one or several clearances for the given user and given project ids (separated with comma).
Path parameters
| Parameter | Description |
|---|---|
|
the id of the user |
|
the ids of the project to remove |
HTTP request
DELETE /api/rest/latest/users/486/clearances/369,370 HTTP/1.1
Accept: application/json
Host: localhost:8080
Delete clearances for user (deprecated)
A DELETE to /users/{id}/permissions deletes one or several clearances for the given user (ids of projects separated with comma).
This endpoint is still functional but is deprecated. Please use the more comprehensive /users/{userId}/clearances/{projectIds} endpoint instead.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the user |
HTTP request
DELETE /api/rest/latest/users/486/permissions?ids=369 HTTP/1.1
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Host: localhost:8080
Query parameters
| Parameter | Description |
|---|---|
|
the ids of the projects |
Get API tokens for a technical account
A GET to /users/{id}/tokens returns the API token list for the given technical account id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the technical account |
HTTP request
GET /api/rest/latest/users/4/tokens HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1026
{
"_embedded" : {
"api-tokens" : [ {
"id" : 1,
"uuid" : "f8e2f2d8-0fbf-4d29-8003-b729bfe212c8",
"user" : {
"_type" : "user",
"id" : 4
},
"name" : "token 1",
"createdOn" : "2024-06-15T07:48:02.000+00:00",
"createdBy" : "admin",
"expiryDate" : "2025-02-03",
"lastUsage" : "2024-06-28T09:54:27.000+00:00",
"permissions" : "READ"
}, {
"id" : 2,
"uuid" : "9e02ea67-f7ae-4c22-80c5-cb6bd64d1786",
"user" : {
"_type" : "user",
"id" : 4
},
"name" : "token 2",
"createdOn" : "2024-05-02T13:18:14.000+00:00",
"createdBy" : "admin",
"expiryDate" : "2024-12-28",
"lastUsage" : "2024-06-10T16:00:07.000+00:00",
"permissions" : "READ-WRITE"
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/users/4/tokens?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the API tokens of the technical account |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Create an API token for a technical account
A POST to /users/{id}/tokens creates a new API token for the given technical account id.
Path parameters
| Parameter | Description |
|---|---|
|
the technical account id |
HTTP request
POST /api/rest/latest/users/4/tokens HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 97
Host: localhost:8080
{
"name" : "token read write",
"permissions" : "READ_WRITE",
"expiry_date" : "2025-05-06"
}
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the name of the API token (maximum 255 characters) |
|
|
the permissions for the token ('READ' or 'READ_WRITE') |
|
|
the expiry date for the token in the format 'YYYY-MM-DD' (it cannot exceed one year) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1000
{
"id" : 6,
"uuid" : "9e02ea67-f7ae-4c22-80c5-cb6bd64d1786",
"user" : {
"_type" : "user",
"id" : 4,
"first_name" : "",
"last_name" : null,
"login" : null,
"email" : "",
"active" : true,
"group" : null,
"can_delete_from_front" : true,
"teams" : [ ],
"last_connected_on" : null,
"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"
},
"name" : "token read write",
"permissions" : "READ_WRITE",
"expiry_date" : "2025-05-06T00:00:00.000+00:00",
"created_on" : "2024-07-02T13:18:14.000+00:00",
"created_by" : "admin",
"last_usage" : null,
"generated_token" : "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwidXVpZCI6IjBmZmUxODdmLTAxYzctNGViZC05NjY5LWI0ODFlNzEyMGE1ZiIsInBlcm1pc3Npb25zIjoiUkVBRCIsImlhdCI6MTcyMTMwODc4OSwiZXhwIjoxNzUyNTM3NjAwfQ.qWlfn0D4R5-5PXwTpkArmjY2NOjpcE50dzwlaXkNbRu0K8CRS7YO-xsjPegup73nKxYQBQvbYJ_EPnTURRFQng"
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the ID of the API token |
|
|
the technical account that owns the API token |
|
|
the UUID of the API token |
|
|
the name of the API token |
|
|
the date when the API token was created |
|
|
the user who has created the API token |
|
|
the permissions associated with the API token |
|
|
the expiry date of the API token |
|
|
the date when the API token was last used |
|
|
the generated API token that the user should keep secret |
Delete an API token for a technical account
A DELETE to users/tokens/{tokenId} deletes the token of a technical account with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the token |
HTTP request
DELETE /api/rest/latest/users/tokens/3 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 204 No Content
Welcome Message
This chapter focuses on service for the welcome message of Squash TM.
Get welcome message
A GET to /welcome-message returns the welcome message.
HTTP request
GET /api/rest/latest/welcome-message HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 68
{
"_type" : "welcome-message",
"message" : "<h1>Bienvenue<h1>"
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the welcome message of Squash TM |
Modify welcome message
A PATCH to /welcome-message modifies the welcome message.
HTTP request
PATCH /api/rest/latest/welcome-message HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 37
Host: localhost:8080
{
"message" : "<h1>Bienvenue<h1>"
}
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the welcome message of Squash TM (mandatory) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 68
{
"_type" : "welcome-message",
"message" : "<h1>Bienvenue<h1>"
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the welcome message of Squash TM |