Skip to content

Instantly share code, notes, and snippets.

@ogennadi
ogennadi / ice-login.sh
Created November 11, 2015 22:43
How to get an ICE session ID using a UNIX shell
#!/bin/sh
# You'll need to install the program jq (https://stedolan.github.io/jq/) to extract the sessionid from ICE's JSON output
curl -H "Content-Type: application/json" \
-X POST \
-k \
-d "{email: 'Administrator', password: 'Administrator'}" \
https://localhost:8443/rest/accesstoken | \
jq -r '.sessionId'