Тема: create driver under specific driver group
Hello, i am writing this post on behalf of Hilltronic Hamburg.
as the title says - i am trying to achieve driver creation under specific driver group. The idea is to list driver groups like this:
http://hst-api.wialon.com/wialon/ajax.h … mp;params=
{"spec":[
{"type":"type",
"data":"avl_resource",//driver groups are under avl_resource according to docs
"flags":32768,//get driver groups flag
"mode":0}
]}
then from the result to get the ids of the groups , select one of the ids and create driver like this:
http://hst-api.wialon.com/wialon/ajax.h … mp;params=
{"itemId":group id from above request,
id":0,//should be 0 when creating driver
"callMode":"create",
"c":"DF00000000000000",//driver card id in description too
"ds":"DF00000000000000",
"f":4,
"n":"Harald Harald Harald",
"p":""}
the problem is that this creates driver under subaccount (this is big account with subaccounts...) instead of creating drivers under driver groups.
The whole idea is that for each driver i will know to which driver group name i have to create the driver. The group name comes as param for driver creation method. Then i want to match the existing driver groups names with the param name and get the id of the group, then to create the driver under that group.
Any suggestions are appreciated