http://localhost:8000
All platform and service endpoints require authentication via API key:
-H "X-API-Key: ak_{key_id}_{secret}"Note: API keys must be manually seeded in the database currently.
Platform endpoints for managing test environments and runs.
GET /api/platform/healthReturns platform health status.
Response:
{
"status": "healthy",
"service": "diff-the-universe"
}GET /api/platform/testSuitesReturns all test suites.
Note: Test suites are currently read-only via API. Must be created directly in database.
Response:
[
{
"id": "suite-123",
"name": "Slack Agent Tests",
"tests": [...]
}
]GET /api/platform/testSuites/{suiteId}Returns a specific test suite with its tests.
Response:
{
"id": "suite-123",
"name": "Slack Agent Tests",
"tests": [
{
"id": "test-456",
"name": "Post message to channel",
"prompt": "Post 'Hello' to #general",
"expectedOutput": {...}
}
]
}POST /api/platform/initEnvCreates an isolated test environment with its own database schema.
Request Body:
{
"templateService": "slack",
"templateName": "slack_default",
"impersonateUserId": "U01AGENBOT9",
"ttlSeconds": 1800
}Parameters:
testId(UUID, optional) - ID of the test definitiontemplateId(UUID, optional) - Direct template ID selectortemplateService(string, optional) - Service name:"box","linear","slack","calendar"templateName(string, optional) - Template name (used withtemplateService)templateSchema(string, optional) - Legacy fallback: schema name to clone fromttlSeconds(number, optional) - Time-to-live in secondsimpersonateUserId(string, optional) - User ID to impersonate in servicesimpersonateEmail(string, optional) - Email to impersonate in services
Use templateService + templateName (preferred) or templateId to select a template.
Response:
{
"environmentId": "abc123",
"templateSchema": "slack_default",
"schemaName": "state_abc123",
"service": "slack",
"environmentUrl": "/api/env/abc123/services/slack",
"expiresAt": "2025-10-12T20:00:00Z"
}POST /api/platform/startRunTakes a "before" snapshot of the environment state.
Request Body:
{
"envId": "abc123",
"testId": "test-uuid-optional",
"testSuiteId": "suite-uuid-optional"
}Parameters:
envId(string, required) - Environment ID frominitEnvtestId(UUID, optional) - Links run to a specific test definitiontestSuiteId(UUID, optional) - Links run to a test suite
Response:
{
"runId": "run-789",
"status": "running",
"beforeSnapshot": "before_abc123_1234567890"
}POST /api/platform/evaluateRunTakes an "after" snapshot, computes diff, evaluates assertions.
Request Body:
{
"runId": "run-789",
"expectedOutput": null
}Parameters:
runId(string, required) - Run ID fromstartRunexpectedOutput(object, optional) - Assertion spec to evaluate against. If omitted, uses the stored test'sexpected_output(when run has atest_id).
Response:
{
"runId": "run-789",
"status": "completed",
"passed": true,
"score": {
"passed": 1,
"total": 1,
"percent": 100.0
}
}GET /api/platform/results/{run_id}Retrieves results for a completed test run.
Response:
{
"runId": "run-789",
"status": "completed",
"passed": true,
"score": {
"passed": 1,
"total": 1,
"percent": 100.0
},
"failures": [],
"diff": {...},
"createdAt": "2025-10-12T19:30:00Z"
}DELETE /api/platform/env/{envId}Cleans up an environment and its database schema.
Response:
{
"environmentId": "abc123",
"status": "deleted"
}Service endpoints mimic real service APIs but are isolated per environment.
Base path: /api/env/{envId}/services/slack
Implements Slack Web API methods:
POST /api/env/{envId}/services/slack/chat.postMessageRequest Body:
{
"channel": "C123456",
"text": "Hello from agent!",
"thread_ts": "1234567890.123456"
}GET /api/env/{envId}/services/slack/conversations.listQuery Parameters:
types- Comma-separated list (e.g., "public_channel,private_channel")limit- Number of results to return
GET /api/env/{envId}/services/slack/users.info?user=U123456See Slack Web API documentation for full method details.
Base path: /api/env/{envId}/services/box/2.0
Implements Box REST API endpoints for files, folders, comments, tasks, collaborations, and search.
See Box API documentation for method details.
Base path: /api/env/{envId}/services/calendar
Implements Google Calendar-style REST API for calendars, events, ACLs, and channels.
See Google Calendar API documentation for method details.
Base path: /api/env/{envId}/services/linear
Implements Linear's GraphQL API at /api/env/{envId}/services/linear/graphql.
See Linear API documentation for query/mutation details.
All endpoints return errors in this format:
{
"ok": false,
"error": "error_code",
"detail": "Human-readable error message"
}Common error codes:
not_authed- Missing or invalid API keyinvalid_environment_path- Malformed environment IDenvironment_not_found- Environment doesn't exist or expiredinternal_error- Server error