1

For create round

(20/02/2019 08:38:34 отредактировано samir.agile)

Тема: For create round

Hello I need to use below API for create round

https://sdk.wialon.com/wiki/en/sidebar/ … date_round

How to get ItemId(route Id), Id (round Id), sh (schedule Id) in request params?

2

For create round

Re: For create round

samir.agile пишет:

Hello I need to use below API for create round

https://sdk.wialon.com/wiki/en/sidebar/ … date_round

How to get ItemId(route Id), Id (round Id), sh (schedule Id) in request params?

Hello!

you need to use request core/search_items to search element avl_route with flag base flag and schedules to get t ItemId(route Id), and  sh (schedule Id)
When you create new round, you just specify Id (round Id )= 0 , after creating system will be automatically set up index number for new round, you'll see real id in response after create round.

Diana Cheley
Wialon Hosting Expert
Gurtam
3

For create round

Re: For create round

chdi пишет:
samir.agile пишет:

Hello I need to use below API for create round

https://sdk.wialon.com/wiki/en/sidebar/ … date_round

How to get ItemId(route Id), Id (round Id), sh (schedule Id) in request params?

Hello!

you need to use request core/search_items to search element avl_route with flag base flag and schedules to get t ItemId(route Id), and  sh (schedule Id)
When you create new round, you just specify Id (round Id )= 0 , after creating system will be automatically set up index number for new round, you'll see real id in response after create round.


Can you please specify what we need to pass in propName with avl_route. rounds or route_schedules ?
And which flag we need to use to get sh(schedule id) and Item id (route id) ?

4

For create round

Re: For create round

samir.agile пишет:
chdi пишет:
samir.agile пишет:

Hello I need to use below API for create round

https://sdk.wialon.com/wiki/en/sidebar/ … date_round

How to get ItemId(route Id), Id (round Id), sh (schedule Id) in request params?

Hello!

you need to use request core/search_items to search element avl_route with flag base flag and schedules to get t ItemId(route Id), and  sh (schedule Id)
When you create new round, you just specify Id (round Id )= 0 , after creating system will be automatically set up index number for new round, you'll see real id in response after create round.


Can you please specify what we need to pass in propName with avl_route. rounds or route_schedules ?
And which flag we need to use to get sh(schedule id) and Item id (route id) ?

You need to specify "propName":"sys_name" ,  "sortType":"sys_name", "propValueMask":"name_of_route"), "flags":"1205" - base flag + schedules flags, please look here

Diana Cheley
Wialon Hosting Expert
Gurtam
5

For create round

Re: For create round

I tried this Create Round API but I got an error 4 (wrong params). I've also created the schedule beforehand. I'm guessing it came from the parameter "at", "vt" and "cu". What should I input? Samples would be great. Thanks in advance!

6

For create round

Re: For create round

vilok10908 пишет:

I tried this Create Round API but I got an error 4 (wrong params). I've also created the schedule beforehand. I'm guessing it came from the parameter "at", "vt" and "cu". What should I input? Samples would be great. Thanks in advance!


Hello!

The error 4 can mean that there is not correct parameters (names, values, types, parameters lack) as well as syntax errors (missing or special symbols like , : }  ect, or spaces in JSON).
You can look through this example. The route with id = 2357 ("itemId") is already created , the schedule (id = 2) also is created
put:
round id is 0 - "id"
"sh":2- schedule id above
"u":2174 - unit appointed to this round
"at":0 - activation time, 0 means that the system will activate round automatically when arrival time of 1st point is coming. Round activation means that the system will start to control visits to routes points
"vt":1623057394 - (Jun 07 2021 09:16:34 GMT+0000)
"tz":134228528 - user's time zone, GMT+3
"vp":3600 -  validation period of round, in sec, 3600 sec (24 h) - default value. So after 24 h from 'vt' time ( Jun 07 2021 09:16:34 GMT+0 ) the round will be interrupted automatically
(the system won't control it)


https://hst-api.wialon.com/wialon/ajax.html?svc=route/update_round&sid=0271315eb061fa7baae1b951

params: {"n":"new round1","d":"","u":2174,"at":0,"vt":1623057394,"vp":3600,"sh":2,"cu":[],"f":2,"tz":134228528,"itemId":2357,"id":0,"callMode":"create"}
Diana Cheley
Wialon Hosting Expert
Gurtam
7

For create round

Re: For create round

thanks for sharing with us.