RE: Query for Api call

21 views
Skip to first unread message

Eugene Tolmachev

unread,
Jul 30, 2021, 5:36:38 AM7/30/21
to sup...@altechx.com, pat...@sherpadesk.com, liz...@gmail.com, SherpaDesk API
Hi, 

you can look up and select any of them:

serial_tag_number
category name
note description
category_id
type type_id
make make_id
model model_id
serial
checkout_name
checkout_id
owner_id
owner_name
location_id
location_name
audit_note


but NOT unique_fields  and custom_fields, cause this is Arrays, not values,

Thanks
Eugene

От: sup...@altechx.com <sup...@altechx.com>
Отправлено: 29 июля 2021 г. 20:11
Кому: Eugene Tolmachev <eug...@micajah.com>; pat...@sherpadesk.com <pat...@sherpadesk.com>
Копия: liz...@gmail.com <liz...@gmail.com>
Тема: Re: Query for Api call
 
Thanks Eugene,

But if i have only tags and i want to look them up in sherpadesk system how do i acheive that ?

because am able to do it visa search query.

but if I use search query and there is unknown tag which is random scanned number it will look up all the details based on that value passed and may return unwanted result. Such as if tag is 11 it will look so many assets with 11 in them. 

That’s why i would like to add filter to avoid accidental scan results.

Is there any way we can achieve that?

Regards,
Liz n Ash

 

From: Eugene Tolmachev <eug...@micajah.com>
Sent: Wednesday, July 28, 2021 10:15 AM
To: sup...@altechx.com; pat...@sherpadesk.com
Cc: liz...@gmail.com
Subject: RE: Query for Api call
 
Hi,

this functionality for assets unique_fields cannot be implemented, cause
is nested objects with variable size, like custom fields.

for all other fields you can use QUERY parameter,
like 

/assets?category_id=1128&type_id=3727&is_with_custom_fields=1&limit=40&query=model_id=29554

but be careful,  Magic and filter query applied only on current data page. Please use search parameter to get correct results.

/assets?category_id=1128&type_id=3727&is_with_custom_fields=1&limit=40&model_id=29554

see docs: https://github.com/sherpadesk/api/wiki
SherpaDesk API docus. Contribute to sherpadesk/api development by creating an account on GitHub.


От: sup...@altechx.com <sup...@altechx.com>
Отправлено: 27 июля 2021 г. 17:42
Кому: pat...@sherpadesk.com <pat...@sherpadesk.com>
Копия: liz...@gmail.com <liz...@gmail.com>; Eugene Tolmachev <eug...@micajah.com>
Тема: Query for Api call
 
Hi Eugene,

I have query with the api calls with assets, if I want to look up assets only by the tags what will be appropriate declaration? 
Such as 


So instead of search which looks up all data related to value entered, how do I apply filter for just tags?
I tried Unique_value it’s not working

Regards,
Ash

Reply all
Reply to author
Forward
0 new messages