Axonius-api-client

Latest version: v5.0.17

Safety actively analyzes 682244 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 15

4.10.6

**This version will ONLY work with Axonius 4.1 and later. If you are using a version of Axonius earlier than 4.1, you must use API Client v4.2.2!!**

AXONSHELL

NEW COMMANDS

axonshell system instances admin-script-upload
Provides the ability to upload and execute admin/license scripts provided by Axonius. Similar to going to /administration URL in GUI.


Upload a script from a file:
axonshell system instances admin-script-upload --path /path/to/file

Upload a script from a URL (must begin with http or https):
axonshell system instances admin-script-upload --path https://domain/path/to/file


axonshell help-features
List all available "Features" that can be enabled and how to enable them.


axonshell help-features


axonshell openapi get-spec
Download the OpenAPI Specification file for the REST API in YAML format.


axonshell openapi get-spec


NEW ARGUMENTS

axonshell devices get & axonshell users get: fields-error
Allows user to ignore errors in fields supplied when getting assets.


ignore errors for unknown field name:
axonshell devices get --field badwolf --no-fields-error

ignore errors for no fields supplied:
axonshell devices get --no-fields-default --no-fields-error


axonshell tools system-status: wait, sleep, max-wait
Makes the command wait until the system reports as fully booted and ready before returning.


Keep polling every 30 seconds (the default):
axonshell tools system-status --wait

Keep polling every 5 seconds:
axonshell tools system-status --wait --sleep 5

Keep polling but only for a maximum of 5 minutes (default is 15 minutes):
axonshell tools system-status --wait --max-wait 300


ENHANCEMENTS

New feature: raw_data
Provides the ability to get aggregated or adapter specific raw data.

Can be enabled via:

In bash/zsh:
export AX_FEATURES='raw_data'

In CMD:
set AX_FEATURES=raw_data

Add a line to the .env file with:
AX_FEATURES=raw_data


Allows supplying 'agg:raw_data' or 'adapter_name:raw_data' to the --field argument for getting assets, i.e.:

Get the raw data for all adapters for all device assets:
axonshell devices get --field agg:raw_data

Get the raw data for just the aws adapter for all device assets:
axonshell devices get --field aws:raw_data


API Library

NEW METHODS

client.instances.admin_script_upload_path
Provides the ability to upload and execute admin/license scripts provided by Axonius. Similar to going to /administration URL in GUI.


Upload a script from a file:
result = client.instances.admin_script_upload_path(path='/path/to/file')

Upload a script from a URL (must begin with http or https):
result = client.instances.admin_script_upload_path(path='https://domain/path/to/file')


client.openapi.get_spec
Download the OpenAPI Specification file for the REST API in YAML format.


data = client.openapi.get_spec()


NEW ARGUMENTS

client.devices.get & client.users.get: fields_error
Allows user to ignore errors in fields supplied when getting assets.


ignore errors for unknown field name:
assets = client.devices.get(fields=['badwolf'], fields_error=False)

ignore errors for no fields supplied:
assets = client.devices.get(fields_default=False, fields_error=False)


ENHANCEMENTS

Features
Added a new concept called "Features" for enabling usage of features not yet in the current published versions of Axonius.


Print help for all features:
for f in axonius_api_client.features.Features.get_features():
print(f)


New Feature: raw_data
Provides the ability to get aggregated or adapter specific raw data.

Can be enabled via:

use the force attribute on the feature:
axonius_api_client.features.Features.raw_data.force = true

set an OS environment variable:
import os; os.environ["AX_FEATURES"] = 'raw_data'


Allows supplying 'agg:raw_data' or 'adapter_name:raw_data' to the fields argument for getting assets:

raw data for all adapters for all device assets:
client.devices.get(fields=["agg:raw_data"])

raw data for just the aws adapter for all device assets:
client.devices.get(fields=["aws:raw_data"])

raw data for all adapters for all user assets:
client.users.get(fields=["agg:raw_data"])

raw data for just the active_directory adapter for all user assets:
client.users.get(fields=["active_directory:raw_data"])


Schema improvements
- Overcome schema differences between 4.1 and forthcoming versions of Axonius
- SystemRole: Add new optional attribute `users_count: int`
- SystemUser: Modified how `ignore_role_assignment_rules: bool` gets excluded for older versions

4.10.5

**This version will ONLY work with Axonius 4.1 and later. If you are using a version of Axonius earlier than 4.1, you must use API Client v4.2.2!!**

CLI
- NEW COMMAND: axonshell system settings-global configure-destroy
- enable / disable dangerous advanced API system settings
- NEW COMMAND: axonshell system instances factory-reset
- reset a core instance back to factory / fresh install state
- NEW COMMAND: axonshell tools system-status
- get the current status of a core instance (booting, ready, unknown, awaiting factory reset)
- exit code is 0 if ready
- BUGFIX COMMAND: axonshell system users add
- addressed issues with generate/email password reset token
- BUGFIX COMMAND: axonshell system users update
- fixed to work with new set methods in client.system_users

API
- NEW METHOD: client.settings_global.configure_destroy()
- enable / disable dangerous advanced API system settings
- NEW METHOD: client.instances.factory_reset()
- reset a core instance back to factory / fresh install state
- NEW PROPERTY: client.signup.system_status
- get the current status of a core instance (booting, ready, unknown, awaiting factory reset)
- unauthenticated endpoint
- ENHANCEMENT: client.settings_global.update_section()
- added check_unchanged=True to signature, if false doesn't throw an error if no changes supplied
- BUGFIX: axonius_api_client.tools.sysinfo()
- handle python interpreters without sys.argv
- specific use case: phantom integration

4.10.4

**This version will ONLY work with Axonius 4.1 and later. If you are using a version of Axonius earlier than 4.1, you must use API Client v4.2.2!!**

CLI enhancements
- COMMAND: axonshell adapters cnx add-multiple-from-json:
- Added extra validation checks

CLI bug fixes
- GROUP: axonshell system roles
- removed "update" command
- added "update-perms" command
- added "update-name" command
- added new --export-format option 'table' and set as default
- reworked "add" command to work with new API structure

API enhancements
- n/a

API bug fixes
- axonius_api_client.tools.json_dump
- Add support for JSON encoding of datetime and other objects

4.10.3

**This version will ONLY work with Axonius 4.1 and later. If you are using a version of Axonius earlier than 4.1, you must use API Client v4.2.2!!**

API enhancements
- n/a

CLI enhancements
- Add "axonshell adapters cnx add-multiple-from-json"

Bug fixes
- n/a

Features
- n/a

4.10.2

**This version will ONLY work with Axonius 4.1 and later. If you are using a version of Axonius earlier than 4.1, you must use API Client v4.2.2!!**

API enhancements
- n/a

Bug fixes
- adapters.cnx.add() argument "label" -> "connection_label"

Features
- n/a

4.10.1

**This version will ONLY work with Axonius 4.1 and later. If you are using a version of Axonius earlier than 4.1, you must use API Client v4.2.2!!**

API enhancements
- Added command line args to output of sysinfo for better debugging

Bug fixes
- handle outdated schemas for saved query objects

Features
- n/a

Page 9 of 15

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.