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. Output feeds

The output from this command is able to be supplied as input to these commands:

  • devices/users reports missing-adapters to build a report of missing adapters for all assets returned from this command.
  • ../grp_assets_labels_cmds/cmd_add to add labels to all assets returned from this command.
  • ../grp_assets_labels_cmds/cmd_remove to remove labels from all assets returned from this command. Common Options Common Examples Help Page axonshell devices/users get

Get assets using a query and fields.

axonshell devices/users get [OPTIONS]


-u, --url <url>

URL of an Axonius instance [required]

-k, --key <key>

API Key of user in an Axonius instance [required]

-s, --secret <secret>

API Secret of user in an Axonius instance [required]

--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 <export_file>

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/develop/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]

--table-format <table_format>

Table format to use for –export-format=table [default: fancy_grid]

--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_explode>

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_excludes>

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]

--tag <tags_add>

Tags to add to each asset (multiples) [default: ]

--untag <tags_remove>

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 <history_date>

Return results for a given date in history

-f, --field <fields>

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

-fr, --field-regex <fields_regex>

Regular expressions of fields to include (multiples)

-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

--help-detailed <help_detailed>

Show detailed help and exit