Logo
  • 1. Installation
    • 1.1. Install Python
    • 1.2. Install the package using pip
    • 1.3. Offline installs using pip
    • 1.4. Install the package Using pipenv
    • 1.5. Download the entire repository using git
    • 1.6. Browse the repository on GitHub
  • 2. API Key and Secret
  • 3. Using the Command Line Interface
    • 3.1. CLI Quickstart
      • 3.1.1. Install the package
      • 3.1.2. Setup connection information
      • 3.1.3. Use the axonshell CLI
      • 3.1.4. Quick Get Assets Example
    • 3.2. CLI Commands
      • 3.2.1. adapters get
        • 3.2.1.1. Common Options
        • 3.2.1.2. Examples
        • 3.2.1.3. Help Page
      • 3.2.2. devices/users count
        • 3.2.2.1. Common Options
        • 3.2.2.2. Examples
        • 3.2.2.3. Help Page
      • 3.2.3. devices/users count-by-saved-query
        • 3.2.3.1. Common Options
        • 3.2.3.2. Examples
        • 3.2.3.3. Help Page
      • 3.2.4. devices/users get
        • 3.2.4.1. Common Options
        • 3.2.4.2. Common Examples
        • 3.2.4.3. Examples
        • 3.2.4.4. Help Page
      • 3.2.5. devices/users get-by-id
        • 3.2.5.1. Common Options
        • 3.2.5.2. Examples
        • 3.2.5.3. Help Page
      • 3.2.6. devices/users get-by-saved-query
        • 3.2.6.1. Common Options
        • 3.2.6.2. Examples
        • 3.2.6.3. Help Page
      • 3.2.7. devices/users get-fields
        • 3.2.7.1. Common Options
        • 3.2.7.2. Examples
        • 3.2.7.3. Help Page
      • 3.2.8. devices/users get-fields-default
        • 3.2.8.1. Common Options
        • 3.2.8.2. Examples
        • 3.2.8.3. Help Page
      • 3.2.9. devices/users get-tags
        • 3.2.9.1. Common Options
        • 3.2.9.2. Examples
        • 3.2.9.3. Help Page
      • 3.2.10. devices/users saved-query add
        • 3.2.10.1. Common Options
        • 3.2.10.2. Common Examples
        • 3.2.10.3. Examples
        • 3.2.10.4. Help Page
      • 3.2.11. devices/users saved-query delete-by-name
        • 3.2.11.1. Common Options
        • 3.2.11.2. Examples
        • 3.2.11.3. Help Page
      • 3.2.12. devices/users saved-query delete-by-tags
        • 3.2.12.1. Common Options
        • 3.2.12.2. Examples
        • 3.2.12.3. Help Page
      • 3.2.13. devices/users saved-query get
        • 3.2.13.1. Common Options
        • 3.2.13.2. Examples
        • 3.2.13.3. Help Page
      • 3.2.14. devices/users saved-query get-by-name
        • 3.2.14.1. Common Options
        • 3.2.14.2. Examples
        • 3.2.14.3. Help Page
      • 3.2.15. adapters cnx add
        • 3.2.15.1. Common Options
        • 3.2.15.2. Examples
        • 3.2.15.3. Help Page
      • 3.2.16. adapters cnx add-from-json
        • 3.2.16.1. Common Options
        • 3.2.16.2. Examples
        • 3.2.16.3. Help Page
      • 3.2.17. adapters cnx delete-by-id
        • 3.2.17.1. Input feeds
        • 3.2.17.2. Common Options
        • 3.2.17.3. Examples
        • 3.2.17.4. Help Page
      • 3.2.18. adapters cnx get
        • 3.2.18.1. Common Options
        • 3.2.18.2. Examples
        • 3.2.18.3. Help Page
      • 3.2.19. adapters cnx get-by-id
        • 3.2.19.1. Common Options
        • 3.2.19.2. Examples
        • 3.2.19.3. Help Page
      • 3.2.20. adapters cnx test
        • 3.2.20.1. Common Options
        • 3.2.20.2. Examples
        • 3.2.20.3. Help Page
      • 3.2.21. adapters cnx test-by-id
        • 3.2.21.1. Common Options
        • 3.2.21.2. Examples
        • 3.2.21.3. Help Page
      • 3.2.22. devices get-by-hostname
        • 3.2.22.1. Common Options
        • 3.2.22.2. Common Examples
        • 3.2.22.3. Help Page
      • 3.2.23. devices get-by-ip
        • 3.2.23.1. Common Options
        • 3.2.23.2. Common Examples
        • 3.2.23.3. Help Page
      • 3.2.24. devices get-by-mac
        • 3.2.24.1. Common Options
        • 3.2.24.2. Common Examples
        • 3.2.24.3. Help Page
      • 3.2.25. devices get-by-subnet
        • 3.2.25.1. Common Options
        • 3.2.25.2. Common Examples
        • 3.2.25.3. Help Page
      • 3.2.26. tools shell
        • 3.2.26.1. Common Options
        • 3.2.26.2. Examples
        • 3.2.26.3. Help Page
      • 3.2.27. tools write-config
        • 3.2.27.1. Examples
        • 3.2.27.2. Help Page
      • 3.2.28. users get-by-mail
        • 3.2.28.1. Common Options
        • 3.2.28.2. Common Examples
        • 3.2.28.3. Help Page
      • 3.2.29. users get-by-username
        • 3.2.29.1. Common Options
        • 3.2.29.2. Common Examples
        • 3.2.29.3. Help Page
    • 3.3. CLI Command Groups
      • 3.3.1. root
        • 3.3.1.1. Command Groups
        • 3.3.1.2. Options
        • 3.3.1.3. Help Page
      • 3.3.2. adapters
        • 3.3.2.1. Sub Command Groups
        • 3.3.2.2. Commands
        • 3.3.2.3. Help Page
      • 3.3.3. adapters cnx
        • 3.3.3.1. Commands
        • 3.3.3.2. Help Page
      • 3.3.4. devices
        • 3.3.4.1. Sub Command Groups
        • 3.3.4.2. Commands
        • 3.3.4.3. Help Page
      • 3.3.5. devices saved_query
        • 3.3.5.1. Commands
        • 3.3.5.2. Help Page
      • 3.3.6. tools
        • 3.3.6.1. Commands
        • 3.3.6.2. Help Page
      • 3.3.7. users
        • 3.3.7.1. Sub Command Groups
        • 3.3.7.2. Commands
        • 3.3.7.3. Help Page
      • 3.3.8. users saved_query
        • 3.3.8.1. Commands
        • 3.3.8.2. Help Page
    • 3.4. CLI Common Options
      • 3.4.1. Connection Options
        • 3.4.1.1. Using .env
        • 3.4.1.2. Using Environment Variables
        • 3.4.1.3. Using Command Line Arguments
        • 3.4.1.4. Using Prompts
      • 3.4.2. Export Options
      • 3.4.3. Rows Option
        • 3.4.3.1. Showing sources
        • 3.4.3.2. Piped input
        • 3.4.3.3. File input
    • 3.5. CLI Common Examples
      • 3.5.1. Get By Examples
        • 3.5.1.1. Find Single Item - No Match Found
        • 3.5.1.2. Find Single Item - Match Found
        • 3.5.1.3. Find Using Regular Expressions - No Matches Found
        • 3.5.1.4. Find Using Regular Expressions - Matches Found
        • 3.5.1.5. Find Using NOT
        • 3.5.1.6. Find Using Multiple Values
        • 3.5.1.7. Find Matches With A Query Prefix
        • 3.5.1.8. Find Matches With A Query Postfix
      • 3.5.2. Selecting Fields Examples
        • 3.5.2.1. Select Fields: Valid Generic Field
        • 3.5.2.2. Select Fields: Invalid Generic Field
        • 3.5.2.3. Select Fields: Invalid Adapter
        • 3.5.2.4. Select Fields: Multiple Fields
        • 3.5.2.5. Select Fields: Multiple Fields Using Commas
        • 3.5.2.6. Select Fields: No default fields
        • 3.5.2.7. Select Fields: Using Regular Expressions Case 1
        • 3.5.2.8. Select Fields: Using Regular Expressions Case 2
    • 3.6. CLI Features
      • 3.6.1. Command Group Aliases
        • 3.6.1.1. Single Matches
        • 3.6.1.2. Multiple Matches
      • 3.6.2. Autocompletion
        • 3.6.2.1. Bash
        • 3.6.2.2. Zsh
      • 3.6.3. Shell Quoting Rules
        • 3.6.3.1. Bash, zsh
        • 3.6.3.2. Powershell
        • 3.6.3.3. Windows Command Prompt
  • 4. Using the API library
    • 4.1. API Quickstart
      • 4.1.1. Quick Get Assets Example
      • 4.1.2. More examples
        • 4.1.2.1. Adapters
        • 4.1.2.2. Assets
        • 4.1.2.3. Enforcements and Actions
        • 4.1.2.4. System
    • 4.2. Connection Handler
      • Connect
        • Connect.__init__()
        • Connect.url
        • Connect.TIMEOUT_CONNECT
        • Connect.TIMEOUT_RESPONSE
        • Connect.CERT_CLIENT_KEY
        • Connect.CERT_CLIENT_CERT
        • Connect.CERT_CLIENT_BOTH
        • Connect.SAVE_HISTORY
        • Connect.LOG_LEVEL
        • Connect.LOG_REQUEST_ATTRS
        • Connect.LOG_RESPONSE_ATTRS
        • Connect.LOG_REQUEST_BODY
        • Connect.LOG_RESPONSE_BODY
        • Connect.LOG_LOGGER
        • Connect.LOG_LEVEL_PACKAGE
        • Connect.LOG_LEVEL_ENDPOINTS
        • Connect.LOG_LEVEL_HTTP
        • Connect.LOG_LEVEL_AUTH
        • Connect.LOG_LEVEL_API
        • Connect.LOG_LEVEL_CONSOLE
        • Connect.LOG_LEVEL_FILE
        • Connect.LOG_CONSOLE_FMT
        • Connect.LOG_FILE_FMT
        • Connect.LOG_FILE_NAME
        • Connect.LOG_FILE_PATH
        • Connect.LOG_FILE_MAX_MB
        • Connect.LOG_FILE_MAX_FILES
        • Connect.WRAPERROR
        • Connect.LOG
        • Connect.STARTED
        • Connect.HANDLER_CON
        • Connect.HANDLER_FILE
        • Connect.HTTP_ARGS
        • Connect.HTTP
        • Connect.AUTH
        • Connect.API_ARGS
        • Connect.SIGNUP
        • Connect.start()
        • Connect.signup
        • Connect.users
        • Connect.vulnerabilities
        • Connect.devices
        • Connect.adapters
        • Connect.instances
        • Connect.activity_logs
        • Connect.remote_support
        • Connect.dashboard
        • Connect.dashboard_spaces
        • Connect.enforcements
        • Connect.system_users
        • Connect.system_roles
        • Connect.meta
        • Connect.settings_ip
        • Connect.settings_global
        • Connect.settings_gui
        • Connect.settings_lifecycle
        • Connect.__str__()
        • Connect.__repr__()
        • Connect.build_date
        • Connect.version
        • Connect.openapi
        • Connect.data_scopes
        • Connect.folders
        • Connect.api_keys
        • Connect._get_exc_reason()
        • Connect.jdump()
        • Connect.REASON_RES
        • Connect._init()
    • 4.3. Adapters and connections
      • 4.3.1. Adapters
        • Adapters
      • 4.3.2. Connections
        • Cnx
        • ErrorMap
        • get_cnx_strs()
        • cnx_from_adapter()
    • 4.4. Assets
      • 4.4.1. Device assets
        • Devices
      • 4.4.2. User assets
        • Users
      • 4.4.3. Fields
        • Fields
      • 4.4.4. Tags
        • Labels
      • 4.4.5. Saved queries
        • SavedQuery
      • 4.4.6. Export callbacks
        • 4.4.6.1. Base
        • 4.4.6.2. CSV
        • 4.4.6.3. JSON
        • 4.4.6.4. JSON to CSV
        • 4.4.6.5. Table
        • 4.4.6.6. Excel
      • 4.4.7. Query Wizards
        • 4.4.7.1. From python objects
        • 4.4.7.2. From CSV files
        • 4.4.7.3. From text files
    • 4.5. Enforcements and actions
      • 4.5.1. Enforcements
        • Enforcements
      • 4.5.2. Actions
    • 4.6. System
      • 4.6.1. Dashboards and discovery cycles
        • DiscoverPhase
        • DiscoverData
        • Dashboard
      • 4.6.2. Instances
        • Instances
      • 4.6.3. Product metadata
        • Meta
      • 4.6.4. System Settings -> Global Settings
      • 4.6.5. System Settings -> GUI Settings
      • 4.6.6. System Settings -> Lifecycle Settings
      • 4.6.7. Initial signup
        • Signup
      • 4.6.8. System Roles
        • SystemRoles
      • 4.6.9. System Users
        • SystemUsers
    • 4.7. Library backend
      • 4.7.1. API library backend
        • 4.7.1.1. API models
        • 4.7.1.2. Asset API models
        • 4.7.1.3. Endpoint routers
        • 4.7.1.4. Settings mixins
      • 4.7.2. Authenticating
        • 4.7.2.1. Authenticating
        • 4.7.2.2. Models
      • 4.7.3. Constants
        • 4.7.3.1. Adapters
        • 4.7.3.2. API models
        • 4.7.3.3. Fields
        • 4.7.3.4. General
        • 4.7.3.5. Logs
        • 4.7.3.6. System
        • 4.7.3.7. Wizards
      • 4.7.4. Parsers
        • 4.7.4.1. Adapter schemas
        • 4.7.4.2. Configuration schemas
        • 4.7.4.3. Field schemas
        • 4.7.4.4. System
        • 4.7.4.5. Tables
        • 4.7.4.6. URLs
        • 4.7.4.7. Wizards
      • 4.7.5. Tools
        • 4.7.5.1. Data classes
        • 4.7.5.2. Exceptions and warnings
        • 4.7.5.3. HTTP Client
        • 4.7.5.4. Logging utilities
        • 4.7.5.5. Setup environment variables
        • 4.7.5.6. Utilities
      • 4.7.6. Version metadata
        • VERSION
        • URL
        • AUTHOR
        • TITLE
        • PROJECT
        • AUTHOR_EMAIL
        • DESCRIPTION
        • DOCS
        • LICENSE
        • COPYRIGHT
  • 5. Contribution
    • 5.1. Support
    • 5.2. Reporting Issues
    • 5.3. Submitting Patches
    • 5.4. Testing Suite
      • 5.4.1. Supported Python versions
      • 5.4.2. Tested Python versions
    • 5.5. Release Strategy
