Answer Behavioural Questions
answer_behavioural_questionsAnswer open behavioural questions, many in one call. Mutating; creates a model version.
Instructions
Answer open behavioural questions, many in one call. Mutating; creates a model version.
Answer only from what the code or the owner shows; say unknown
rather than guess, in a sentence or two. An extraction runs once every
owner question has an answer, or on extract_now=True (with no
answers, refused 409 questions_open while one is open, and 409
extraction_running while one is queued or running, or with no answer
since it started: poll it), billed to the caller (402 when short).
dry_run=True records nothing (no version, no escalation) and returns
outcome: whether the answers extract (extracts, estimate),
the questions left or raised. Dry-run, answer what is raised, then
submit once.
An answer is a fact (text), or a disposition its question lists:
not_needed, not_behaviour, unknown, as_stated; text
is then a note. A question about the model's own structure carries
structured: answer with structured naming the ids offered,
{"classes": [...]} or {"public": true}, {"zones": {id: zone}}, {"zone": z}, {"actions": [...]}, {"changes": {field: [actions]}}, {"receivers": [...]}, {"elements": [id | {"id", "secret": true}]} (a zone's contents: an id not offered is a
new element there; not_needed says it holds nothing). An offer with
new_zones
takes a zone it does not list, one with new_actors a receiver it
does not list, each added (409 id_in_use when the id names something
else). It edits the model at once. Where the code does more or less than
the sentence, add contradicts: {"direction": "code_does_more" | "code_does_less", "quote"?} (409 drift_is_defect over a defect's
sentence).
A program's answer is a judgment: refused with 403 and an
escalation_id unless delegated. Do not retry; poll
list_proposals.
With an extraction asked for, queued is true: follow it with
get_behavioural_model(view="status", wait_seconds=50).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| answers | No | JSON array of ``{"question_id", "text"?, "disposition"?, "structured"?, "contradicts"?}``, e.g. '[{"question_id": "q1", "text": "Only the owner deletes."}, {"question_id": "q3", "structured": {"classes": ["org_admin"]}}]'. | [] |
| dry_run | No | Return what the answers would do (``outcome``) and record nothing. Default False. | |
| model_id | Yes | ID of the threat model. | |
| extract_now | No | Extract now, with the answers collected. | |
| server_version | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||