Docs
API & CLI
API & CLI
Automate test generation and execution via API or CLI.
Use the API to integrate Fume into your workflows. You can find your API keys in your Fume dashboard at app.fumedev.com.
Authentication and base URL
- Base URL:
https://api.fumedev.com
- Header:
Authorization: $FUME_API_KEY
Trigger a test run
Minimal example (as provided):
curl -X POST \
-H "Authorization: $FUME_API_KEY" \
https://api.fumedev.com/test/trigger
Typical usage with payload:
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: $FUME_API_KEY" \
-d '{
"projectId": "proj_123",
"branch": "main",
"source": { "loomUrl": "https://www.loom.com/share/your-walkthrough" },
"ci": {
"commitSha": "abc123",
"buildUrl": "https://github.com/your-org/your-repo/actions/runs/1234567"
}
}' \
https://api.fumedev.com/test/trigger
Example response:
{
"runId": "run_42ab3d",
"status": "queued"
}
Node.js example (trigger only)
import fetch from "node-fetch";
const API_KEY = process.env.FUME_API_KEY;
const BASE_URL = "https://api.fumedev.com";
async function triggerRun() {
const response = await fetch(`${BASE_URL}/test/trigger`, {
method: "POST",
headers: {
"Authorization": API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({
projectId: "proj_123",
branch: "main",
// Optional: include a Loom URL or other supported source
// source: { loomUrl: "https://www.loom.com/share/your-walkthrough" }
})
});
if (!response.ok) throw new Error(`Trigger failed: ${response.status}`);
const data = await response.json();
console.log("Triggered run:", data);
}
triggerRun();
Error handling
401 Unauthorized
: Missing or invalidAuthorization
header.429 Too Many Requests
: Back off and retry with exponential backoff.5xx
: Transient server errors—retry with jitter.
Security
- Store
FUME_API_KEY
in your CI secrets or local.env
files; never commit it. - Scope keys per project where possible, and rotate regularly.