Tests API


Overview

The Tests API allows creation and deletion of Tests via the API. Remember that runs and results are seperate APIs.

List

List all the hosts on your account

GET /api/tests

[
    {
        "id": 20,
        "created_at": "2021-02-13T17:07:34.000000Z",
        "updated_at": "2021-02-13T17:08:14.000000Z",
        "verified": true,
        "url": "walkstory.co",
        "port": 443,
        "protocol": "https"
    },
    {
        "id": 18,
        "created_at": "2021-02-13T16:44:48.000000Z",
        "updated_at": "2021-02-13T16:44:50.000000Z",
        "verified": true,
        "url": "blakey.co",
        "port": 443,
        "protocol": "https"
    }
]

Create

For creating a new test

POST /api/tests/create

Variables: 
 - name: Alphanumeric name of the test
 - rate: Spawn rate of the virtual users
 - users: Total virtual users to simulate
 - host_id: The ID of your Host to test
 - region: One of the regions defined below
 - locustfile: The full locustfile to use
 - servers: The number of worker servers to launch 

[
    {
        test_id: 123
    }
]

Delete

For deleting an existing test

POST /api/tests/delete

Variables: 
 - test_id: the id of the test to delete

{
    "test_id": 123,    
}

Regions

These are the available regions for tests. Use the 4 character code on the left with the API.

nyc3 => New York,
sfo3 => San Francisco,
lon1 => London,
ams3 => Amsterdam,
sgp1 => Singapore,
fra1 => Germany,
tor1 => Toronto,
blr1 => Bangalore,