Pass received token to each request to private API as 'token' parameter or 'Authorization' header.
Name | Description |
---|---|
auth[username] | Login |
auth[password] | Password |
Version: HTTP/1.0 Accept: application/json Content-Type: application/json Host: example.org Cookie:
POST /api/rest/admin/auth
{"auth":{"username":"test-admin","password":"password"}}
X-Frame-Options: SAMEORIGIN X-XSS-Protection: 0 X-Content-Type-Options: nosniff X-Download-Options: noopen X-Permitted-Cross-Domain-Policies: none Referrer-Policy: strict-origin-when-cross-origin Content-Type: application/json; charset=utf-8 Vary: Accept ETag: W/"1fdef470f1b48ad101a88d141e505cfd" Cache-Control: max-age=0, private, must-revalidate X-Request-Id: 0202445d-5e10-4a7f-9b5a-a83316fa8283 X-Runtime: 0.006182 Content-Length: 111
201 Created
{ "jwt": "eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MTAyNTQ3MjUsInN1YiI6MjV9.nPDEre5zvEYwMshTvfH9ERGJw7JZdRTepCQGK-aKp74" }