Extract Behavioural Model
extract_behavioural_modelGive a model that has no behavioural model one. Mutating only with confirm_estimate=True; a paid action then.
Instructions
Give a model that has no behavioural model one. Mutating only with
confirm_estimate=True; a paid action then.
The extraction is paid for by whoever requests it, so it is estimated first and the estimate is RELAYED TO THE PERSON before it is confirmed. Never confirm on your own.
Call with
confirm_estimate=False(the default): nothing is charged or written. The answer carries theestimate(the extraction, the existing controls' deltas and checks, the link-matching call and the re-judgement, by part), themodel_versionandset_revisionthe model stands at, andnoticeson what the extraction changes: judgements of the groups the threats reach are asked again, and posture can move down as well as up. Show all of it to the person.Once they agree, call with
confirm_estimate=Trueand those two values. The extraction is queued and the call returns at once (queued,extraction.job): it can take an hour on a long description. Pollget_behavioural_modeluntilextraction.jobis null; a new model version then holds the result (itsstatusmay beneeds_answers). Read the proposals withget_behavioural_links.
Refusals come back as data, {confirmed: false, http_status, code, message}: 409 has_behavioural_model (read it with
get_behavioural_model), 409 extraction_running (one is queued or
running: poll it), 409 review_stale (the model or its controls
changed since the estimate: confirm again with the values returned), 402
(the balance cannot cover the estimate). A 404 means the caller may not
start paid actions on the model.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_id | Yes | ID of the threat model. | |
| set_revision | No | With ``confirm_estimate=True``: the estimate's value. | |
| model_version | No | With ``confirm_estimate=True``: the estimate's value. | |
| server_version | Yes | ||
| confirm_estimate | No | False (default) estimates; True extracts. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||