Login

Command to create a session, which is required for all other commands except session_is_valid. The HTTP method used to send the data is POST.

POST /login.fcgi

Parameters

  • login (string): The default value is admin
  • password (string): The default value is admin

Response

  • session (string): Code of the session started.

Request example

This request will create the session and store it in the session variable.

$.ajax({
  url: "/login.fcgi",
  type: 'POST',
  contentType: 'application/json',
  data: JSON.stringify({
    login: 'admin',
    password: 'admin'
  }),
  success: function(data) {
    session = data.session;
  }
});

Response example

{
    "session": "q/AcfpiU3QLRUqHKNrAh5srT"
}