get_all_rounds
To get information about rides for a specified time interval, use the route/get_all_rounds command:
svc=route/get_all_rounds
params={
"itemId": <long>,
"timeFrom": <uint>,
"timeTo": <uint>,
"fullJson": <uint>
}
Parameters
The request must contain the following parameters:
Parameter | Description |
---|---|
itemID | Route ID. |
timeFrom | Interval beginning. |
timeTo | Interval end. |
fullJson | Response format. Pass 1 for detailed information, or 0 for basic information. |
Response
If the request is completed successfully, the response contains either basic or detailed information about rides, depending on the value of the fullJson parameter.
A response with basic information is returned in the following format:
{
"actual": [ /* Rides with the "in progress" and "finished" states. */
{
...
}
],
"history": [ /* Rides with the "history" state. */
{
...
}
],
"virtual": [ /* Rides with the "estimated" state. */
{
"time": <uint>, /* Ride beginning. */
"schedule": {
"id": <long>, /* Schedule ID. */
"n": <text>, /* Schedule name. */
"f": <uint>, /* Type. */
"tz": <uint>, /* Timezone. */
"cfg": { /* Custom configuration. It is passed from the schedule object without changes. */
"autoName": <uint>, /* Generate ride names automatically: 0 — no, 1 — yes. */
"enabled": 1, /* Automatic creation of rides: 1 — enable, 0 — disable. */
"name": <text>, /* Ride name. */
"description":<text>, /* Description. */
"roundFlags": <uint>, /* Ride flags. */
"units": [<long>], /* Array of unit IDs. */
"validityPeriod": <uint> /* Validity period. */
},
"tm": [ /* Time of passing checkpoints. */
{
"at": <uint>, /* Arrival time. */
"ad": <uint>, /* Deviation from the arrival time. */
"dt": <uint>, /* Departure time. */
"dd": <uint> /* Deviation from the departure time. */
}
],
"sch": {
"f1": <uint>, /* Beginning of interval 1. */
"f2": <uint>, /* Beginning of interval 2. */
"t1": <uint>, /* End of interval 1. */
"t2": <uint>, /* End of interval 2. */
"m": <uint>, /* Mask of days of month. */
"y": <uint>, /* Mask of months */
"w": <uint> /* Mask of days of the week. */
}
}
}
]
}
The format of the actual and history arrays is similar to the one described on the load_rounds page (basic information).
Schedule types are described on the update_schedule page.
A response with detailed information is similar to the one with basic information, except that the format of elements in the actual and history arrays is the same as the one described on the get_round_data page.