Table of Contents

Login/logout

To execute any command in Wialon, you need authorize and get session ID.

:!: Attention! To launch this example at Wialon Kit, change https://hst-api.wialon.com for https://kit-api.wialon.com in all requests and use user name and password of your account to login to the system or name and password of demo user kitdemo kitdemo.

Login

To get authorized, make the request core/login. In current example, we use demo login and password of https://hst-api.wialon.com.

https://hst-api.wialon.com/wialon/ajax.html?svc=core/login&
	params={
		"user":"wialon_test",
		"password":"test"
	}

Response:

{
    "host": "212.98.173.107",
    "eid": "d1cb60897768780f846df7ab2400eb5f",
    "tm": 1358415984,
    "user": {
        "nm": "wialon_test",
        "cls": 1,
        "id": 50935,
        "prp": {
            "addr_provider": "map_visicom",
            "cfmt": "0",
            "city": "Mexico",
            "dst": "-1",            
            "fpnl": "monitoring",
            "language": "ru",           
            "show_log": "0",
            "tz": "134232128",            
            "user_settings_hotkeys": "1",
            ...           
        },
        "crt": 0,
        "bact": 50936,
        "fl": 6,
        "hm": "",
        "uacl": 2097795
    },
    "classes": {
        "avl_hw": 4,
        "avl_resource": 3,
        "avl_retranslator": 7,
        "avl_route": 6,
        "avl_unit": 2,
        "avl_unit_group": 5,
        "user": 1
    }
}

For further operations, we need session ID which is specified in the field eid. In our case it is d1cb60897768780f846df7ab2400eb5f.

Logout

To stop working with Wialon and logout from the system, deactivate the session making the following request:

https://hst-api.wialon.com/wialon/ajax.html?svc=core/logout&params={}&sid=d1cb60897768780f846df7ab2400eb5f

Response:

{
	"error":0
}

Such result tells us that the exit was successful.

Parameters of this request as well as the returned value are described in the chapter Logout.