Refresh a profile's selection of the master
const url = 'http://127.0.0.1:8765/api/master/selection';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"profile_id":"prof_1","use":"refresh"}'};
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/master/selection \ --header 'Content-Type: application/json' \ --data '{ "profile_id": "prof_1", "use": "refresh" }'Refresh one profile’s selection of the master, or print its resume again. use refresh: the pick is made by code (no model) against the postings the profile’s titles match in the local index, with the lines it shows now as the prior, and fitted to 2 pages; a profile with no selection gets its first one. The profile’s resume then IS this selection, so what was assessed or tailored on the earlier resume is re-opened as for any new resume. changes[0]: action first | refreshed, added and removed (ids, against what it showed), pages, fits, postings (how many matching postings the pick was made against). use sync brings in the master’s edited wording and drops retired lines, and selects nothing new (changes is empty when the resume already says what the master says). The reply also carries the profile’s status after the change, as GET /api/master/selection gives it. A profile’s selection of the master is sticky: it changes only when a line it shows is edited or retired, or on a refresh. Lines the master gained since the selection was made are offered (new_lines, and offer: “3 new master lines: refresh?”), never added by themselves. attached false: the profile’s resume was replaced by hand after the selection was made, so it no longer shows it (a refresh selects again). stale: the master edited or retired a line the selection shows and the profile’s resume has not been printed again (use sync). has_selection false: the profile still shows its own resume. tailoring_basis: what a resume for a job is made from for the profile, by the one rule the tailoring itself follows: master (the job’s candidate lines of the whole master; a profile with no selection too) or profile_resume (its own resume: only when attached is false); tailoring_basis_line is the sentence for it. pending lists profiles whose first selection is being made right now (a profile created a moment ago). Ids, counts and states only: no line’s text.
Request Bodyrequired
Section titled “Request Bodyrequired”object
With use refresh: say what it would pick; write nothing.
The profile.
Refresh (the default) selects again from the whole master; sync only prints the resume again from the lines it already shows.
Example
{ "profile_id": "prof_1", "use": "refresh"}Responses
Section titled “Responses”Success.
object
Example
{ "changes": [ { "action": "refreshed", "added": [ "b-4f0c1a" ], "changed": [], "fits": true, "label": "Staff Engineer", "pages": 2, "postings": 40, "profile_id": "prof_1", "removed": [ "b-fin-07" ], "resume_ref": { "content_sha256": "sha256:...", "record_id": "record_...", "revision_id": "revision_..." }, "retired": [], "shown": 38, "skills": 22, "source": "refresh", "written": true } ], "dry_run": false, "master": { "content_sha256": "sha256:...", "counts": { "by_kind": { "bullet": 1, "other": 0, "skills": 1, "summary": 1 }, "by_strength": { "backed": 0, "quantified": 1, "stated": 2 }, "entries": 1, "ids": 4, "items": 3, "skills": 3 }, "parent_revision": "revision_7c1d7b9a-0d58-4f0b-8f27-91f4f6f6a2c3", "record_id": "record_...", "revision": 3, "revision_id": "revision_0b6f2f0e-5a0e-4c58-9a57-2d1b6a0c1e11", "revisions": 3, "updated_at": "2026-10-04T10:05:00.000000Z", "written_by": "operator" }, "pending": [], "profiles": [ { "attached": true, "changed": [], "excludes": [], "has_selection": true, "label": "Staff Engineer", "made_from_revision": 1, "master_revision": 3, "new_lines": [ "b-4f0c1a", "b-91be02", "o-77aa10" ], "offer": "3 new master lines: refresh?", "pending": false, "pins": [], "profile_id": "prof_1", "retired": [], "selector_version": "sel-1", "shown": 36, "skills": 20, "skills_retired": [], "source": "migration", "stale": false, "state": "active", "tailoring_basis": "master", "tailoring_basis_line": "A resume for a job is picked from your whole master resume." } ], "schema_version": "scout-master-selection:1", "use": "refresh"}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" }}Profile_not_found, master_not_found, target_unavailable
object
object
Example
{ "error": { "code": "profile_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, invalid_value
object
object
Example
{ "error": { "code": "unknown_key", "message": "..." }}