Table of Contents

Login

Before starting to work with Wialon, it is necessary to login. Use the command core/login for this action:

svc=core/login&params={"user":<text>,
		       "password":<text>}

:!: After login session is created, you can execute some requests within it. If server haven't received any requests for 10 minutes the session will be killed.

:!: You can find an example of this request in the sample Login/logout.

Parameters

Name Description
user user name
password password

Response

{
    "uid":<long>,	/* user ID*/
    "eid":<long>,	/* login operations count of current user */
    "ssid":<text>	/* session ID*/
    "pi":<int>,		/* ping interval */
    "tm":<uint>,	/* current time (UTC) */
    "user": {		
        "nm":<text>,		/* name  */
        "cls":<uint>,		/* ID of superclass "user" */
        "id":<long>,		/* ID */
        "gd":<text>,		/* GUID */
        "prp": {		/* custom properties */
		<text>:<text>,		/* property name: value */
		...				
	},
        "pup": {		/* private and public properties */
		<text>:<text>,		/* property name: value */
		...
	},
        "crt":<uint>,		/* creator ID */
        "bact":<uint>,		/* account ID */
        "fl":<uint>,		/* user flags */
	"usnf":{		/* user notifications */
		<text>:{		/* sequence number of notification */
			"t":<uint>,		/* lifetime (sec) */
			"d":<text>,		/* text of notification */
			"h":<text>,		/* subject */
			"s":<text>		/* sender */
		},
		...
	},
        "smsp":<text>		/* phone numbers of user (comma-separated) */
    },
    "classes": {		/* superclasses available for current user (key - superclass name, value - superclass ID): */
        "avl_hw":<uint>,		/* hardware type */
        "avl_resource":<uint>,		/* resource */
        "avl_retranslator":<uint>,	/* retranslator */
        "avl_unit":<uint>,		/* unit */
        "avl_unit_group":<uint>,	/* unit group */
        "user":<uint>			/* user */
    }
}

User flags are described in the chapter Set user settings flags.

Errors

Code Value
1 invalid session
2 invalid service name
3 invalid result
4 invalid format or value of parameters
6 storage server unavailable
8 invalid user name or password
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2019 Gurtam