Projects API
All project endpoints are under
/api/v1/(INF-005). Legacy/api/*paths are 308-redirected.
Create a Project
POST /api/v1/projectsBody:
{
"name": "My App",
"url": "https://example.com",
"credentials": { // optional
"username": "admin",
"password": "secret"
}
}List Projects
GET /api/v1/projectsReturns an array of all non-deleted projects.
Get a Project
GET /api/v1/projects/:idDelete a Project
DELETE /api/v1/projects/:idSoft-deletes the project and cascade soft-deletes all its tests and runs. Items are moved to the Recycle Bin and can be restored via POST /api/v1/restore/project/:id. Healing history and activities are preserved for audit trail. Returns 409 if a crawl or test run is in progress.
Response:
{
"ok": true,
"deletedTests": 12,
"deletedRuns": 5,
"destroyedTokens": 2,
"destroyedSchedule": true
}WARNING
CI/CD trigger tokens and cron schedules are permanently deleted (not soft-deleted) because they are security credentials and active cron tasks. Restoring the project from the Recycle Bin will not restore these — they must be re-created manually.
Start a Crawl
POST /api/v1/projects/:id/crawlLaunches Chromium, crawls the project URL, and generates tests via the AI pipeline. Returns a run ID for tracking via SSE.
Body (optional):
{
"maxDepth": 3,
"dialsConfig": { ... }
}Run Regression
POST /api/v1/projects/:id/runExecutes all approved tests for the project. Returns a run ID.
CI/CD Trigger
POST /api/v1/projects/:id/triggerAuth: Authorization: Bearer <project-trigger-token> (not a user JWT).
Token-authenticated endpoint for CI/CD pipelines. Starts a test run using the project's approved tests and returns immediately.
Body (optional):
{
"dialsConfig": { "parallelWorkers": 2 },
"callbackUrl": "https://ci.example.com/hooks/sentri"
}Response 202 Accepted:
{ "runId": "RUN-42", "statusUrl": "https://sentri.example.com/api/v1/projects/PRJ-1/trigger/runs/RUN-42" }Poll statusUrl with the same Bearer token until status is no longer "running". If callbackUrl is provided, Sentri POSTs a JSON summary on any terminal state (completed, failed, or aborted) — best-effort, 10s timeout. The payload includes error: null | string so CI pipelines can distinguish success from failure.
| Error | Reason |
|---|---|
| 400 | No approved tests |
| 401 | Missing or invalid Bearer token |
| 403 | Token belongs to a different project |
| 404 | Project not found |
| 409 | Another run already in progress |
| 429 | Rate limit exceeded |
List Trigger Tokens
GET /api/v1/projects/:id/trigger-tokensReturns all trigger tokens for the project (token hashes are never returned).
Response:
[
{ "id": "WH-1", "label": "GitHub Actions", "createdAt": "...", "lastUsedAt": "..." }
]Create Trigger Token
POST /api/v1/projects/:id/trigger-tokensBody (optional):
{ "label": "GitHub Actions" }Response 201:
{ "id": "WH-1", "token": "<plaintext — shown once>", "label": "GitHub Actions", "createdAt": "..." }WARNING
The plaintext token is returned exactly once. Store it securely (e.g. as a CI secret). It cannot be retrieved again.
Revoke Trigger Token
DELETE /api/v1/projects/:id/trigger-tokens/:tidPermanently deletes the token. CI pipelines using it will fail immediately.
Get Schedule
GET /api/v1/projects/:id/scheduleReturns the current cron schedule for a project, or null if none exists.
Response:
{ "schedule": { "id": "SCH-1", "projectId": "PRJ-1", "cronExpr": "0 9 * * 1", "timezone": "UTC", "enabled": true, "lastRunAt": null, "nextRunAt": "2026-04-21T09:00:00.000Z", "createdAt": "...", "updatedAt": "..." } }Create or Update Schedule
PATCH /api/v1/projects/:id/scheduleBody:
{
"cronExpr": "0 9 * * 1",
"timezone": "America/New_York",
"enabled": true
}cronExpr— 5-field cron expression (required). 6-field (with seconds) is rejected.timezone— IANA timezone name (default"UTC").enabled— Whether the schedule is active (defaulttrue).
Response:
{ "ok": true, "schedule": { ... } }| Error | Reason |
|---|---|
| 400 | Missing or invalid cronExpr, or 6-field expression |
| 404 | Project not found |
Delete Schedule
DELETE /api/v1/projects/:id/scheduleRemoves the cron schedule and cancels the running cron task.
| Error | Reason |
|---|---|
| 404 | Project not found, or no schedule exists |