Workspace API


The workspace API provides the interface to track test hours and execute load tests. It also makes an overview of test assets and recent test activity available.

Permissions

Workspace overview and test hour tracking do not require specific permissions.

Test execution requires the Execute Tests permission.

APIs

Workspace Overview

https://api.errthquake.com/workspaces

GET returns

[ workspace-summary-documents ]

Service accounts are tied to a single workspace, so the array of workspace summary documents will always have one entry.

Workspace Detail

https://api.errthquake.com/workspaces/<workspace-uuid>

GET returns

workspace-detail-document

Workspace Hours

https://api.errthquake.com/workspaces/<workspace-uuid>/hours

GET returns

[ hours-detail-documents ]

Workspaces currently use test time from a single hour bucket, so the array of hours detail documents will always have one entry.

Test Execution

https://api.errthquake.com/workspaces/<workspace-uuid>/exec

POST submits

[ test-execution-documents ]

POST returns

{
  map{ "id", <string: test id> }
}

Response Object Documents

Workspace Summary Document

{
  "workspace-uid": <string: workspace uuid>,
  "name": <string:workspace name>,
  "errthquake-version": <string:test engine version>,
  "test-hours": hours-summary-document,
  "collaboration":[ <string:email address> ],
  "test-execution":[ <string:email address> ],
  "num-service-accounts": <integer: number of service accounts>,
  "is-collaborator": <boolean: true for customers, false for service accounts>
}

Workspace Details Document

{
  "workspace-uid": <string: workspace uuid>,
  "name": <string:workspace name>,
  "errthquake-version": <string:test engine version>,
  "test-results":[ test-result-summary-documents ],
  "test-inputs":[ <string: filename> ],
  "test-configs":[ <string: filename> ],
  "test-objects":[ <string: filename> ],
  "test-hours": hours-summary-document,
  "max-test-duration": <duration string: maximum test duration>,
  "max-virtual-users": <integer: maximum virtual users per test>
}

duration string format: "XhYmZs", where Xh is X hours, Ym is Y minutes, and Zs is Z seconds.

See the Golang duration string format for complete documentation.

Hours Summary Document

{
  "hour-bucket-name": <string: hour bucket name>,
  "minutes-allocated": <integer: test minutes allocated for current subscription period>,
  "minutes-remaining": <integer: test minutes remaining in current subscription period>,
  "minutes-active-tests": <integer: test minutes allocated to currently active tests>
}

Hours Detail Document

{
  "id": <integer: hour bucket id>,
  "hour-bucket-name": <string: hour bucket name>,
  "billing-plan-uid": <string: current billing plan uuid>,
  "minutes-allocated": <integer: test minutes allocated for current subscription period>,
  "minutes-remaining": <integer: test minutes remaining in current subscription period>,
  "minutes-active-tests": <integer: test minutes allocated to currently active tests>
  "utc-activated-date": <ISO8601 timestamp: current subscription period start date>,
  "utc-rollover-date": <ISO8601 timestamp: current subscription period rollover date, null if the subscription will not roll over>,
  "utc-deactivated-date": <ISO8601 timestamp: current subscription period deactivation date, null if the subscription will roll over>,
  "workspaces": map: {<string: workspace name>, <string: workspace uuid> }
}

Test Execution Request Document

{
  "test-input": <string: csv input filename>,
  "test-config": <string: yaml configuration filename>,
  "virtual-users": <integer: number of simultaneous virtual users>,
  "test-duration": <string: test duration in "XmYs" minutes and seconds format, set for duration tests, empty for benchmark and interactive tests">,
  "ramp-duration": <string: test ramp-up duration in "XmYs" minutes and seconds format, empty when testing without a ramp-up period">,
  "test-type": <string: "duration", "benchmark", or "interactive">,
  "region": <string: cloud compute region hosting the test>
}

Test Result Summary Document

{
  "id": <string: alphanumeric test id, 8 characters>,
  "utc-start-time": <ISO8601 timestamp: test start time, null until test begins>,
  "utc-finish-time": <ISO8601 timestamp: test finish time, null until test begins, estimate of finish time until test ends>,
  "test-pending": <boolean: true until test begins>,
  "test-stopping": <boolean: false until test ends, true while storing test results>,
  "test-complete": <boolean: false until test results are stored>,
  "test-failed": <boolean: true if test failed to start>,
  "test-unresponsive": <boolean: true if test lost communication and became unresponsive>,
  "interactive": <boolean: true for interactive tests>,
  "virtual-users": <integer: number of virtual users requested for the test>
}