Bridge Application
Bridge REST API
The bridge exposes its API on port 9013 when started as a web service. Paths are relative to the
service root — there is no /api prefix.
Authentication
Every endpoint requires the shared token in a header:
X-Auth-Token: <token>
X-Gitlab-Token is accepted as an alternative, so a GitLab webhook can trigger a run directly.
The token is compared against promethist.bridge.secret-token. If that property is blank, all
requests are refused with 403 — there is no unauthenticated mode. A wrong token also yields
403.
Starting Runs
All four run endpoints stream their response: one run ID per line, as the runs are started. Read the response as a stream — a run takes minutes, and the connection stays open meanwhile.
Shared parameters:
| Parameter | Default | Meaning |
|---|---|---|
|
|
Variable group used to resolve |
|
|
Milliseconds to wait between starting devices, so a provider is not hit with all sessions at once. |
|
|
How many runs execute concurrently. |
GET or POST /run/test-case/{testCaseId}
Runs every configuration of a test case. This is the endpoint to wire into CI or a scheduler.
curl -N -H "X-Auth-Token: $TOKEN" \
"https://bridge.example/run/test-case/$TEST_CASE_ID?parallelism=2"
GET /run/configuration?id={configurationId}
Runs a single saved configuration. test-case-id may be passed to associate the resulting run
with a test case.
GET /run
Runs an ad-hoc test built entirely from query parameters, with no saved configuration. Parameter
names are the hyphenated forms of the run properties:
key (required), device-uri (required), engine-url, client-url, relay-url, device-ref,
locale, sample-rate, audio-speed, text-only, no-system-prompt, speech-processing,
timeout, max-turns-per-session, session-count, device-count,
realtime-configuration-id, tester-test-mode, tested-agent-test-mode.
curl -N -H "X-Auth-Token: $TOKEN" \
"https://bridge.example/run?key=agent:tester\
&device-uri=https%3A%2F%2Feu.promethist.ai%3Fkey%3Dagent%3Aacme-support\
&timeout=300"
POST /run
The same, with a full BridgeProperties JSON body instead of query parameters — the way to start
a run with a non-trivial configuration, for example one with device-queries or
aggregate-weights.
curl -N -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"key": "agent:tester",
"device-uri": "https://eu.promethist.ai?key=agent:acme-support",
"timeout": 300,
"session-count": 2,
"aggregate-weights": { "taskCompletion": 0.7, "userEngagement": 0.3 }
}' \
"https://bridge.example/run"
Reading Results
GET /run/{runId}
The full BridgeRun document — status, reason, properties used, session ID, final screenshot and
evaluation results. See Results and Evaluation.
GET /run/test-case/{testCaseId}/runs
Paginated summaries of the runs of one or more test cases. The projection omits the screenshot and the evaluation payloads, so it is cheap to poll for a dashboard.
| Parameter | Default | Meaning |
|---|---|---|
|
|
Page index. |
|
|
Page size. |
|
— |
Additional test case IDs to include; repeat the parameter. |
Configurations
| Endpoint | Effect |
|---|---|
|
One configuration. |
|
Several configurations by ID. |
|
Create a configuration. The body is a |
|
Replace a configuration. |
|
Delete a configuration. |
Test Cases
| Endpoint | Effect |
|---|---|
|
One test case. |
|
Create a test case ( |
|
Replace a test case. |
|
Delete a test case. |
Service Endpoints
| Endpoint | Effect |
|---|---|
|
Returns |
|
Stores a synthetic run, to verify the MongoDB and Elasticsearch wiring of a fresh deployment. |
Scheduled Runs
The deployment can run tests on a schedule without any external system: the bridge Helm chart
renders one Kubernetes CronJob per configured job, each calling /run/test-case/{id} or
/run/configuration?id={id} with its own variable group and the auth token from a secret. See
the bridge chart.