3.2.4. devices/users get

This allows you to get all of the assets for devices or users and export the data to CSV or JSON.

See also

Shell Quoting Rules for how to deal with quoting the query value in various shells.

3.2.4.1. Common Options

3.2.4.2. Common Examples

3.2.4.4. Help Page

3.2.4.4.1. axonshell devices/users get

Get assets using a query and fields.

axonshell devices/users get [OPTIONS]

Options

-u, --url <URL>

Required URL of an Axonius instance

-k, --key <KEY>

Required API Key of user in an Axonius instance

-s, --secret <SECRET>

Required API Secret of user in an Axonius instance

--max-rows <max_rows>

Stop fetching assets after this many rows have been received

--max-pages <max_pages>

Stop fetching assets after this many pages have been received

--page-size <page_size>

Number of assets to fetch per page

Default

2000

--page-sleep <page_sleep>

Seconds to wait in between each fetch of a page

Default

0

-xf, --export-file <PATH>

File to send data to

Default

-xp, --export-path <export_path>

If –export-file supplied, the directory to write –export_file to

Default

/home/docs/checkouts/readthedocs.org/user_builds/axonius-api-client/checkouts/latest/docs

-xo, --export-overwrite, -nxo, --no-export-overwrite

If –export-file supplied and it exists, overwrite it

Default

False

--echo, --no-echo

Print out details during fetch

Default

True

--page-progress <page_progress>

Print progress every N rows

Default

10000

-xt, --export-format <export>

Formatter to use when exporting asset data

Default

json

Options

csv|json|table|json_to_csv|xlsx

--table-format <table_format>

Table format to use for –export-format=table

Default

fancy_grid

Options

fancy_grid|github|grid|html|jira|latex|latex_booktabs|latex_raw|mediawiki|moinmoin|orgtbl|pipe|plain|presto|pretty|psql|rst|simple|textile|tsv|youtrack

--table-max-rows <table_max_rows>

Only return this many rows for –export-format=table

Default

5

--table-api-fields, --no-table-api-fields

Include API related fields in table output

Default

False

--schema, --no-schema

Add schema information to the export

Default

False

--json-flat, --no-json-flat

Flat JSON output (one line per row)

Default

False

--titles, --no-titles

Rename fields from internal field names to their column titles

--join, --no-join

Join multivalue fields using –join-value

--join-value <field_join_value>

Value to use for joining multivalue fields, default: n

Default

--join-trim <field_join_trim>

Character length to trim joined multivalue fields

Default

32000

--explode <FIELD>

Flatten and explode a fields values into multiple rows

Default

--flatten, --no-flatten

Remove complex fields and re-add their sub-field values to the row

-fx, --field-exclude <FIELD>

Fields to exclude from each row (multiples)

Default

--field-null, --no-field-null

Add missing fields with –field-null-value

--field-null-value <field_null_value>

Value to use for fields that are not returned

--adapters-missing, --no-adapters-missing

Add a column showing adapters missing from each asset

Default

False

--software-whitelist-file <whitelist>

Read in a file of software names to add missing and delta sw columns

--tag <TAG>

Tags to add to each asset (multiples)

Default

--untag <TAG>

Tags to remove from each asset (multiples)

Default

-id, --include-details, -nid, --no-include-details

Include details for aggregated fields (req: 3.4 + patch)

Default

False

-sd, --sort-descending, -nsd, --no-sort-descending

Sort –sort-field descending (req: 3.4 + patch)

Default

False

-sf, --sort-field <sort_field>

Sort assets based on a specific field (req: 3.4 + patch)

-hd, --history-date <YYYY-MM-DD>

Return results for a given date in history

-f, --field <ADAPTER:FIELD>

Fields to include in the format of adapter:field (multiples)

-fr, --field-regex <ADAPTER_REGEX:FIELD_REGEX>

Regular expressions of fields to include (multiples)

-ff, --field-fuzzy <ADAPTER:FIELD>

Fuzzy matching of fields to include (multiples)

-fro, --fields-root <ADAPTER>

Select all root fields for a given adapter (PERFORMANCE HIT!)

-fd, --fields-default, -nfd, --no-fields-default

Include the default fields defined in the API library

Default

True

-q, --query <QUERY>

Query built from the Query wizard in the GUI

-qf, --query-file <QUERY_FILE>

Path to a file to override –query

-wz, --wiz <TYPE "EXPRESSION">

Build a query using an expression (multiples, will override –query)

--help-detailed <help_detailed>

Show detailed help and exit

Options

auth|query|assetexport|selectfields|wizard