POST
/
tests
curl --request POST \
  --url https://app.loadforge.com/api/v2/tests \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "rate": 123,
  "servers": 123,
  "users": 123,
  "host_id": 123,
  "region": "<string>",
  "locustfile": "<string>"
}'
{
  "test_id": 123
}

Create a new test by providing details such as name, rate, servers, users, host_id, region, and locustfile. This endpoint allows you to programmatically set up load tests with your specific configuration.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
Test to create
name
string
required

Name of the test

rate
integer
required

Spawn rate of the virtual users

servers
integer
required

Number of worker servers to launch

users
integer
required

Total virtual users to simulate

host_id
integer
required

ID of the host to test

region
string
required

Region code for the test

locustfile
string
required

The full locustfile content

Response

200
application/json
Test creation response
test_id
integer

ID of the created test