5.2.2. assets

API models package.

class axonius_api_client.api.assets.Users(auth, **kwargs)[source]

Bases: axonius_api_client.api.assets.asset_mixin.AssetMixin

User related API methods.

FIELD_USERNAME = 'specific_data.data.username'
FIELD_MAIL = 'specific_data.data.mail'
fields_default

Fields to use by default for getting assets.

router

Router for this API model.

get_by_usernames(values, **kwargs)[source]

Build a query to get assets where username in values.

get_by_username_regex(value, **kwargs)[source]

Build a query to get assets where username regex matches value.

get_by_username(value, **kwargs)[source]

Build a query to get assets where username == value.

get_by_mails(values, **kwargs)[source]

Build a query to get assets where mail in values.

get_by_mail_regex(value, **kwargs)[source]

Build a query to get assets where mail regex matches value.

get_by_mail(value, **kwargs)[source]

Build a query to get assets where mail == value.

class axonius_api_client.api.assets.Devices(auth, **kwargs)[source]

Bases: axonius_api_client.api.assets.asset_mixin.AssetMixin

Device related API methods.

FIELD_HOSTNAME = 'specific_data.data.hostname'
FIELD_IP = 'specific_data.data.network_interfaces.ips'
FIELD_IP_RAW = 'specific_data.data.network_interfaces.ips_raw'
FIELD_MAC = 'specific_data.data.network_interfaces.mac'
FIELD_SUBNET = 'specific_data.data.network_interfaces.subnets'
fields_default

Fields to use by default for getting assets.

router

Router for this API model.

get_by_hostnames(values, **kwargs)[source]

Build a query to get assets where hostname in values.

get_by_hostname_regex(value, **kwargs)[source]

Build a query to get assets where hostname regex matches value.

get_by_hostname(value, **kwargs)[source]

Build a query to get assets where hostname == value.

get_by_macs(values, **kwargs)[source]

Build a query to get assets where mac in values.

get_by_mac_regex(value, **kwargs)[source]

Build a query to get assets where mac regex matches value.

get_by_mac(value, **kwargs)[source]

Build a query to get assets where mac == value.

get_by_ips(values, **kwargs)[source]

Build a query to get assets where ip in values.

get_by_ip_regex(value, **kwargs)[source]

Build a query to get assets where ip regex matches value.

get_by_ip(value, **kwargs)[source]

Build a query to get assets where ip == value.

get_by_subnet(value, not_flag=False, pre='', post='', **kwargs)[source]

Build a query to get assets where ip in subnet.

Parameters:
  • value (str) – value to that must match field “network_interfaces.ips_raw”
  • **kwargs – passed to AssetMixin.get()
Yields:

dict – asset matching query that is built if generator is True

Returns:

assets matching query that is built

if generator is False

Return type:

list of dict