root@pve7test1:~/scripts# more 1_cookie.api
curl --silent --insecure --data "username=root@pam&password=password" \
https://localhost:8006/api2/json/access/ticket\
| jq --raw-output '.data.ticket' | sed 's/^/PVEAuthCookie=/' > .cookie
root@pve7test1:~/scripts# more 2_token.api
curl --silent --insecure --data "username=root@pam&password=password" \
https://localhost:8006/api2/json/access/ticket \
| jq --raw-output '.data.CSRFPreventionToken' | sed 's/^/CSRFPreventionToken:/' > .csrftoken
root@pve7test1:~/scripts# more 3_cluster_res.api
curl --insecure --cookie "$(<.cookie)" https://localhost:8006/api2/json/cluster/resources | jq '.'