Answer one open question — keep, reverse, or fall back to what the store asserted
const url = 'http://localhost:11044/api/v1/learn/example/answer';const options = { method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"choice":"example","subject":"example"}'};
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://localhost:11044/api/v1/learn/example/answer \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "choice": "example", "subject": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Id of the held draft review (learn- plus a UUID, as returned by POST /api/v1/learn/sources/{name}/learn) whose open question is answered; 404 when no draft of that id is held for this user, which includes an expired id and a database-description review
Request Bodyrequired
Section titled “Request Bodyrequired”The question to settle: subject is an open question’s subject as the review lists it, and choice one of that question’s option values. For a SQL source, a mined decision takes keep, reverse (flip an edge’s direction), or anything else to fall back to the mined default; a proposed join takes accept to add the key, and anything else drops the candidate. The draft is re-emitted with the answer recorded under the caller’s name
A person’s answer to one open question, sent to POST /learn/{id}/answer
object
The value of one of that question’s options (OptionWire.value), e.g. keep, reverse or accept
The question’s subject, as QuestionWire.subject gives it
Example generated
{ "choice": "example", "subject": "example"}Responses
Section titled “Responses”OK
A learning proposal to review before anything is written: what was read, what was decided and asked, the realm it would install, and where it stands. Answered by the learn, proposal, answer, approval and change endpoints; every part is flattened into one object
object
The proposal’s id, for the /learn/{id} endpoints. Held in memory for its owner only; another user’s or an expired one answers 404
Name of the source it was learned from, as SourceWire.name gives it
One line to show when the pass finishes: tables, decisions, joins that returned rows, open questions and decisions applied unconfirmed
Example generated
{ "id": "example", "source": "example", "summary": "example"}No draft review of that id is held for this owner
REVISION_STALE: another write changed the review first; fetch it again
A refusal that names a machine-readable code beside its explanation
object
The refusal’s code, for a client that branches rather than reads. Every value comes from the sealed LearningReviewRefusal hierarchy, except SOURCE_UNREADABLE which the 502 path builds directly.
What was refused and what to do about it, written to be shown to the person reviewing
Example
{ "code": "REVISION_STALE"}
