Skip to content

Instantly share code, notes, and snippets.

@ogennadi
Created November 11, 2015 22:43
Show Gist options
  • Save ogennadi/3539a35d3366dd34028f to your computer and use it in GitHub Desktop.
Save ogennadi/3539a35d3366dd34028f to your computer and use it in GitHub Desktop.
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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment