1. Overview

JaaS in a main artifact in Jagger 2. It is an always listening component.

It provides different information through its REST API.

JaaS artifact packed as an all in jar (with all dependencies inside) with embedded Tomcat.

JaaS based on Spring Boot, so its properties can be configured using one of Spring Boot waysby default JaaS is listening on port 8080. To change it just override property "server.port".

1.1. Version information

Version : 2.0.1-SNAPSHOT

1.2. License information

License : Apache License, Version 2.0
License URL : https://github.com/griddynamics/jagger/blob/master/license.txt

1.3. URI scheme

Host : localhost
BasePath : /jaas

1.4. Tags

  • test-execution-rest-controller : Jagger Test Execution API. It provides endpoints for reading, creating, updating and deleting Test Executions. This API can be used manually or via separate Jenkins plugin, to run particular performance test projects on the selected test environment

  • test-environment-rest-controller : Jagger Test Environments API. It provides endpoints for reading, creating and updating Test Environments. Deleting is performed automatically by cleaning job. Expiration time of environments is set by property 'environments.ttl.minutes'. This API is user by Jagger load generation components for communication with JaaS. It allows JaaS to monitor running test environments and send commands to these environments. Test Environments API is not intended for manual usage

  • reporting-rest-controller : Reporting Rest Controller

  • data-service-rest-controller : Data Service Rest Controller

2. Resources

2.1. Data-service-rest-controller

Data Service Rest Controller

2.1.1. getSessions

GET /db/sessions
Parameters
Type Name Description Schema

Query

id
optional

id

< string > array(multi)

Responses
HTTP Code Description Schema

200

OK

< SessionEntity > array

500

500 - Internal server error.

There is a problem with the resource you are looking for, and it can not be displayed.

Error

Consumes
  • application/json

Produces
  • application/json

Example HTTP request
Request path
"/db/sessions"
Request query
{
  "id" : "string"
}
Example HTTP response
Response 200
"array"
Response 500
"<<_error>>"

2.1.2. getSession

GET /db/sessions/{sessionId}
Parameters
Type Name Description Schema

Path

sessionId
required

sessionId

string

Responses
HTTP Code Description Schema

200

OK

SessionEntity

500

500 - Internal server error.

There is a problem with the resource you are looking for, and it can not be displayed.

Error

Consumes
  • application/json

Produces
  • application/json

Example HTTP request
Request path
"/db/sessions/string"
Example HTTP response
Response 200
{
  "comment" : "string",
  "endDate" : "string",
  "id" : "string",
  "kernels" : 0,
  "startDate" : "string"
}
Response 500
"<<_error>>"

2.1.3. getSessionDecision

GET /db/sessions/{sessionId}/decision
Parameters
Type Name Description Schema

Path

sessionId
required

sessionId

string

Responses
HTTP Code Description Schema

200

OK

DecisionPerSessionDto

500

500 - Internal server error.

There is a problem with the resource you are looking for, and it can not be displayed.

Error

Consumes
  • application/json

Produces
  • application/json

Example HTTP request
Request path
"/db/sessions/string/decision"
Example HTTP response
Response 200
{
  "decision" : "string",
  "id" : 0,
  "sessionId" : "string",
  "testGroupDecisions" : [ {
    "decision" : "string",
    "id" : 0,
    "metricDecisions" : [ {
      "decision" : "string",
      "id" : 0,
      "metricDescription" : {
        "display" : "string",
        "displayName" : "string",
        "id" : 0,
        "metricId" : "string"
      }
    } ],
    "taskData" : {
      "id" : 0,
      "number" : 0,
      "sessionId" : "string",
      "status" : "string",
      "taskId" : "string",
      "taskName" : "string"
    },
    "testDecisions" : [ {
      "decision" : "string",
      "id" : 0,
      "metricDecisions" : [ {
        "decision" : "string",
        "id" : 0,
        "metricDescription" : {
          "display" : "string",
          "displayName" : "string",
          "id" : 0,
          "metricId" : "string"
        }
      } ],
      "taskData" : {
        "id" : 0,
        "number" : 0,
        "sessionId" : "string",
        "status" : "string",
        "taskId" : "string",
        "taskName" : "string"
      }
    } ]
  } ]
}
Response 500
"<<_error>>"

2.1.4. getTests

