1

search notification by Name

Тема: search notification by Name

Which Remote API method is used to search notification by notification Name instead of notification id
thanks in advance.

Thanks
J Prabhu
2

search notification by Name

Re: search notification by Name

prabhu.janakiraman, there is no such opportunity.
resource/get_notification_data reqeust accepts only notification ids.
As for core/search_items request - it is looking for items (not propitems). It can find all resources containing notifications with some name.
But this filtered resources will contain all their notifications in result.

Head of Wialon Local Department
Gurtam
3

search notification by Name

Re: search notification by Name

thanks for your response, Is there any wialon API to search Geofence / GeoFence Group by Name. I have tried with core/search_items, but its not returning any result. Can you suggest any other way to acheive this.

thanks in advance

Thanks
J Prabhu
4

search notification by Name

Re: search notification by Name

prabhu.janakiraman, here is example of searching for resources which contain geofences with specified name mask.
https://sdk.wialon.com/wiki/en/sidebar/ … les/search
For zone groups use "zone_groups" propName and 1048576 (0x00100000) dataflag.
As a result you'll get resources (with all their contents including all geofences) that contain such geofences.
This may be useful only in case of multiple resources with geofences and this request allow you to filter out resources not containing geofences of specified mask.
If you have only one resource - this request will return this resource with ALL it's geofences (if one or more of them meet to name mask) or it will return nothing (if there is no geofences with such mask).
This request can only reduce amount of resulting geofences.
Anyway finally you need to filter the rest of geofences yourself.

Head of Wialon Local Department
Gurtam
5

search notification by Name

Re: search notification by Name

Hello everyone,

I used javascript API to get notification.But I also get empty array.
How can I get ?

Here is my code:

var sess = wialon.core.Session.getInstance();
sess.loadLibrary('resourceZones');
sess.loadLibrary("resourceNotifications");
sess.updateDataFlags(
    [{type: "type", data: "avl_resource", flags: flags, mode: 1}],
    function (code) {
        if (code) { msg(wialon.core.Errors.getErrorText(code)); return; }

        // get loaded 'avl_resource's items with edit notification access
        var res = sess.getItems("avl_resource");
       
        for (var k = 0; k< res.length; k++) {
            console.log(res[k].getNotifications([10]));           
        }
    });