Skip to content

Import what old runs assessed

POST
/api/runs/import
curl --request POST \
--url http://127.0.0.1:8765/api/runs/import

Import what old find-jobs runs assessed into the read model, once per run. Runs are read-only history since 0.1.10.7. Nothing of a run is rewritten, moved or copied: each posting a finished run assessed gets one row (state, requirement counts, and the provenance the run sealed: prompt version, constraints digest, story bank digest, the profile’s and the resume’s sealed identity, the posting digest, the model target), keyed by the run’s profile. A run sealed with no profile goes to the pseudo-profile ephemeral: hidden by default, never ranked, never in the pipeline. The read model uses a run’s assessment where nothing newer is stored for the same posting and profile. Idempotent: a run already imported is skipped, so a second call answers runs_imported: 0. The Scout server also does this once when it starts. rows_skipped and values_dropped count what a run sealed in a shape the read model does not hold (it holds no text); it is still in the run’s own record.

Success.

Media typeapplication/json
object
schema_version
required
Allowed value: scout-run-history:1
key
additional properties
any
Example
{
"assessments_imported": 13,
"by_profile": [
{
"assessments": 3,
"profile_id": "ephemeral"
},
{
"assessments": 10,
"profile_id": "prof_1"
}
],
"ephemeral_assessments": 3,
"imported": [
{
"assessments": 10,
"profile_id": "prof_1",
"run_id": "run_20260929T100000Z"
},
{
"assessments": 3,
"profile_id": "ephemeral",
"run_id": "run_20260801T090000Z"
}
],
"rows_skipped": 0,
"runs": 2,
"runs_already_imported": 0,
"runs_imported": 2,
"runs_not_finished": 0,
"runs_unreadable": 0,
"schema_version": "scout-run-history:1",
"values_dropped": 0
}

Forbidden / forbidden_origin: loopback peer and Host 127.0.0.1:<port> or localhost:<port> only (Origin too on writes).

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Examplegenerated
{
"error": {
"allowed_keys": [
"example"
],
"code": "example",
"message": "example"
}
}

Target_unavailable

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{
"error": {
"code": "target_unavailable",
"message": "..."
}
}

Unsupported_media_type: writes need Content-Type: application/json.

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Examplegenerated
{
"error": {
"allowed_keys": [
"example"
],
"code": "example",
"message": "example"
}
}

Unknown_key

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{
"error": {
"code": "unknown_key",
"message": "..."
}
}