Create a new proposal to change a threat profile
const url = 'https://api.adversarial.com/api/v1/threats/proposals';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"positions":[{"impact":"Very Low","likelihood":"Remote","name":"Sabotage"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.adversarial.com/api/v1/threats/proposals \ --header 'Content-Type: application/json' \ --data '{ "positions": [ { "impact": "Very Low", "likelihood": "Remote", "name": "Sabotage" } ] }'Request Bodyrequired
Section titled “Request Bodyrequired”object
Defines the new positions of the threats for this proposal action
A position of a threat.
This is used to calculate the consequence of moving a threat objective to a certain likelihood and impact.
object
Y-axis for the threat objective
X-axis for the threat objective
PK of the threat objective in the database
Responses
Section titled “Responses”Proposal created
A threat profile change proposal together with every action it contains.
object
A single proposed threat change, with the inherent scores it would set.
object
object
A User as returned by the API.
Profile images are not embedded — clients fetch them from
GET /api/v1/{icon} when icon is Some.
object
Relative path to the user’s avatar endpoint, e.g.
"users/{id}/avatar?v={hash}". None when the user has no avatar.
The current inherent scoring of a threat objective.
An inherent score is always scoped to one organization and one threat objective; it has no meaning outside that pairing.
object
The date the score was created.
An auto-incrementing PK value that uniquely identifies the score given the threat objective name
The y-axis
Whether this inherent score is a draft (excluded from some threat-level responses).
The x-axis
The proposal action PK that this score is associated with
The proposal PK that this score is associated with
The threat objective PK
object
A User as returned by the API.
Profile images are not embedded — clients fetch them from
GET /api/v1/{icon} when icon is Some.
object
Relative path to the user’s avatar endpoint, e.g.
"users/{id}/avatar?v={hash}". None when the user has no avatar.
A User as returned by the API.
Profile images are not embedded — clients fetch them from
GET /api/v1/{icon} when icon is Some.
object
Relative path to the user’s avatar endpoint, e.g.
"users/{id}/avatar?v={hash}". None when the user has no avatar.
A User as returned by the API.
Profile images are not embedded — clients fetch them from
GET /api/v1/{icon} when icon is Some.
object
Relative path to the user’s avatar endpoint, e.g.
"users/{id}/avatar?v={hash}". None when the user has no avatar.
Example
{ "actions": [ { "scores": [ { "impact": "Very Low", "likelihood": "Remote", "threat_objective_name": "Sabotage" } ] } ]}