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
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
which type of the element should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1782
{
"_embedded" : {
"test-automation-servers" : [ {
"_type" : "test-automation-server",
"id" : 569,
"name" : "TA server 1",
"url" : "http://1234:4567/jenkins/",
"kind" : "jenkins",
"manual_slave_selection" : false,
"description" : "<p>nice try</p>",
"created_by" : "admin",
"created_on" : "2017-06-15T10:00:00.000+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://1234:4567/jira/",
"kind" : "jenkins",
"manual_slave_selection" : false,
"description" : "<p>second shot</p>",
"created_by" : "admin",
"created_on" : "2017-06-15T10:00:00.000+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
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 500
{
"_type" : "test-automation-server",
"id" : 569,
"name" : "TA server",
"url" : "http://1234:4567/jenkins/",
"kind" : "jenkins",
"manual_slave_selection" : false,
"description" : "<p>nice try</p>",
"created_by" : "admin",
"created_on" : "2017-06-15T10:00:00.000+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 |
|
|
the url where to reach the test automation server |
|
|
the kind of the test automation server |
|
|
the description of the test automation server |
|
|
whether the test automation server is manual slave or not |
|
|
the user who created the test automation server |
|
|
the date the test automation server was created |
|
|
the user who last modified the test automation server |
|
|
the date the test automation server was last modified |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this test automation server |
Create test automation server
A POST
to /test-automation-servers
creates a new test automation server.
HTTP request
POST /api/rest/latest/test-automation-servers HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 170
Host: localhost:8080
{
"name" : "TA server",
"url" : "http://1234:4567/jenkins",
"kind" : "jenkins",
"manual_slave_selection" : true,
"description" : "<p>TA server description/p>"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the name of the test automation server (mandatory) |
|
|
the url of the test automation server (mandatory) |
|
|
the kind of the test automation server, can be jenkins (default) or squashAutom |
|
|
whether the test automation server is manual slave or not |
|
|
the description of the test automation server |
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 423
{
"_type" : "test-automation-server",
"id" : 569,
"name" : "TA server",
"url" : "http://1234:4567/jenkins",
"kind" : "jenkins",
"manual_slave_selection" : true,
"description" : "<p>TA server description</p>",
"created_by" : "admin",
"created_on" : "2017-06-15T10:00:00.000+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 |
|
|
whether the test automation server is manual slave or not |
|
|
the description of the test automation server |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this test automation server |
Modify test automation server
A PATCH
to /test-automation-servers/{id}
modifies the test automation server with the given id.
HTTP request
PATCH /api/rest/latest/test-automation-servers/569 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 154
Host: localhost:8080
{
"name" : "Update TA server",
"url" : "http://1234:4569/jenkins",
"manual_slave_selection" : false,
"description" : "<p>Update description</p>"
}
Path parameters
Parameter | Description |
---|---|
|
the id of the test automation server |
Request fields
Path | Type | Description |
---|---|---|
|
|
the name of the test automation server |
|
|
the url of the test automation server |
|
|
whether the test automation server is manual slave or not |
|
|
the description of the test automation server |
HTTP 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_slave_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 |
|
|
whether the test automation server is manual slave or not |
|
|
the description of the test automation server |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this test automation server |
Delete test automation server
A DELETE
to /test-automation-servers/{ids}
deletes one or several test automation server(s) with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the test automation servers |
HTTP request
DELETE /api/rest/latest/test-automation-servers/11,12 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
HTTP 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 |
HTTP 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, only basic-auth-credentials is used by test automation servers |
|
|
the username to authenticate this test automation server |
|
|
related links |
Set test automation server credentials
A POST
to /test-automation-servers/{id}/credentials
set credentials for the given test automation server.
HTTP request
POST /api/rest/latest/test-automation-servers/1/credentials HTTP/1.1
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, only basic-auth-credentials is used by test automation servers |
|
|
the username to authenticate this test automation server |
|
|
the password to authenticate this test automation server |
HTTP 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, only basic-auth-credentials is used by test automation servers |
|
|
the username to authenticate this test automation server |
|
|
related links |