1

resource units (or unit-groups)

Topic: resource units (or unit-groups)

Hi there
I'm trying to get the list of units (or unit-groups) for a specific resource.
I'm using this code :

'svc=core/search_items&params={"spec":{"itemsType":"avl_unit","propName":"sys_billing_account_guid","propValueMask":"' . $res_id . '","sortType":"sys_name","propType":"property"},"force":1,"flags":1,"from":0,"to":0}&sid=' . $sid;

but I can only get units created by this resource and not all units which the resource have access.
If someone can help me getting this ?
thank you

2

resource units (or unit-groups)

Re: resource units (or unit-groups)

Hello!

If you need to get all units which belong not only one account, but plus units created under sub-account, you can try to use the following parameters:
"propName":"sys_user_creator"
"propValueMask":userID - means ID of user-creator as parent account, not resource ID
"propType":"creatortree"  - returns  the list of items (units) which have the user (user ID) specified in “propValueMask” in their chain of creators

example of request

https://hst-api.wialon.com/wialon/ajax.html?svc=core/search_items&params={"spec":{"itemsType":"avl_unit","propName":"sys_user_creator","propValueMask":"948","sortType":"sys_name","propType":"creatortree"},"force":1,"flags":1,"from":0,"to":1000}}],"flags":0}&sid=021eeeeccfc4ea5f04c601e39
Diana Cheley
Wialon Hosting Expert
Gurtam
3

resource units (or unit-groups)

(edited by trushal.shah 21/09/2020 16:00:57)

Re: resource units (or unit-groups)

Hello

I am new wialon , i do successfully aunticate login and get login user eid but after that i want get list of unit same as app 

https://gps2.tawasolmap.com/wialon/ajax … p;params={
"spec":{"itemsType":"avl_unit","propName":"sys_user_creator","propValueMask":"948","sortType":"sys_name","propType":"creatortree"}
,"force":1,"flags":1,"from":0,"to":1000}}],"flags":0}&sid=b71b0e431e21c0271dbc1e02703815c1

i tray to access this but getting error {"error":1, "r":"0-0"}

How i can get all list of units and its data same as wailon mobile application

https://play.google.com/store/apps/deta … &hl=en


is there any Mobile APi collection that i can import to my postman and start accessing all working API that would save time to manage access