1

Problem get attachment data on execReportAPI

Тема: Problem get attachment data on execReportAPI

Hello, i am working with wialon hosting and now i'm facing these problems to get some data :

1. How can i add more paramaters when i get avl_unit, eg: (Vehicle Type : Bus)
2. How can i get ritase data for these avl_unit, eg: (Rit : 2 rit)
*Ritase are Round trips (about public transportation such as buses, minibuses) in one route
3. HOow can i get information unit is in a area geofencing or not ? eg: (Unit "x" with geofencing "a")
4. It is possible to get KM data from an unit? eg: (KM : 5)
5. I've get report data with this API :
{{url}}svc=report/exec_report&params={"reportResourceId":22326287,"reportTemplateId":1,"reportObjectId":22835406,"reportObjectSecId":0,"interval":{"from":1609434000,"to":1625696065,"flags":0}}&sid={{sid}}

but, the return is :
{
    "reportResult": {
        "msgsRendered": 0,
        "stats": [],
        "tables": [
            {
                "name": "unit_group_events",
                "label": "Payload in geofence",
                "grouping": {
                    "type": "total",
                    "sortColumn": 3,
                    "hide": 1
                },
                "flags": 0,
                "rows": 11,
                "level": 1,
                "columns": 6,
                "header": [
                    "Grouping",
                    "Event time",
                    "Time received",
                    "Event text",
                    "Location",
                    "Notification text"
                ],
                "header_type": [
                    "",
                    "time",
                    "recv_time",
                    "evt_text",
                    "location",
                    "notification_text"
                ]
            }
        ],
        "attachments": []
    }
}

so, icouldn't get the data attachment, hoc can it's happens ?
Thank You

2

Problem get attachment data on execReportAPI

Re: Problem get attachment data on execReportAPI

Hello,

1 All data formats which you can get via request search_itmes(items) is described here
https://sdk.wialon.com/wiki/en/sidebar/ … mat/format  - the flags values which you need to set up at request

2 Before to get round trips, firsty it needs to get this informaiton properly from interface , for example from report, so you need to create certain report to get round trips like   Trips Between Geofences, then you can get the same information (execute report ) via API - https://sdk.wialon.com/wiki/en/sidebar/ … es/reports
3.  Geofences: presence in geofences - https://sdk.wialon.com/wiki/en/sidebar/ … s_by_point
4. It's possible to get mileage  unit, for example from corresponding report , or from track layer - https://sdk.wialon.com/wiki/en/sidebar/ … rack_layer
5. There is not any attachments by default in reports,  if you need report data, you need to execute requets to get rows from table
Please look example here how to work with reports  https://sdk.wialon.com/wiki/en/sidebar/ … es/reports

Diana Cheley
Wialon Hosting Expert
Gurtam