axonius_api_client
  • Docs »
  • 3. Using the Command Line Interface
  • Edit on GitHub
Next Previous

3. Using the Command Line Interface¶

  • 3.1. CLI Quickstart

3.2. CLI Commands¶

  • 3.2.1. adapters get
  • 3.2.2. devices/users count
  • 3.2.3. devices/users count-by-saved-query
  • 3.2.4. devices/users get
  • 3.2.5. devices/users get-by-id
  • 3.2.6. devices/users get-by-saved-query
  • 3.2.7. devices/users get-fields
  • 3.2.8. devices/users get-fields-default
  • 3.2.9. devices/users get-tags
  • 3.2.10. devices/users saved-query add
  • 3.2.11. devices/users saved-query delete-by-name
  • 3.2.12. devices/users saved-query delete-by-tags
  • 3.2.13. devices/users saved-query get
  • 3.2.14. devices/users saved-query get-by-name
  • 3.2.15. adapters cnx add
  • 3.2.16. adapters cnx add-from-json
  • 3.2.17. adapters cnx delete-by-id
  • 3.2.18. adapters cnx get
  • 3.2.19. adapters cnx get-by-id
  • 3.2.20. adapters cnx test
  • 3.2.21. adapters cnx test-by-id
  • 3.2.22. devices get-by-hostname
  • 3.2.23. devices get-by-ip
  • 3.2.24. devices get-by-mac
  • 3.2.25. devices get-by-subnet
  • 3.2.26. tools shell
  • 3.2.27. tools write-config
  • 3.2.28. users get-by-mail
  • 3.2.29. users get-by-username

3.3. CLI Command Groups¶

  • 3.3.1. root
  • 3.3.2. adapters
  • 3.3.3. adapters cnx
  • 3.3.4. devices
  • 3.3.5. devices saved_query
  • 3.3.6. tools
  • 3.3.7. users
  • 3.3.8. users saved_query

3.4. CLI Common Options¶

  • 3.4.1. Connection Options
  • 3.4.2. Export Options
  • 3.4.3. Rows Option

3.5. CLI Common Examples¶

  • 3.5.1. Get By Examples
  • 3.5.2. Selecting Fields Examples

3.6. CLI Features¶

  • 3.6.1. Command Group Aliases
  • 3.6.2. Autocompletion
  • 3.6.3. Shell Quoting Rules
Next Previous

© Copyright Axonius 2023 Revision f950d8ca.

Read the Docs v: latest
Versions
latest
stable
develop
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.