#!/bin/bash
echo "=== digest auth in cpanel DB ==="
mysql -u root -e "SELECT user, digestauth FROM cpanel.users WHERE user='john';" 2>&1 | head
echo "=== create_integration_link ==="
curl -sk -u 'john:Ip7*sunfO0#P5xxg' 'https://127.0.0.1:2087/json-api/create_integration_link?api.version=1&name=testlink&url=http://example.com&description=test' | head -c 250
echo
echo "=== personalization_set (JSON) ==="
curl -sk -u 'john:Ip7*sunfO0#P5xxg' -X POST -H 'Content-Type: application/json' -d '{"api.version":1,"data":{"theme":"paper_lantern"}}' 'https://127.0.0.1:2087/json-api/personalization_set' | head -c 250
echo
echo "=== save_connected_application (JSON) ==="
curl -sk -u 'john:Ip7*sunfO0#P5xxg' -X POST -H 'Content-Type: application/json' -d '{"api.version":1,"data":{"name":"test","url":"http://example.com"}}' 'https://127.0.0.1:2087/json-api/save_connected_application' | head -c 250
echo
