Table of contents
wget --no-check-certificate --quiet --method GET --output-document=inventory --header='Accept: application/json' --header="Authorization: Bearer `cat token.tok`" 'https://192.168.0.5/cvpservice/inventory/devices'
Check the result
more inventory
Copy the token in an environment variable
token=xxx
Read the environment variable
echo $token
Get the inventory
wget --no-check-certificate --quiet --method GET --output-document=inventory --header='Accept: application/json' --header="Authorization: Bearer $token" 'https://192.168.0.5/cvpservice/inventory/devices'
Check the result
more inventory