BugBrain API Reference
The BugBrain API enables you to programmatically create tests, run them, retrieve results, and manage your account.
Base URL
https://api.bugbrain.techAuthentication
All requests require a service API key (format: bugbrain_sk_*):
curl -H "Authorization: Bearer bugbrain_sk_abc123..." \
https://api.bugbrain.tech/api/test-casesCommon Endpoints
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/test-cases | List all test cases |
| POST | /api/test-cases | Create a test case |
| POST | /api/executions | Run a test |
| GET | /api/executions/[id] | Get execution results |
| GET | /api/executions/[id]/failure-analysis | Get AI failure analysis |
Rate Limits
- Per-minute: 30 requests
- Per-hour: 500 requests
Rate limit headers included in responses:
X-RateLimit-Limit: 500
X-RateLimit-Remaining: 497
X-RateLimit-Reset: 1614556800Webhooks
Receive real-time notifications when tests complete:
{
"event": "test.completed",
"data": {
"execution_id": "abc123",
"status": "passed",
"duration_ms": 8234
}
}API Sections
- Authentication — Service keys and auth modes
- Executions — Run and monitor tests
- Test Cases — Create and manage test cases
- Discovery — Web crawling API
- Webhooks — Event notifications
Code Examples
JavaScript
const fetch = require('node-fetch');
const response = await fetch('https://api.bugbrain.tech/api/test-cases', {
method: 'GET',
headers: {
'Authorization': 'Bearer bugbrain_sk_abc123...',
'Content-Type': 'application/json'
}
});
const tests = await response.json();
console.log(tests);Python
import requests
response = requests.get(
'https://api.bugbrain.tech/api/test-cases',
headers={
'Authorization': 'Bearer bugbrain_sk_abc123...',
'Content-Type': 'application/json'
}
)
tests = response.json()
print(tests)cURL
curl -H "Authorization: Bearer bugbrain_sk_abc123..." \
https://api.bugbrain.tech/api/test-casesNext Steps
Authentication — Learn about service keys Executions API — Run tests programmatically