scenario_api
scenario_api
get_version
def get_version() -> strReturn publish API version.
Returns:
The version number is a string
fetch_attacks
def fetch_attacks() -> AnyList all available unit attacks
Returns:
the list of unit attacks
fetch_attack_by_name
def fetch_attack_by_name(attack_name: str) -> AnyGet the full JSON manifest of a specific unit attack
Arguments:
attack_name: the name of the unit attack to fetch
Returns:
the JSON of unit attacks
fetch_scenarios
def fetch_scenarios() -> List[Scenario]List all available scenarios
Returns:
the list of scenarios
fetch_scenario_by_name
def fetch_scenario_by_name(scenario_id: str) -> ScenarioGet the full JSON manifest of a specific scenario.
Arguments:
scenario_id: id of the scenario to fetch
Returns:
the JSON of the scenario
fetch_topologies
def fetch_topologies() -> List[Topology]List all available topologies
Returns:
the list of topologies
fetch_topology_by_name
def fetch_topology_by_name(topology_name: str) -> TopologyGet the topology object given its name.
Arguments:
topology_name: name of the topology
Returns:
the topology object
fetch_baseboxes
def fetch_baseboxes() -> List[Basebox]List all available baseboxes
Returns:
the list of baseboxes
fetch_basebox_by_id
def fetch_basebox_by_id(basebox_id: str) -> BaseboxGet the basebox object given its ID.
Arguments:
basebox_id: name of the basebox
Returns:
the basebox object
get_log_collectors
def get_log_collectors() -> List[LogCollector]Retrieve log collectors configuration information.
create_lab_topology
def create_lab_topology(topology: Topology, lab_config: LabConfig,
group_name: str, group_id: str) -> strCreate a lab with the given topology.
Arguments:
topology: the topology to run
Returns:
a lab uuid
run_lab_topology
def run_lab_topology(topology: Topology, lab_config: LabConfig,
group_name: str, group_id: str) -> strRun the given topology.
Arguments:
topology: the topology to run
Returns:
a lab id
create_lab_basebox
def create_lab_basebox(basebox_id: str, lab_config: LabConfig, group_name: str,
group_id: str) -> strCreate a lab with the given basebox.
Arguments:
basebox_id: the basebox to run
Returns:
a lab uuid
run_lab_basebox
def run_lab_basebox(basebox_id: str, lab_config: LabConfig, group_name: str,
group_id: str) -> strRun the given basebox.
Arguments:
basebox_id: the basebox to run
Returns:
a lab id
create_lab_scenario
def create_lab_scenario(scenario: Scenario, scenario_profile: str,
lab_config: LabConfig, group_name: str,
group_id: str) -> strCreate a lab with the given scenario.
Arguments:
scenario: the scenario to run
Returns:
a lab uuid
run_lab_scenario
def run_lab_scenario(scenario: Scenario, scenario_profile: str,
lab_config: LabConfig, group_name: str,
group_id: str) -> strRun the given scenario.
Arguments:
scenario: the scenario to run
Returns:
a lab id
create_lab_attack
def create_lab_attack(attack: UnitAttack, scenario_profile: str,
lab_config: LabConfig, group_name: str,
group_id: str) -> strCreate a lab with the given attack.
Arguments:
attack: the attack to runscenario_profile: the unit scenario to run for the current attack
Returns:
a lab uuid
run_lab_attack
def run_lab_attack(attack: UnitAttack, scenario_profile: str,
lab_config: LabConfig, group_name: str,
group_id: str) -> strRun the given attack.
Arguments:
attack: the attack to runscenario_profile: the unit scenario to run for the current attack
Returns:
a lab id
fetch_labs
def fetch_labs(
all_labs: bool = False,
pagination: Pagination = Pagination()) -> LabListReplyGet list of current labs.
If all_labs is True, retrieve also stopped labs.
Returns:
a list containg the current labs.
fetch_lab
def fetch_lab(lab_id: str) -> DictGet status of a lab.
Arguments:
lab_id: the lab id
Returns:
a dict containg the lab status and potential results
run_lab
def run_lab(lab_id: str) -> NoneRun a lab.
Arguments:
lab_id: the lab id
stop_lab
def stop_lab(lab_id: str) -> NoneStop lab execution.
Arguments:
lab_id: the lab id
Returns:
a dict containg the lab status and potential results
resume_lab
def resume_lab(lab_id: str) -> NoneResume lab execution.
Arguments:
lab_id: the lab id
Returns:
a dict containg the lab status and potential results
fetch_lab_paused_status
def fetch_lab_paused_status(lab_id: str) -> PausedStatusFetch lab status during pause.
Arguments:
lab_id: the lab id
Returns:
a dict containg the lab paused status
fetch_lab_topology
def fetch_lab_topology(lab_id: str) -> TopologyGet scenario topology of a current lab.
Arguments:
lab_id: the lab id
Returns:
a dict containg the topology
fetch_lab_nodes
def fetch_lab_nodes(lab_id: str) -> ListGet scenario nodes of a current lab.
Arguments:
lab_id: the lab id
Returns:
the current nodes
fetch_lab_assets
def fetch_lab_assets(lab_id: str) -> ListGet scenario assets of a current lab.
Arguments:
lab_id: the lab id
Returns:
the current assets
fetch_lab_attack_report
def fetch_lab_attack_report(lab_id: str) -> ListGet scenario attack report of a current lab.
Arguments:
lab_id: the lab id
Returns:
the current attack report
fetch_lab_attack_infras
def fetch_lab_attack_infras(lab_id: str) -> ListGet scenario attack infrastructures of a current lab.
Arguments:
lab_id: the lab id
Returns:
the current attack infrastructures
fetch_lab_attack_sessions
def fetch_lab_attack_sessions(lab_id: str) -> ListGet scenario attack sessions of a current lab.
Arguments:
lab_id: the lab id
Returns:
the current attack sessions
fetch_lab_attack_knowledge
def fetch_lab_attack_knowledge(lab_id: str) -> DictGet scenario attack knowledge of a current lab.
Arguments:
lab_id: the lab id
Returns:
the attack knowledge
fetch_lab_notifications
def fetch_lab_notifications(lab_id: str) -> ListGet scenario notifications of a current lab.
Arguments:
lab_id: the lab id
Returns:
the notifications as a list of strings
delete_lab
def delete_lab(lab_id: str) -> NoneDelete a lab from its ID.
Arguments:
lab_id: the lab id
fetch_lab_lab_config
def fetch_lab_lab_config(lab_id: str) -> LabConfigGet scenario run config of a current lab.
Arguments:
lab_id: the lab id
Returns:
the scenario run config
fetch_lab_remote_access
def fetch_lab_remote_access(lab_id: str) -> RemoteAccessGet info to remotly access lab VMs.
Arguments:
lab_id: the lab id
Returns:
the remote lab VMs info

