4.6.1. Dashboards and discovery cycles

API for working with dashboards and discovery lifecycle.

class axonius_api_client.api.system.dashboard.DiscoverPhase(raw)[source]

Bases: axonius_api_client.data.PropsData

Pass.

Parameters

raw (dict) –

raw: dict
to_str_properties()[source]

Pass.

Return type

typing.List[str]

to_str_progress()[source]

Pass.

Return type

typing.List[str]

property name: str

Pass.

Return type

str

property human_name: str

Pass.

Return type

str

property is_done: bool

Pass.

Return type

bool

property progress: Dict[str, List[str]]

Pass.

Return type

typing.Dict[str, typing.List[str]]

property name_map: dict

Pass.

Return type

dict

__init__(raw)

Initialize self. See help(type(self)) for accurate signature.

Parameters

raw (dict) –

__str__()

Pass.

static _human_key(key)

Pass.

classmethod get_fields()

Get a list of fields defined for current this dataclass object.

Return type

typing.List[dataclasses.Field]

replace(**kwargs)

Pass.

Return type

axonius_api_client.data.BaseData

to_dict(dt_obj=False)

Pass.

Parameters

dt_obj (bool) –

Return type

dict

class axonius_api_client.api.system.dashboard.DiscoverData(raw, adapters=<factory>)[source]

Bases: axonius_api_client.data.PropsData

Pass.

Parameters
raw: dict
adapters: List[dict]
to_str_progress()[source]

Pass.

Return type

typing.List[str]

to_str_phases()[source]

Pass.

Return type

typing.List[str]

to_dict(dt_obj=False)[source]

Pass.

Parameters

dt_obj (bool) –

Return type

dict

property last_run_finish_date: Optional[datetime.datetime]

Pass.

Return type

typing.Optional[datetime.datetime]

property last_run_start_date: Optional[datetime.datetime]

Pass.

Return type

typing.Optional[datetime.datetime]

property current_run_duration_in_minutes: Optional[float]

Pass.

Return type

typing.Optional[float]

property last_run_duration_in_minutes: Optional[float]

Pass.

Return type

typing.Optional[float]

property last_run_minutes_ago: Optional[float]

Pass.

Return type

typing.Optional[float]

property next_run_starts_in_minutes: float

Pass.

Return type

float

property next_run_start_date: datetime.datetime

Pass.

Return type

datetime.datetime

property correlation_stage: str

Pass.

Return type

str

property is_correlation_finished: bool

Pass.

Return type

bool

property is_running: bool

Pass.

Return type

bool

property status: str

Pass.

Return type

str

property progress: List[dict]

Pass.

Return type

typing.List[dict]

property phases: List[axonius_api_client.api.system.dashboard.DiscoverPhase]

Pass.

Return type

typing.List[axonius_api_client.api.system.dashboard.DiscoverPhase]

next_run_within_minutes(value)[source]

Pass.

Parameters

value (int) –

Return type

bool

__init__(raw, adapters=<factory>)

Initialize self. See help(type(self)) for accurate signature.

Parameters
__str__()

Pass.

static _human_key(key)

Pass.

classmethod get_fields()

Get a list of fields defined for current this dataclass object.

Return type

typing.List[dataclasses.Field]

replace(**kwargs)

Pass.

Return type

axonius_api_client.data.BaseData

to_str_properties()

Pass.

Return type

typing.List[str]

class axonius_api_client.api.system.dashboard.Dashboard(auth, **kwargs)[source]

Bases: axonius_api_client.api.mixins.ModelMixins

API for working with dashboards and discovery lifecycle.

Examples

  • Get discover lifecycle metadata: get()

  • See if a lifecycle is currently running: is_running()

  • Start a discover lifecycle: start()

  • Stop a discover lifecycle: stop()

Parameters

auth (axonius_api_client.auth.models.Model) –

get()[source]

Get lifecycle metadata.

Examples

Create a client using axonius_api_client.connect.Connect

>>> data = client.dashboard.get()
>>> data.next_run_starts_in_minutes
551
>>> data.is_running
False
Return type

axonius_api_client.api.system.dashboard.DiscoverData

property is_running: bool

Check if discovery cycle is running.

Examples

Create a client using axonius_api_client.connect.Connect

>>> data = client.dashboard.is_running
False
Return type

bool

start()[source]

Start a discovery cycle if one is not running.

Examples

Create a client using axonius_api_client.connect.Connect

>>> data = client.dashboard.start()
>>> data.is_running
True
>>> j(data['phases_pending'])
[
  "Fetch_Devices",
  "Fetch_Scanners",
  "Clean_Devices",
  "Pre_Correlation",
  "Run_Correlations",
  "Post_Correlation",
  "Run_Queries",
  "Save_Historical"
]
>>> j(data['phases_done'])
[]
Return type

axonius_api_client.api.system.dashboard.DiscoverData

stop()[source]

Stop a discovery cycle if one is running.

Examples

Create a client using axonius_api_client.connect.Connect

>>> data = client.dashboard.start()
>>> data.is_running
True
Return type

axonius_api_client.api.system.dashboard.DiscoverData

_get()[source]

Direct API method to get discovery cycle metadata.

Return type

axonius_api_client.api.json_api.lifecycle.Lifecycle

_start()[source]

Direct API method to start a discovery cycle.

Return type

str

_stop()[source]

Direct API method to stop a discovery cycle.

Return type

str

_init(**kwargs)[source]

Post init method for subclasses to use for extra setup.

__init__(auth, **kwargs)

Mixins for API Models.

Parameters
__repr__()

Show info for this model object.

Return type

str

__str__()

Show info for this model object.

Return type

str

LOG: logging.Logger

Logger for this object.

auth

axonius_api_client.auth.models.Mixins authentication object.

http

axonius_api_client.http.Http client to use to send requests,