loader.io API load testing documentation

Table of Contents

    API

    Mock Server

    Use this URL to access a mockup of the API server. Your traffic will be recorded and compared to the documentation. You'll find your traffic analysis in the inspector or directly here in the documentation, right next to each resource.

loader.io API load testing documentation

All requests require an API key. While you can specify the API key in the body of your request, we’d prefer it be passed via the loaderio-Auth header. You can do this as follows:

In the Header: loaderio-Auth: {api_key}

In the Body: api_key={api_key}

Application Resources

GET

/v2/apps

List registered applications

Response

200 (OK)
    Content-Type: application/json
    
[
  {
    "app": "gonnacrushya.com",
    "status": "verified",
    "app_id": "0f2fabf74c5451cf71dce7cf43987477"
  },
  {
    "app": "google.com",
    "status": "unverified",
    "app_id": "b579bbed7ef480e7318ac4d7b69e5caa"
  }
]

GET

/v2/apps/{app_id}

Application status

Response

200 (OK)
    Content-Type: application/json
    
{
  "app": "gonnacrushya.com",
  "status": "verified",
  "app_id": "0f2fabf74c5451cf71dce7cf43987477"
}

POST

/v2/apps

Register a new application

Format: myapp.com or www.myapp.com (note: myapp.com & www.myapp.com are different applications)

Response

200 (OK)
    Content-Type: application/json
    
{
  "message": "success",
  "app_id": "0f2fabf74c5451cf71dce7cf43987477",
  "verification_id": "loaderio-0f2fabf74c5451cf71dce7cf43987477"
}

POST

/v2/apps/{app_id}/verify

Verify a registered application

Response

200 (OK)
    Content-Type: application/json
    
{
  "app_id": "0f2fabf74c5451cf71dce7cf43987477",
  "message": "success"
}

Test Resources

GET

/v2/tests

List of load tests

Response

200 (OK)
    Content-Type: application/json
    
[
  {
    "name": "GonnaCrushYa",
    "duration": 60,
    "timeout": 0,
    "notes": null,
    "from": 0,
    "to": 250,
    "status": "complete",
    "test_id": "0642ee5387b4ee35b581b6bf1332c70b",
    "request_type": "GET",
    "url": "http://gonnacrushya.com"
  }
]

POST

/v2/tests

Create a new load test

Response

200 (OK)
    Content-Type: application/json
    
{
    "message":"success",
    "test_id":"0642ee5387b4ee35b581b6bf1332c70b"
}

GET

/v2/tests/{test_id}

Load test status

Response

200 (OK)
    Content-type: application/json
    
{
  "name": "GonnaCrushYa Home Page",
  "duration": 60,
  "timeout": 10000,
  "notes": "",
  "from": 0,
  "to": 250,
  "status": "complete",
  "test_id": "0642ee5387b4ee35b581b6bf1332c70b",
  "request_type": "GET",
  "url": "http://gonnacrushya.com.com"
}

GET

/v2/tests/{test_id}/results

Load test results

Response

200 (OK)
    Content-type: application/json
    
{
  "name": "GonnaCrushYa Home Page",
  "duration": 60,
  "timeout": 10000,
  "notes": "",
  "from": 0,
  "to": 250,
  "status": "complete",
  "test_id": "0642ee5387b4ee35b581b6bf1332c70b",
  "request_type": "GET",
  "url": "http://gonnacrushya.com",
  "results_data": {
    "started_at": "2013-05-09T23:31:25+03:00",
    "public_results_url": "http://loader.io/results/0642ee5387b4ee35b581b6bf1332c70b",
    "avg_response_time": 7,
    "avg_error_rate": 0.0,
    "success": 213154,
    "error": 0,
    "timeout_error": 0,
    "network_error": 0, 
    "data_sent": 470857186,
    "data_received": 23666310
  }
}

PUT

/v2/tests/{test_id}/stop

Stop load test

Response

200 (OK)
    Content-type: application/json
    
{
  "name": "GonnaCrushYa Home Page",
  "duration": 60,
  "timeout": 10000,
  "notes": "",
  "from": 0,
  "to": 250,
  "status": "complete",
  "test_id": "0642ee5387b4ee35b581b6bf1332c70b",
  "request_type": "GET",
  "url": "http://gonnacrushya.com"
}

Servers

GET

/v2/servers

Load test server's ip addresses

Response

200 (OK)
    Content-type: application/json
    
{
  "ip_addresses": ["127.0.0.1"]
}