SAYMON документация

Skip to end of metadata
Go to start of metadata
Login
$.ajax
    ({
      type: "POST",
      url: "https://saas.saymon.info/node/api/users/session",
      dataType: 'json',
      async: true,
      data:
      {
      	"login": "demo",
      	"password": "demo"
      },
      success: function (res){
        console.log('Thanks for your login!'); 
        console.log('Session ID:'+res);
      },
      error: function () {
        console.log('Login failed!');
      }
    });
Logout
 $.ajax
    ({
      type: "DELETE",
      url: "https://saas.saymon.info/node/api/users/session",
      dataType: 'json',
      async: true,
      success: function (res){
        console.log('Thanks for your logout!'); 
      },
      error: function () {
        console.log('Logout failed!');
      }
    });