Table of Contents Previous Next



2.1.43 /tokens
Use a POST request with the /tokens resource to retrieve a token used for token-based authentication.
curl –k -i -H "Content-Type: application/json" -d \
'{"name":"alice","password":"1safepwd","role":"acctg"}' \
https://<host>/api/v3.3/tokens


HTTP/1.1 201 Created
Server: Admin
X-Subject-Token: 014khlia0abddk4xboyhy4bsygr9dt27ycyp1sdv
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 21 Sep 2015 17:25:42 GMT


{"expiresAt":"2015-09-21T18:55:42.582+01:00",
"issuedAt":"2015-09-21T18:25:42.582+01:00"}
When deleting a token, pass the token to be deleted in the X-Subject-Token header along with the normal X-Auth-Token header.


Table of Contents Previous Next