Test Automation Servers

This chapter focuses on test automation servers.

Create test automation server

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

HTTP request

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

{
  "name" : "TA server",
  "url" : "http://1234:4567/jenkins",
  "manual_slave_selection" : true,
  "description" : "<p>TA server description/p>"
}

Request fields

Path Type Description

name

String

the name of the test automation server (mandatory)

url

String

the url of the test automation server (mandatory)

manual_slave_selection

Boolean

whether the test automation server is manual slave or not

description

String

the description of the test automation server

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

HTTP response

HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 422

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

Response fields

Path Type Description

_type

String

the type of the entity

id

Number

the id of the test automation server

name

String

the name of the test automation server

url

String

the url where to reach the test automation server

kind

String

the kind of the test automation server

manual_slave_selection

Boolean

whether the test automation server is manual slave or not

description

String

the description of the test automation server

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

_links

Object

related links

Relation Description

self

link to this test automation server

Modify test automation server

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

HTTP request

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

{
  "name" : "Update TA server",
  "url" : "http://1234:4569/jenkins",
  "manual_slave_selection" : false,
  "description" : "<p>Update description</p>"
}

Path parameters

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

id

the id of the test automation server

Request fields

Path Type Description

name

String

the name of the test automation server

url

String

the url of the test automation server

manual_slave_selection

Boolean

whether the test automation server is manual slave or not

description

String

the description of the test automation server

HTTP response

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

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

Response fields

Path Type Description

_type

String

the type of the entity

id

Number

the id of the test automation server

name

String

the name of the test automation server

url

String

the url where to reach the test automation server

kind

String

the kind of the test automation server

manual_slave_selection

Boolean

whether the test automation server is manual slave or not

description

String

the description of the test automation server

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this test automation server

Delete test automation server

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

Path parameters

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

ids

the list of ids of the test automation servers

HTTP request

DELETE /api/rest/latest/test-automation-servers/11 HTTP/1.1
Accept: application/json
Content-Type: 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
Accept: application/json
Content-Type: application/json
Host: localhost:8080

Path parameters

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

id

the id of the test automation server

HTTP response

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

{
  "_type" : "basic-auth-credentials",
  "username" : "user@henix.fr",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-automation-servers/1/credentials"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the credentials, only basic-auth-credentials is used by test automation servers

username

String

the username to authenticate this test automation server

_links

Object

related links

Set test automation server credentials

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

HTTP request

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

{
  "_type" : "basic-auth-credentials",
  "username" : "user@henix.fr",
  "password" : "qcrGmkQxI0J789F"
}

Path parameters

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

id

the id of the test automation server

Request fields

Path Type Description

_type

String

the type of the credentials, only basic-auth-credentials is used by test automation servers

username

String

the username to authenticate this test automation server

password

String

the password to authenticate this test automation server

HTTP response

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

{
  "_type" : "basic-auth-credentials",
  "username" : "user@henix.fr",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-automation-servers/1/credentials"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the credentials, only basic-auth-credentials is used by test automation servers

username

String

the username to authenticate this test automation server

_links

Object

related links