Test Automation Servers

This chapter focuses on test automation servers.

get Get all test automation servers

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

HTTP request

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

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

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

fields

which fields of the elements should be returned (optional)

type

which type of the element should be returned (optional)

HTTP response

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

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

Response fields

Path Type Description

_embedded.test-automation-servers

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

get Get test automation server

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

Path parameters

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

id

the id of the test automation server

HTTP request

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

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

HTTP response

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

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

Response fields

Path Type Description

id

Number

the id of the test automation server

_type

String

the type of the entity

name

String

the name of the test automation server

url

String

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

observer_url

String

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

event_bus_url

String

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

killswitch_url

String

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

kind

String

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

manual_agent_selection

Boolean

whether the test automation server is manual agent or not

description

String

the description of the test automation server

created_by

String

the user who created the test automation server

created_on

String

the date the test automation server was created

last_modified_by

String

the user who last modified the test automation server

last_modified_on

String

the date the test automation server was last modified

_links

Object

related links

Relation Description

self

link to this test automation server

post Create test automation server

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

Create a Jenkins server

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

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

name

String

the name of the test automation server (mandatory)

url

String

the url of the test automation server (mandatory)

kind

String

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

manual_agent_selection

Boolean

whether the test automation server is manual agent or not

description

String

the description of the test automation server

Request parameters
Parameter Description

fields

which fields of the elements should be returned (optional)

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

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

_type

String

the type of the entity

id

Number

the id of the test automation server

name

String

the name of the test automation server

url

String

the url where to reach the test automation server

kind

String

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

manual_agent_selection

Boolean

this field is not used for type squashOrchestrator

description

String

the description of the test automation server

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this test automation server

Create a Squash Orchestrator server

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

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

name

String

the name of the test automation server (mandatory)

url

String

the url for the receptionist endpoint (mandatory)

observer_url

String

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

event_bus_url

String

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

killswitch_url

String

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

kind

String

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

description

String

the description of the test automation server

Request parameters
Parameter Description

fields

which fields of the elements should be returned (optional)

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

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

_type

String

the type of the entity

id

Number

the id of the test automation server

name

String

the name of the test automation server

url

String

the url for the receptionist endpoint

observer_url

String

the url for the observer endpoint

event_bus_url

String

the url for the event bus endpoint

killswitch_url

String

the url for the killswitch endpoint

kind

String

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

manual_agent_selection

Boolean

this field is not used for type squashOrchestrator

description

String

the description of the test automation server

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this test automation server

patch Modify test automation server

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

Patch a Jenkins server

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

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

id

the id of the test automation server

Request fields
Path Type Description

name

String

the name of the test automation server

url

String

the url of the test automation server

manual_agent_selection

Boolean

whether the test automation server is manual agent or not

description

String

the description of the test automation server

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_agent_selection" : false,
  "description" : "<p>Update description</p>",
  "created_by" : "admin",
  "created_on" : "2017-06-15T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-06-15T10:00:00.000+00:00",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-automation-servers/569"
    }
  }
}
Response fields
Path Type Description

_type

String

the type of the entity

id

Number

the id of the test automation server

name

String

the name of the test automation server

url

String

the url where to reach the test automation server

kind

String

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

manual_agent_selection

Boolean

whether the test automation server is manual agent or not

description

String

the description of the test automation server

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this test automation server

Patch a Squash Orchestrator server

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

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

id

the id of the test automation server

Request fields
Path Type Description

name

String

the name of the test automation server

url

String

the url of the test automation server

observer_url

String

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

event_bus_url

String

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

killswitch_url

String

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

manual_agent_selection

Boolean

whether the test automation server is manual agent or not

description

String

the description of the test automation server

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

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

_type

String

the type of the entity

id

Number

the id of the test automation server

name

String

the name of the test automation server

url

String

the url where to reach the test automation server

observer_url

String

the url for the observer endpoint

event_bus_url

String

the url for the event bus endpoint

killswitch_url

String

the url for the killswitch endpoint

kind

String

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

manual_agent_selection

Boolean

this field is not used for type squashOrchestrator

description

String

the description of the test automation server

created_by

String

user who created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user who modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

_links

Object

related links

Relation Description

self

link to this test automation server

delete Delete test automation server

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

Path parameters

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

ids

the list of ids of the test automation servers

HTTP request

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

HTTP response

HTTP/1.1 204 No Content

get Get test automation server credentials

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

HTTP request

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

Path parameters

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

id

the id of the test automation server

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

_type

String

the type of the credentials

username

String

the username to authenticate to this test automation server

_links

Object

related links

post Set test automation server credentials

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

Set basic authentication credentials

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

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

id

the id of the test automation server

Request fields
Path Type Description

_type

String

the type of the credentials

username

String

the username to authenticate to this test automation server

password

String

the password to authenticate to this test automation server

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

_type

String

the type of the credentials

username

String

the username to authenticate to this test automation server

_links

Object

related links

Set token authentication credentials

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

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

id

the id of the test automation server

Request fields
Path Type Description

_type

String

the type of the credentials

token

String

the token to authenticate to this test automation server

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

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

_type

String

the type of the credentials

_links

Object

related links

post Bind environment variables to test automation server

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

HTTP request

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

Path parameters

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

id

the id of the test automation server

evIds

ids of the environment variables

HTTP response

HTTP/1.1 200 OK

delete Unbind environment variables to test automation server

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

HTTP request

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

Path parameters

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

id

the id of the test automation server

evIds

ids of the environment variables

HTTP response

HTTP/1.1 204 No Content

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

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

HTTP request

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

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

Path parameters

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

id

the id of the test automation server

evId

id of the environment variable

Request fields

Path Type Description

value

String

new value to set

HTTP 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"
}

HTTP 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"
}