4.6.1. Dashboards and discovery cycles

Warning

This API is deprecated.

Axonius API v2 is now available, we recommend you move to API v2.

New features will no longer be added to this API. Axonius will only provide bug fixes.

Read about API v2

API for working with dashboards and discovery lifecycle.

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

Bases: 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.

property human_name: str

Pass.

property is_done: bool

Pass.

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

Pass.

property name_map: dict

Pass.

__init__(raw)
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: PropsData

Pass.

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

Pass.

Return type:

typing.List[str]

to_str_phases()[source]

Pass.

Return type:

typing.List[str]

property phases_dict: dict

Pass.

to_dict(dt_obj=False)[source]

Pass.

Parameters:

dt_obj (bool) –

Return type:

dict

property last_run_finish_date: Optional[datetime]

Pass.

property last_run_start_date: Optional[datetime]

Pass.

property current_run_duration_in_minutes: Optional[float]

Pass.

property last_run_duration_in_minutes: Optional[float]

Pass.

property last_run_minutes_ago: Optional[float]

Pass.

property next_run_starts_in_minutes: float

Pass.

property next_run_start_date: datetime

Pass.

property correlation_stage: str

Pass.

property correlation_phase: Optional[DiscoverPhase]

Pass.

property is_correlation_finished: bool

Pass.

property running_status_map: dict

Pass.

property is_running: bool

Pass.

property status: str

Pass.

property progress: List[dict]

Pass.

property phases: List[DiscoverPhase]

Pass.

next_run_within_minutes(value)[source]

Pass.

Parameters:

value (typing.Union[int, str]) –

Return type:

bool

get_stability(for_next_minutes=None, start_check=0.5)[source]

Pass.

Parameters:
Return type:

typing.Tuple[str, bool]

__init__(raw, adapters=<factory>)
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, log_level='debug', **kwargs)[source]

Bases: ModelMixins

API for working with 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.model.AuthModel) –

  • log_level (typing.Union[int, str]) –

get()[source]

Get lifecycle metadata. :rtype: axonius_api_client.api.system.dashboard.DiscoverData

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
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
start()[source]

Start a discovery cycle if one is not running. :rtype: axonius_api_client.api.system.dashboard.DiscoverData

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'])
[]
stop()[source]

Stop a discovery cycle if one is running. :rtype: axonius_api_client.api.system.dashboard.DiscoverData

Examples

Create a client using axonius_api_client.connect.Connect

>>> data = client.dashboard.start()
>>> data.is_running
True
_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.

LOG: logging.Logger = None

Logger for this object.

__init__(auth, log_level='debug', **kwargs)

Mixins for API Models.

Parameters:
  • auth (axonius_api_client.auth.model.AuthModel) – object to use for auth and sending API requests

  • log_level (typing.Union[int, str]) – logging level to use for this objects logger

  • **kwargs – passed to _init()

__repr__()

Show info for this model object.

Return type:

str

__str__()

Show info for this model object.

Return type:

str

_init_auth(**kwargs)

Post init method for subclasses to use for overriding auth setup.

auth: axonius_api_client.auth.model.AuthModel = None

Authentication model with bound Http object to use for requests.

http: axonius_api_client.http.Http = None

Http object to use for requests.