Retrieve information from one or more TrueNAS instances, including datasets, disks, and pools, using the provided API key.
Before using this script, make sure you have the following prerequisites installed:
- Python 3.6+
- The
aiotruenas_client
library (install withpip install aiotruenas-client
)
python websocket_api.py -H <host> -K <api_key> --type <type>
- Retrieve datasets from a TrueNAS instance
python websocket_api.py -H nas1.hostname.com -K apikey1 --type datasets
- Retrieve all disks from a TrueNAS instance
python websocket_api.py -H nas1.hostname.com -K apikey1 --type disks
- Retrieve all pools from a TrueNAS instance
python websocket_api.py -H nas1.hostname.com -K apikey1 --type pools
@nh4ttruong