GET /db/sessions/{sessionId}/tests
Parameters
Type Name Description Schema

Path

sessionId
required

sessionId

string

Responses
HTTP Code Description Schema

200

OK

< TestEntity > array

500

500 - Internal server error.

There is a problem with the resource you are looking for, and it can not be displayed.

Error

Consumes
  • application/json

Produces
  • application/json

Example HTTP request
Request path
"/db/sessions/string/tests"
Example HTTP response
Response 200
"array"
Response 500
"<<_error>>"

2.1.5. getTest

GET /db/sessions/{sessionId}/tests/{testName}
Parameters
Type Name Description Schema

Path

sessionId
required

sessionId

string

Path

testName
required

testName

string

Responses
HTTP Code Description Schema

200

OK

TestEntity

500

500 - Internal server error.

There is a problem with the resource you are looking for, and it can not be displayed.

Error

Consumes
  • application/json

Produces
  • application/json

Example HTTP request
Request path
"/db/sessions/string/tests/string"
Example HTTP response
Response 200
{
  "clockValue" : 0,
  "decision" : "string",
  "description" : "string",
  "id" : 0,
  "load" : "string",
  "name" : "string",
  "startDate" : "string",
  "taskDataDto" : {
    "description" : "string",
    "id" : 0,
    "idToSessionId" : {
      "string" : "string"
    },
    "ids" : [ 0 ],
    "sessionId" : "string",
    "sessionIds" : [ "string" ],
    "taskName" : "string"
  },
  "terminationStrategy" : "string",
  "testExecutionStatus" : "string",
  "testGroupIndex" : 0
}
Response 500
"<<_error>>"

2.1.6. getMetrics

GET /db/sessions/{sessionId}/tests/{testName}/metrics
Parameters
Type Name Description Schema

Path

sessionId
required

sessionId

string

Path

testName
required

testName

string

Responses
HTTP Code Description Schema

200

OK

< MetricEntity > array

500

500 - Internal server error.

There is a problem with the resource you are looking for, and it can not be displayed.

Error

Consumes
  • application/json

Produces
  • application/json

Example HTTP request
Request path
"/db/sessions/string/tests/string/metrics"
Example HTTP response
Response 200
"array"
Response 500
"<<_error>>"

2.1.7. getMetricPlotData

GET /db/sessions/{sessionId}/tests/{testName}/metrics/plot-data
Parameters
Type Name Description Schema

Path

sessionId
required

sessionId

string

Path

testName
required

testName

string

Responses
HTTP Code Description Schema

200

OK

< string, < MetricPlotPointEntity > array > map

500

500 - Internal server error.

There is a problem with the resource you are looking for, and it can not be displayed.

Error

Consumes
  • application/json

Produces
  • application/json

Example HTTP request
Request path
"/db/sessions/string/tests/string/metrics/plot-data"
Example HTTP response
Response 200
"object"
Response 500
"<<_error>>"

2.1.8. getMetricsSummary

GET /db/sessions/{sessionId}/tests/{testName}/metrics/summary
Parameters
Type Name Description Schema

Path

sessionId
required

sessionId

string

Path

testName
required

testName

string

Responses
HTTP Code Description Schema

200

OK

< string, MetricSummaryValueEntity > map

500

500 - Internal server error.

There is a problem with the resource you are looking for, and it can not be displayed.

Error

Consumes
  • application/json

Produces
  • application/json

Example HTTP request
Request path
"/db/sessions/string/tests/string/metrics/summary"
Example HTTP response
Response 200
"object"
Response 500
"<<_error>>"

2.1.9. getMetrics

GET /db/tests/{testId}/metrics
Parameters
Type Name Description Schema

Path

testId
required

testId

integer(int64)

Responses
HTTP Code Description Schema

200

OK

< MetricEntity > array

500

500 - Internal server error.

There is a problem with the resource you are looking for, and it can not be displayed.

Error

Consumes
  • application/json

Produces
  • application/json

Example HTTP request
Request path
"/db/tests/0/metrics"
Example HTTP response
Response 200
"array"
Response 500
"<<_error>>"

2.2. Reporting-rest-controller

Reporting Rest Controller

2.2.1. getReport

GET /report
Parameters
Type Name Description Schema

Query

baseLineSessionId
optional

baseLineSessionId

