1

create driver under specific driver group

Тема: 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 smile

2

create driver under specific driver group

Re: create driver under specific driver group

Hello!

you can create any drivers only inside account (big account or sub-accounts) . Then you can add drivers to some driver's group using this request with callmode update . Sure before you need to create required drivers' groups using the same request (callmode create)

Driver groups is only using for grouping drivers to manage them more easy.

Diana Cheley
Wialon Hosting Expert
Gurtam
3

create driver under specific driver group

Re: create driver under specific driver group

Hello Diana, thank you for your reply ! smile  ok, i was trying to directly create driver under specific group. Let me try to assign driver to a group, after driver is created, like you proposed.