Sessions API

Create session

POST /rest/v2/login

This method creates session for user

Parameters

Name Description
session[login] Username
session[password] Password

Request

Headers

Accept: application/json
Content-Type: application/json

Route

POST /rest/v2/login

Body

{
  "session": {
    "login": "rest_auth_test",
    "password": "q123"
  }
}

Response

Headers

Content-Type: application/json; charset=utf-8

Status

201 Created

Body

{
  "session": {
    "token": "F5EAEBCACE5322F6A54B541E2E29551878069A1D"
  },
  "navigation": {
    "self": "http://example.org/rest/v2/login"
  }
}