Analyses
Create an analysis and read it back. Creation is asynchronous — you get a job to poll.
/api/v1/analysesSubmit a repository (or demo/upload) and start scoring. Returns the analysis + a job.
/api/v1/analysesList previous analyses.
/api/v1/analyses/{analysisId}Fetch one analysis with its summary, dependencies, and status.
/api/v1/analyses/{analysisId}/dependenciesList the scored repositories for an analysis.
Dependencies & jobs
Drill into a single scored repository, or poll the background job that produced it.
/api/v1/dependencies/{dependencyId}One scored repository: risk profile, evidence, raw signals, features.
/api/v1/jobs/{jobId}Poll a scoring job's status (pending / running / completed / failed).
Training & evaluation
Read-only views of the promoted model and the dataset behind it — this is what the docs' evaluation pages render.
/api/v1/training/datasetSummary of the labeled dataset (size, class balance, coverage).
/api/v1/training/effectsAblation / feature-effect results, e.g. the bot-filter comparison.
/api/v1/training/runsList training runs with held-out metrics.
/api/v1/training/runs/latestThe currently deployed run and its metrics.
Operational
Liveness and readiness, unversioned. Ready reports whether the scoring service is reachable.
/healthLiveness — the process is up.
/readyReadiness — downstream scoring is reachable, else degraded.
The create → poll flow
Creating an analysis kicks off a background job and returns straight away with status: "pending". Poll the analysis (or the job) until it is completed, then read the dependencies for the risk profile. By default an identical recent submission is reused (HTTP 200 with reusedExistingAnalysis: true); send "force": true to force a fresh run.
POST /api/v1/analyses
Content-Type: application/json
{
"submission": {
"kind": "repository_url",
"repositoryUrl": "https://github.com/owner/repo"
}
}HTTP/1.1 201 Created
{
"analysis": { "id": "an_...", "status": "pending", ... },
"job": { "id": "job_...", "status": "pending", ... },
"reusedExistingAnalysis": false
}# poll the analysis until status is "completed"
curl -s http://localhost:8080/api/v1/analyses/an_... | jq '.analysis.status'
# then read the scored repository
curl -s http://localhost:8080/api/v1/analyses/an_.../dependencies \
| jq '.dependencies[0].riskProfile'Conventions
- Submission kinds:
repository_url,demo, andupload— each repository is scored on its own (see How scoring a repo works). - Errors come back as
{ "error": "..." }with a matching HTTP status (400bad payload,404unknown id,500internal). - Base URL is configurable; it defaults to
http://localhost:8080locally, and the web app proxies it at/api/v1.
For how these pieces fit together, see the system architecture.