3.2.6.2.3. Tag/Untag Assets Found In Query¶
Warning
This API is deprecated.
Axonius API v2 is now available, we recommend you move to API v2.
New features will no longer be added to this API. Axonius will only provide bug fixes.
This does the following:
Tag or untag assets fround in query results using –tag and –untag
# Show number of assets currently tagged with 'unmanaged'
$ axonshell devices count --query '(labels == regex("unmanaged", "i"))'
# Tag assets in query
$ axonshell devices get-by-saved-query --name 'Unmanaged Devices' --tag 'unmanaged'
# Show new count of assets tagged with 'unmanaged'
axonshell devices count --query '(labels == regex("unmanaged", "i"))'
# Untag assets in query
$ axonshell devices get-by-saved-query --name 'Unmanaged Devices' --untag 'unmanaged'
# Show count with no assets tagged again
axonshell devices count --query '(labels == regex("unmanaged", "i"))'
3.2.6.2.3.1. Notes¶
Note
This example works the same for both the devices get-by-saved-query
and users get-by-saved-query
commands.