1

Help with Wialon Remote APi route search

Тема: Help with Wialon Remote APi route search

HI all!

Not sure if this is the right place to ask but i am completely lost on why this param json doesnt return any items

{           
    "spec":{
       "itemsType":"avl_route",
       "propName":"*",
       "propValueMask":"*",
       "sortType":"sys_name",
       "propType": "property",
       "or_logic": 1
    },
    "force": 1,
    "flags":513,
    "from":0,
    "to":0
}

i've also tried many different combinations of params but nothing returns any items. this is the response i get every time

{
    "searchSpec": {
        "itemsType": "avl_route",
        "propName": "*",
        "propValueMask": "*",
        "sortType": "sys_name",
        "propType": "property",
        "or_logic": "1"
    },
    "dataFlags": 513,
    "totalItemsCount": 0,
    "indexFrom": 0,
    "indexTo": 0,
    "items": []
}

My goal is to be able to search routes by unitId and time interval. i also have NO idea how to do this.. i have seen and understand your multicriteria search but i have no idea which fields to use to filter routes for a specific unit and between two points in time.

i have also watched a youtube vid by Diana but she never touches on routes unfortunately so im stuck.

Hoping for a fast reply!

Thanks,
Alen

Edit: Devs, i have created another post in the subforum Working with Wialon.. delete that one i guess, this should be in this subforum

2

Help with Wialon Remote APi route search

Re: Help with Wialon Remote APi route search

Hello Alen,

Custom SDK development is the right place where you can ask about API or SDK questions.
Please find below the answer to your issue.

You use correct request to search routes, but before you need to get login with token which has full access - parameter access_type = -1
https://sdk.wialon.com/wiki/en/sidebar/ … zated_user
You need to get this token just add additional parameters in URL - see more about token authorization here  https://www.youtube.com/watch?v=K9B8YAloPXc
For example
https://hosting.wialon.com/login.html?access_type=-1

After you get the list of created routes, you will also get their IDs and can use it to get other information - https://sdk.wialon.com/wiki/en/sidebar/ … oute/route
For example the round list - https://sdk.wialon.com/wiki/en/sidebar/ … all_rounds
https://sdk.wialon.com/wiki/en/sidebar/ … round_data

Diana Cheley
Wialon Hosting Expert
Gurtam