Assess every posting of a run
const url = 'http://127.0.0.1:8765/api/runs/example/assess-all';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"start":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://127.0.0.1:8765/api/runs/example/assess-all \ --header 'Content-Type: application/json' \ --data '{ "start": true }'Assess every unassessed posting of a finished run (start / cancel / read). {} reads the plan and starts nothing. The queue is the run’s new postings not assessed yet, plus every posting of the run whose stored assessment for the selected profile was made with older settings (see basis_stale on GET /api/assessments): plan.count = plan.new_count + plan.stale_count. A current stored assessment is skipped. Only {"start": true} calls a model. 50 AT A TIME: one start assesses the NEWEST 50 of the queue and never more (by the day the posting went up); plan.count is then the 50, and plan.total / plan.more_after say how many there are in all and how many are left (neither key is there when the queue is 50 or fewer). The next start takes the next 50.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A run id from GET /api/runs (run_…).
Request Body
Section titled “Request Body”object
True stops.
True starts.
Example
{ "start": true}Responses
Section titled “Responses”Success.
object
Example
{ "counts": {}, "state": "idle"}Forbidden / forbidden_origin: loopback peer and Host 127.0.0.1:<port> or localhost:<port> only (Origin too on writes).
object
object
Examplegenerated
{ "error": { "allowed_keys": [ "example" ], "code": "example", "message": "example" }}Not_found
object
object
Example
{ "error": { "code": "not_found", "message": "..." }}Unsupported_media_type: writes need Content-Type: application/json.
object
object
Examplegenerated
{ "error": { "allowed_keys": [ "example" ], "code": "example", "message": "example" }}Unknown_key
object
object
Example
{ "error": { "code": "unknown_key", "message": "..." }}