This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
en:pro:remoteapi:codesamples:search [29/11/2013 13:31] 127.0.0.1 external edit |
en:pro:remoteapi:codesamples:search [18/01/2016 12:55] stan [Search items by property] |
||
---|---|---|---|
Line 100: | Line 100: | ||
}] | }] | ||
} | } | ||
+ | </code> | ||
+ | |||
+ | ==== search units by creator ==== | ||
+ | |||
+ | <code> | ||
+ | <your_wialon_pro_address>/ajax.html?svc=core/search_items& | ||
+ | params={ | ||
+ | "spec":{ | ||
+ | "itemsType":"avl_unit", | ||
+ | "propName":"22sys_user_creator", | ||
+ | "propValueMask":"22ac745a8ec8eb54469607d30bfeffb807", /* creators "gd" property */ | ||
+ | "sortType":"sys_name" | ||
+ | }, | ||
+ | "force":1, | ||
+ | "flags":1, | ||
+ | "from":0, | ||
+ | "to":0xffffffff | ||
+ | }&ssid=<your_sid> | ||
+ | </code> | ||
+ | |||
+ | Response: | ||
+ | |||
+ | <code javascript> | ||
+ | { | ||
+ | searchSpec: { | ||
+ | itemsType: "avl_unit", | ||
+ | propName: "sys_user_creator", | ||
+ | propValueMask: "ac745a8ec8eb54469607d30bfeffb807", | ||
+ | sortType: "sys_name" | ||
+ | }, | ||
+ | dataFlags: 1, | ||
+ | totalItemsCount: 3, | ||
+ | indexFrom: 0, | ||
+ | indexTo: 2, | ||
+ | items: [{ | ||
+ | nm: "unit1", | ||
+ | cls: 3, | ||
+ | id: 554 | ||
+ | },{ | ||
+ | nm: "unit2", | ||
+ | cls: 3, | ||
+ | id: 558 | ||
+ | },{ | ||
+ | nm: "unit3", | ||
+ | cls: 3, | ||
+ | id: 559 | ||
+ | }] | ||
+ | } | ||
+ | |||
</code> | </code> |
|