REST API

Loadmill's API is an interface for interacting with Loadmill’s servers. Use it to create and launch your tests.

Before getting started you’ll need to generate an API token, take a look how to generate it here

post
Run Test Suite

https://www.loadmill.com/api/v1/test-suites/:id/run
Run a predefined test suite
Request
Response
Request
Path Parameters
id
required
string
UUID of the Test Suite to run.
Headers
Authorization
required
string
Authentication token - you can generate it in the "User menu"> "Settings" > "Security".
Query Parameters
forceAllFlows
optional
boolean
Default = false - running only flows marked for execution with CI toggle. If true - executing all flows.
Body Parameters
additionalDescription
optional
string
Add an additional description at the end of the current suite's description
overrideParameters
optional
object
name: value pairs to override the default parameters values of this specific run. i.e. {{"paramName1":"paramVal1"}, ...}
Response
200: OK
Test suite has launched successfully.
{testSuiteRunId: "running-uuid"}

get
Get Test Suite Run (Test Suite results)

https://www.loadmill/com/api/v1/test-suites-runs/:id
Get a launched Test Suite results
Request
Response
Request
Path Parameters
id
required
string
The running uuid. You get this ID in the response when launching a Test Suite
Headers
Authorization
required
string
Authentication token - you can generate it in the "User menu"> "Settings" > "Security"
Response
200: OK
{
"id": "test suite run uuid,
"description": "test suite run description",
"startTime": timestamp,
"endTime": timestamp | null,
"conf": {
"useCookies": true
},
"status": "PASSED" | "FAILED" | "RUNNING",
"displayName": "Display name of the executing user",
"testSuiteId": "origin test suite uuid" | null (if deleted),
"testSuiteFlowRuns": [
{
"id": "test suite flow run uuid",
"startTime": timestamp,
"endTime": timestamp | null,
"conf": {}, // executed flow conf
"description": "Flow description",
"status": "PASSED" | "FAILED" | "RUNNING",
"numOfRequests": number of requests in this flow conf,
"avgResTime": 199, // in ms
"duration": "422 ms"
}
],
"progress": "1/1", // flows progress
"successRate": "100%", // flows success rate
"avgResTime": "422 ms"
}

get
Get Test Suite Flow Run

https://www.loadmill.com/api/v1/test-suites-runs/flows/:id
Get Test Suite Flow results
Request
Response
Request
Path Parameters
id
required
string
The flow running uuid. You get this ID when fetching the Test Suite Run entity
Headers
Authorization
required
string
Authentication token - you can generate it in the "User menu"> "Settings" > "Security"
Response
200: OK
{
"id": "test suite flow run uuid",
"description": "Flow description",
"conf": {...}, // the executed flow conf
"status": "PASSED" | "FAILED" | "RUNNING",
"startTime": timestamp,
"testSuiteFlowId": "origin test suite flow uuid" | null (if deleted),
"testSuiteId": "origin test suite uuid" | null (if deleted)
}

post
Create Load Test

https://www.loadmill.com/api/v1/tests
Create a load test from load test configuration
Request
Response
Request
Headers
Authorization
required
string
Authentication token - you can generate it in the "User menu"> "Settings" > "Security"
Body Parameters
config
required
object
A load test configuration. The JSON test configuration may be exported from the Loadmill test editor or from an old test run. See a config example here - https://docs.loadmill.com/load-testing/working-with-the-test-editor/configuration-files
Response
200: OK
{ testId: "load test id" }

patch
Set Flow's Parameter Pool

https://www.loadmill.com/api/v1/test-suites/:suiteId/flows/:flowId/pools
Create a parameter pool and attach it to a flow
Request
Response
Request
Path Parameters
suiteId
required
string
The suite UUID in which the flow resides
flowId
required
string
The flow UUID. The parameter pool will be attached to this flow
Headers
content-type
required
string
must be text/csv
Authorization
required
string
Authentication token - you can generate it in the "User menu"> "Settings" > "Security"
Query Parameters
name
optional
string
name of the parameter pool data
Body Parameters
body
required
string
The CSV data in CSV format.
Response
200: OK

put
Run Load Test

https://www.loadmill.com/api/v1/tests/:id/load
Run an existing load test. Be aware that a given load test can be run only once. In order to rerun it you will have to recreate it.
Request
Response
Request
Path Parameters
id
required
string
Load test ID
Headers
Authorization
required
string
Authentication token - you can generate it in the "User menu"> "Settings" > "Security"
Response
200: OK

get
Get Load Test

https://www.loadmill.com/api/v1/tests/:id
Returns the Load Test data. If the Load Test has ended it would contain its result.
Request
Response
Request
Path Parameters
id
required
string
Load test ID
Headers
Authorization
required
string
Authentication token - you can generate it in the "User menu"> "Settings" > "Security"
Response
200: OK
{
"id": "load test id",
"startTime": timestamp,
"endTime": timestamp,
"usedSeconds": "total seconds used by all sessions",
"description": "load description",
"conf": {}, // load test configuraion
"result": "aborted" | "done" | "failed",
"failedIterations": number,
"successfulIterations": number
}

get
Team's labels

https://www.loadmill.com/api/v1/labels
Returns all user's team's labels
Request
Response
Request
Headers
Authorization
required
string
Authentication token - you can generate it in the "User menu"> "Settings" > "Security".
Query Parameters
filter=CI_enabled
optional
string
Using this filer option the user can get only the labels who are attached to flows with the CI toggle on
Response
200: OK
{
"teamLabels": [
{
"id": "123e4567-e89b-12d3-a456-426614174001",
"description": "my label",
},
{
"id": "123e4567-e89b-12d3-a456-426614174002",
"description": "another label",
}
]
}