It worked!!
curl -k -H "Content-Type: application/json" --data '{"userId":"anyuser","password":"somepass"}' -X POST
https://127.0.0.1:8443/sspcmrest/sspcm/rest/session<?xml version="1.0" encoding="UTF-8" standalone="yes"?><XmlResponse><httpCode>200</httpCode><httpStatus>OK</httpStatus><action>None</action><messageLevel>INFO</messageLevel><objectsList>{"sessionToken":"796d5a4d37554e55376f76467371657078444f3147673d3d"}</objectsList><results/></XmlResponse>
However I am not able to check if the token is correct
for example:
POST a new token
curl -k -H "Content-Type: application/json" --data '{"userId":"anyuser","password":"somepass"}' -X POST
https://127.0.0.1:8443/sspcmrest/sspcm/rest/session <?xml version="1.0" encoding="UTF-8" standalone="yes"?><XmlResponse><httpCode>200</httpCode><httpStatus>OK</httpStatus><action>None</action><messageLevel>INFO</messageLevel><objectsList>{"sessionToken":"6948577778636e7747655847554e6c697738564872413d3d"}</objectsList><results/></XmlResponse>
GET the status of TOKEN:
curl -k -H "Content-Type: application/json" -X GET
https://180.181.105.93:8443/sspcmrest/sspcm/rest/session -d "X-Authentication":"6948577778636e7747655847554e6c697738564872413d3d"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><XmlResponse><httpCode>400</httpCode><httpStatus>BAD_REQUEST</httpStatus><action>Please correct the error where applicable, and retry.</action><message>Please provide a valid session token.</message><messageLevel>WARN</messageLevel><results/></XmlResponse>
------------------------------
Alejandro Rodriguez
------------------------------