API Documentation
OpenLoadAPI REST API v1. Base URL: https://api.openloadapi.com/v1
Authentication
Include your API key in the Authorization header:
Authorization: Bearer ola_your_api_key
Find your API key in Console → Settings.
Domain Verification
Before running tests, you must verify ownership of the target domain.
Start verification
POST /v1/domains/verify
{
"domain": "yourapp.com",
"method": "dns" // or "http"
}
DNS verification: Add a TXT record openloadapi-verify={token} to your domain.
HTTP verification: Upload a file at /.well-known/openloadapi-verify.txt containing the token.
List verified domains
GET /v1/domains
Load Tests
Create and run a test
POST /v1/tests
{
"name": "API Load Test",
"target_url": "https://api.yourapp.com/endpoint",
"method": "GET",
"headers": {
"Authorization": "Bearer token"
},
"virtual_users": 1000,
"duration_seconds": 300,
"ramp_up_seconds": 60,
"test_type": "load", // load | stress | spike | soak
"regions": ["eu-west", "us-east"],
"success_criteria": {
"max_p95_response_ms": 500,
"max_error_rate_percent": 1
}
}
List tests
GET /v1/tests
Get test details
GET /v1/tests/{id}
Live metrics (polling)
GET /v1/tests/{id}/live // poll every 2s
Cancel a test
POST /v1/tests/{id}/cancel
Delete a test
DELETE /v1/tests/{id}
CI/CD Integration
Use the /ci endpoint to run a test synchronously — it blocks until the test finishes and returns pass/fail:
POST /v1/tests/ci
{
// Same body as POST /v1/tests
"name": "CI Load Test",
...
}
// Response after test completes:
{
"test_id": 42,
"status": "completed",
"pass_fail": "pass",
"summary": { ... },
"report_url": "https://..."
}
Exit code: pass → 0, fail → 1. Timeout after 10 minutes.
GitHub Actions
# .github/workflows/load-test.yml
name: Load Test
on:
push:
branches: [main]
jobs:
load-test:
runs-on: ubuntu-latest
steps:
- name: Run load test
run: |
curl -sf -X POST https://api.openloadapi.com/v1/tests/ci \
-H "Authorization: Bearer ${{ secrets.OPENLOADAPI_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"name": "CI — ${{ github.sha }}",
"target_url": "https://your-api.com/health",
"virtual_users": 100,
"duration_seconds": 60,
"regions": ["eu-west"],
"success_criteria": {
"max_p95_response_ms": 500,
"max_error_rate_percent": 1
}
}'
GitLab CI
# .gitlab-ci.yml
load-test:
stage: test
script:
- |
curl -sf -X POST https://api.openloadapi.com/v1/tests/ci \
-H "Authorization: Bearer $OPENLOADAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"GitLab CI","target_url":"https://your-api.com","virtual_users":100,"duration_seconds":60,"regions":["eu-west"]}'
Available Regions
eu-west, eu-north, eu-south
us-east, us-west, us-central
ca-east, sa-east
asia-southeast, asia-east, asia-south
au-east, af-south, me-south