3.2.29. users get-by-username

This command lets you search for users by username and export the data to CSV or JSON.

3.2.29.1. Common Options

3.2.29.2. Common Examples

3.2.29.3. Help Page

3.2.29.3.1. axonshell users get-by-username

Get assets where username equals value

axonshell users get-by-username [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

base|json_to_csv|json|xml|xlsx|table|csv

--table-format <table_format>

Base 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

Default

False

--field-compress, --no-field-compress

Compress field names

Default

False

--field-replace <field_replace>

Replace characters in field names ex: ‘text=replace’ (multiples)

Default

--join, --no-join

Join multivalue fields using –join-value

Default

False

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

--flatten, --no-flatten

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

Default

False

-fx, --field-exclude <FIELD>

Fields to exclude from each row (multiples)

Default

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

Add missing fields with –field-null-value

Default

False

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

Default

False

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

Sort –sort-field descending

Default

False

-sf, --sort-field <sort_field>

Sort assets based on a specific field

-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

--pre <QUERY>

Query to prefix the query built to search for –value

Default

--post <QUERY>

Query to postfix the query built to search for –value

Default

-nf, --not-flag, -nnf, --no-not-flag

Build the query as a NOT query

Default

False

-v, --value <value>

Required Value to search for

--help-detailed <help_detailed>

Show detailed help and exit

Options

auth|assetexport|selectfields