Executing several commands at once

Several commands can be executed with one request. In this case, the response is also presented in one JSON. For example we may need to send an online message to many users. We can do this using combination of core/batch and user/update_user_notification commands:

<your_wialon_pro_address>/ajax.html?svc=core/batch&
	params=[{
		"svc":"user/update_user_notification",
		"params":{
			"h":"Hi there!",
			"d":";-)",
			"s":"",
			"ttl":1359015606,
			"itemId":30,
			"id":0,
			"callMode":"create"
		}
	},{
		"svc":"user/update_user_notification",
		"params":{
			"h":"Hi there!",
			"d":";-)",
			"s":"",
			"ttl":1359015606,
			"itemId":39,
			"id":0,
			"callMode":"create"
		}
	}]&ssid=<your_sid>

Response:

[
    [1, {
        "t": 1359013247,
        "d": ";-)",
        "h": "Hi there!",
        "s": ""
    }],
    [1, {
        "t": 1359013247,
        "d": ";-)",
        "h": "Hi there!",
        "s": ""
    }]
]
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2024 Gurtam