Authentication API

get token

POST /api/rest/admin/auth

Pass received token to each request to private API as 'token' parameter or 'Authorization' header.

Parameters

Name Description
auth[username] Login
auth[password] Password

Request

Headers

Version: HTTP/1.0
Accept: application/json
Content-Type: application/json
Host: example.org
Cookie: 

Route

POST /api/rest/admin/auth

Body

{"auth":{"username":"test-admin","password":"password"}}

Response

Headers

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

Status

201 Created

Body

{
  "jwt": "eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MTAyNTQ3MjUsInN1YiI6MjV9.nPDEre5zvEYwMshTvfH9ERGJw7JZdRTepCQGK-aKp74"
}