Skip to content

Latest commit

 

History

History
60 lines (50 loc) · 1.3 KB

File metadata and controls

60 lines (50 loc) · 1.3 KB

Run API

uvicorn api:app --reload --port 8000

## API Endpoints

### Health Check
```bash
GET http://localhost:8000/api/health

Returns server health status and agent availability.

Run a Test

POST http://localhost:8000/api/run-test
Content-Type: application/json

{
  "url": "https://example.com",
  "profile": "AVERAGE",
  "device_name": "iPhone 12",
  "browser_type": "Chrome",
  "resolution": "390x844",
  "language": "English",
  "ux_requirements": ["Standard Sign-up Flow completion"],
  "ui_requirements": ["Color usage matches design tokens"],
  "custom_mission": null
}

Returns a run_id that can be used to fetch results.

Get Test Results

GET http://localhost:8000/api/results/{run_id}

Returns complete test results including scores, issues, and assessments.

Get Test Status

GET http://localhost:8000/api/status/{run_id}

Returns current status of a running test (pending, running, completed, failed).

Get Test History

GET http://localhost:8000/api/history

Returns a list of all test runs with summaries.

Delete Test Results

DELETE http://localhost:8000/api/results/{run_id}

Deletes all data for a specific test run.

Testing

python api_test.py