string

Query

sessionId
required

sessionId

string

Responses
HTTP Code Description Schema

200

OK

WebAsyncTask«ResponseEntity«Resource»»

500

500 - Internal server error.

There is a problem with the resource you are looking for, and it can not be displayed.

Error

Consumes
  • application/json

Produces
  • /

Example HTTP request
Request path
"/report"
Request query
{
  "baseLineSessionId" : "string",
  "sessionId" : "string"
}
Example HTTP response
Response 200
{
  "callable" : { },
  "executor" : { },
  "timeout" : 0
}
Response 500
"<<_error>>"

2.3. Test-environment-rest-controller

Jagger Test Environments API. It provides endpoints for reading, creating and updating Test Environments. Deleting is performed automatically by cleaning job. Expiration time of environments is set by property 'environments.ttl.minutes'. This API is user by Jagger load generation components for communication with JaaS. It allows JaaS to monitor running test environments and send commands to these environments. Test Environments API is not intended for manual usage

2.3.1. Creates Test Environment.

POST /envs
Description

If operation successful, 'Environment-Session' cookie is returned with response, which is required for PUT request. This cookie is valid only for Test Environment with envId which was specified in request body.

Parameters
Type Name Description Schema

Body

testEnv
required

testEnv

TestEnvironmentEntity

Responses
HTTP Code Description Schema

200

OK

object

201

Creation is successful.

object

400

envId doesn’t match ^[a-zA-Z0-9._-]{1,249}$ OR status is inconsistent with runningLoadScenario.

No Content

409

Test Environment with provided envId already exists.

No Content

Consumes
  • application/json

Produces
  • /

Example HTTP request
Request path
"/envs"
Request body
{
  "environmentId" : "string",
  "loadScenarios" : [ {
    "loadScenarioId" : "string"
  } ],
  "runningLoadScenario" : {
    "loadScenarioId" : "string"
  },
  "status" : "string"
}
Example HTTP response
Response 200
"object"
Response 201
"object"

2.3.2. Retrieves all Test Environments.

GET /envs
Responses
HTTP Code Description Schema

200

OK

< TestEnvironmentEntity > array

500

500 - Internal server error.

There is a problem with the resource you are looking for, and it can not be displayed.

Error

Consumes
  • application/json

Produces
  • application/json

Example HTTP request
Request path
"/envs"
Example HTTP response
Response 200
"array"
Response 500
"<<_error>>"

2.3.3. Retrieves Test Environment by envId.

GET /envs/{envId}
Parameters
Type Name Description Schema

Path

envId
required

envId

string

Responses
HTTP Code Description Schema

200

Test Environment is found.
Headers :
Environment-Expires (string) : This header stores expiration time of Test Environment.

TestEnvironmentEntity

404

Test Environment with provided envId is not found.

No Content

500

500 - Internal server error.

There is a problem with the resource you are looking for, and it can not be displayed.

Error

Consumes
  • application/json

Produces
  • application/json

Example HTTP request
Request path
"/envs/string"
Example HTTP response
Response 200
{
  "environmentId" : "string",
  "loadScenarios" : [ {
    "loadScenarioId" : "string"
  } ],
  "runningLoadScenario" : {
    "loadScenarioId" : "string"
  },
  "status" : "string"
}
Response 500
"<<_error>>"

2.3.4. Updates Test Environment by envId.

PUT /envs/{envId}
Description

This operation can be performed only if 'Environment-Session' cookie is present and valid. To obtain this cookie POST to /envs must be performed firstly. This cookie is valid only for Test Environment with envId which was specified in POST request body.

Parameters
Type Name Description Schema

Path

envId
required

envId

string

Body

sessionId
optional

sessionId

string

Body

testEnv
required

testEnv

TestEnvironmentEntity

Responses
HTTP Code Description Schema

200

OK

object

202

Update is successful.

object

400

Environment-Session cookie is not present.

No Content

404

Test Environment with provided envId or sessionId is not found.

No Content

Consumes
  • application/json

Produces
  • /

Example HTTP request
Request path
"/envs/string"
Request body
{
  "environmentId" : "string",
  "loadScenarios" : [ {
    "loadScenarioId" : "string"
  } ],
  "runningLoadScenario" : {
    "loadScenarioId" : "string"
  },
  "status" : "string"
}
Example HTTP response
Response 200
"object"
Response 202
"object"

