Resolve the persisted AI coaching artifact for a surface + subject
const url = 'http://localhost:8000/api/coaching/artifacts/';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:8000/api/coaching/artifacts/ \ --header 'Authorization: Bearer <token>'Returns the unified, coach-editable AI artifact for one (surface, subject_id, lang, units, focus) key, team-scoped.
markdown is the effective text — the coach’s edit if one exists, else the raw model draft. draft_markdown + is_edited let the UI offer a ‘revert to AI draft’ action and warn before a regenerate. 404 when no artifact has been generated for the key yet (the surface should then stream + generate one).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Session focus / dashboard-activity discriminator; default empty.
en (default) | ru | es.
Owning object id (session / run / client / team UUID).
session | solution | client | dashboard_overview | dashboard_activity | dashboard_business.
metric (default) | imperial.
Responses
Section titled “Responses”Read shape. markdown is the effective text (the coach edit if one
exists, else the raw model draft) — the field UIs render. draft_markdown
is_editedare also exposed so the UI can offer a “revert to AI draft” affordance and warn before a regenerate would overwrite the draft.citationsis the grounding provenance (#759) — the curated-corpus section titles the draft was grounded in; the FE replays them as the “Based on: …” footnote when a persisted take is reopened without a live stream (authed session panel + cached Solutions report), so provenance survives non-live paths, not just the SSEcitationsframe.
object
Example
{ "surface": "session", "lang": "en", "unit_system": "metric", "focus": ""}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Examplegenerated
{ "detail": "example"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Examplegenerated
{ "detail": "example"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Examplegenerated
{ "detail": "example"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Examplegenerated
{ "detail": "example"}