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

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-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/json; charset=utf-8
vary: Accept
etag: W/"0a56c07b8d091d4df7eaa26915700411"
cache-control: max-age=0, private, must-revalidate
x-request-id: a75bc051-3655-4510-a18b-2da2f9190b7b
x-runtime: 0.006292
content-length: 133

Status

201 Created

Body

{
  "jwt": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjQ1LCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzg2MzYwMjg2fQ.-XJ8PYlBWy0bZVT7u5z18RKWc13bbkEDFOF4QA-UyXM"
}