3.2.2. devices/users count

This command will get the count of assets that a query would return for users or devices and could be used as part of a script to do something based on the number returned. Common Options

  • Connection Options for examples of supplying the Axonius credentials and URL.

  • There are no export options for this command since it only returns a number. Examples Help Page axonshell users/devices count

Get the count of assets from a query.

axonshell users/devices count [OPTIONS]


-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

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

Return results for a given date in history

-hda, --history-days-ago <history_days_ago>

Return results for a history snapshot N days ago

-hex, --history-exact, -nhex, --no-history-exact

Date supplied in history-date or history-days-ago is an exact date



-uce, --use-cache-entry, -nuce, --no-use-cache-entry

Ask the API to use a cache entry for this query, if available



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

--help-detailed <help_detailed>

Show detailed help and exit


auth | query