2.4. Test-execution-rest-controller

Jagger Test Execution API. It provides endpoints for reading, creating, updating and deleting Test Executions. This API can be used manually or via separate Jenkins plugin, to run particular performance test projects on the selected test environment

2.4.1. createTestExecution

POST /executions
Parameters
Type Name Description Schema

Body

testExecution
required

testExecution

TestExecutionEntity

Responses
HTTP Code Description Schema

200

OK

TestExecutionEntity

Consumes
  • application/json

Produces
  • application/json

Example HTTP request
Request path
"/executions"
Request body
{
  "auditEntities" : [ {
    "id" : 0,
    "newStatus" : "string",
    "oldStatus" : "string",
    "timestamp" : 0
  } ],
  "envId" : "string",
  "errorMessage" : "string",
  "executionTimeToStartInSeconds" : 0,
  "id" : 0,
  "loadScenarioId" : "string",
  "sessionId" : "string",
  "status" : "string",
  "testProjectURL" : "string"
}
Example HTTP response
Response 200
{
  "auditEntities" : [ {
    "id" : 0,
    "newStatus" : "string",
    "oldStatus" : "string",
    "timestamp" : 0
  } ],
  "envId" : "string",
  "errorMessage" : "string",
  "executionTimeToStartInSeconds" : 0,
  "id" : 0,
  "loadScenarioId" : "string",
  "sessionId" : "string",
  "status" : "string",
  "testProjectURL" : "string"
}

2.4.2. getTestExecutions

GET /executions
Parameters
Type Name Description Schema

Query

envId
optional

envId

string

Responses
HTTP Code Description Schema

200

OK

< TestExecutionEntity > array

500

500 - Internal server error.

There is a problem with the resource you are looking for, and it can not be displayed.

Error

Consumes
  • application/json

Produces
  • application/json

Example HTTP request
Request path
"/executions"
Request query
{
  "envId" : "string"
}
Example HTTP response
Response 200
"array"
Response 500
"<<_error>>"

2.4.3. getTestExecution

GET /executions/{testExecutionId}
Parameters
Type Name Description Schema

Path

testExecutionId
required

testExecutionId

integer(int64)

Responses
HTTP Code Description Schema

200

OK

TestExecutionEntity

500

500 - Internal server error.

There is a problem with the resource you are looking for, and it can not be displayed.

Error

Consumes
  • application/json

Produces
  • application/json

Example HTTP request
Request path
"/executions/0"
Example HTTP response
Response 200
{
  "auditEntities" : [ {
    "id" : 0,
    "newStatus" : "string",
    "oldStatus" : "string",
    "timestamp" : 0
  } ],
  "envId" : "string",
  "errorMessage" : "string",
  "executionTimeToStartInSeconds" : 0,
  "id" : 0,
  "loadScenarioId" : "string",
  "sessionId" : "string",
  "status" : "string",
  "testProjectURL" : "string"
}
Response 500
"<<_error>>"

2.4.4. updateTestExecution

PUT /executions/{testExecutionId}
Parameters
Type Name Description Schema

Path

testExecutionId
required

testExecutionId

integer(int64)

Body

executionEntity
required

executionEntity

TestExecutionEntity

Responses
HTTP Code Description Schema

200

OK

object

Consumes
  • application/json

Produces
  • /

Example HTTP request
Request path
"/executions/0"
Request body
{
  "auditEntities" : [ {
    "id" : 0,
    "newStatus" : "string",
    "oldStatus" : "string",
    "timestamp" : 0
  } ],
  "envId" : "string",
  "errorMessage" : "string",
  "executionTimeToStartInSeconds" : 0,
  "id" : 0,
  "loadScenarioId" : "string",
  "sessionId" : "string",
  "status" : "string",
  "testProjectURL" : "string"
}
Example HTTP response
Response 200
"object"

2.4.5. deleteTestExecution

DELETE /executions/{testExecutionId}
Parameters
Type Name Description Schema

Path

testExecutionId
required

testExecutionId

integer(int64)

Responses
HTTP Code Description Schema

200

OK

object

Consumes
  • application/json

Produces
  • /

Example HTTP request
Request path
"/executions/0"
Example HTTP response
Response 200
"object"