3.2.10. devices/users saved-query add¶
This command will add a saved query for users or devices.
3.2.10.1. Common Options¶
Connection Options for examples of supplying the Axonius credentials and URL.
Export Options for examples of exporting data in different formats and outputs.
3.2.10.2. Common Examples¶
Selecting Fields Examples for examples of selecting which fields (columns) to include in the saved query for sort column, columns displayed, and column filters.
3.2.10.3. Examples¶
3.2.10.4. Help Page¶
3.2.10.4.1. axonshell devices/users saved-query add¶
Add a saved query.
axonshell devices/users saved-query add [OPTIONS]
Options
- --help-detailed <help_detailed>¶
Show detailed help and exit
- Options:
auth | query | selectfields | wizard
- -u, --url <URL>¶
Required URL of an Axonius instance
- -k, --key <KEY>¶
Required API Key (or username if credentials=True) of user in an Axonius instance
- -s, --secret <SECRET>¶
Required API Secret (or password if credentials=True) of user in an Axonius instance
- -xf, --export-format <export_format>¶
Format to export data in
- Default:
table
- Options:
json | str-names | str | table
- -tf, --table-format <table_format>¶
Base format to use for –export-format=table
- Default:
fancy_grid
- Options:
asciidoc | double_grid | double_outline | fancy_grid | fancy_outline | github | grid | heavy_grid | heavy_outline | html | jira | latex | latex_booktabs | latex_longtable | latex_raw | mediawiki | mixed_grid | mixed_outline | moinmoin | orgtbl | outline | pipe | plain | presto | pretty | psql | rounded_grid | rounded_outline | rst | simple | simple_grid | simple_outline | textile | tsv | unsafehtml | youtrack
- -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 <"simple|complex|file|lines" "EXPRESSION">¶
Build a query using an expression (multiples, will override –query). –wiz “file” “<token>” - Read expressions from a file. –wiz “lines” “simple expr1<CR>simple expr2” - Read multiple expressions from a string. –wiz “simple” “<expr>” - Simple expression. –wiz “complex” “<expr>” - Complex expression.
- -t, --tag <tags>¶
Tags to set for saved query (multiple)
- -d, --description <description>¶
Description to set on saved query
- -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)
- -frro, --fields-regex-root-only, -nfrro, --no-fields-regex-root-only¶
Only include root fields for –field-regex
- Default:
True
- -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
- -sf, --sort-field <ADAPTER:FIELD>¶
Column to sort data on.
- -sd, --sort-descending, -nsd, --no-sort-descending¶
Sort –sort-field descending.
- Default:
True
- -gps, --gui-page-size <gui_page_size>¶
Number of rows to show per page in GUI.
- Default:
20
- Options:
20 | 50 | 100
- -pr, --private, -npr, --no-private¶
Set as private.
- Default:
False
- -ac, --always-cached, -nac, --no-always-cached¶
Set as always cached.
- Default:
False
- -as, --asset-scope, -nas, --no-asset-scope¶
Set as an asset scope query.
- Default:
False
- -n, --name <name>¶
Required Name of saved query
- -e, --echo, -ne, --no-echo¶
Echo folder workflow messages to console.
- Default:
True
- -c, --create, -nc, --no-create¶
If –folder does not exist, create it
- Default:
True
- -f, --folder <folder>¶
Path of folder