Skip to content
The API may change between versions while TTX-Zone is 0.x.

Apply exercise scenario

POST
/api/v1/ttx/{ttx_id}/scenario/apply

Overwrite the exercise with a TTX-Zone or organization scenario – or, with dry_run (the default), only report what would happen.

dry_run
Dry Run
boolean
default: true
accept-language
Any of:
string
Media typeapplication/json
ScenarioApplyRequest

Overwrite the exercise with a library scenario.

object
id
required
Id
string
>= 1 characters <= 64 characters
language
Any of:
string
Allowed values: en es
source
required
Source
string
Allowed values: system organization
variables
Variables
object
<= 100 properties

Successful Response

Media typeapplication/json
ScenarioCheck

The outcome of checking a document against a target, with nothing written (a dry run) – or of the import itself. ok false: errors were found and nothing changed. replaces: what the target holds today and an apply would overwrite.

object
counts
Any of:
ScenarioCounts
object
actors
Actors
integer
0
files
Files
integer
0
images
Images
integer
0
injects
Injects
integer
0
needs
Needs
integer
0
objectives
Objectives
integer
0
phases
Phases
integer
0
tags
Tags
integer
0
threat_actors
Threat Actors
integer
0
errors
Errors
Array<object>
ScenarioIssue

One problem found before anything is written: path names where in the document (e.g. msel.injects[3].phase_code).

object
code
required
Code
string
message
required
Message
string
path
required
Path
string
format_version
Any of:
integer
language
Any of:
string
name
Any of:
string
ok
required
Ok
boolean
replaces
Any of:
ScenarioCounts
object
actors
Actors
integer
0
files
Files
integer
0
images
Images
integer
0
injects
Injects
integer
0
needs
Needs
integer
0
objectives
Objectives
integer
0
phases
Phases
integer
0
tags
Tags
integer
0
threat_actors
Threat Actors
integer
0
ttx_id
Any of:
string format: uuid
variables
Variables
Array<object>
ScenarioVariable

A {placeholder} the scenario’s text uses, and how often.

object
count
required
Count
integer
name
required
Name
string
warnings
Warnings
Array<object>
ScenarioIssue

One problem found before anything is written: path names where in the document (e.g. msel.injects[3].phase_code).

object
code
required
Code
string
message
required
Message
string
path
required
Path
string

Example

{
"counts": {
"actors": 0,
"files": 0,
"images": 0,
"injects": 0,
"needs": 0,
"objectives": 0,
"phases": 0,
"tags": 0,
"threat_actors": 0
},
"replaces": {
"actors": 0,
"files": 0,
"images": 0,
"injects": 0,
"needs": 0,
"objectives": 0,
"phases": 0,
"tags": 0,
"threat_actors": 0
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string

Example generated

{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}