T
Twenty2mo ago
Denis

Question about restful api searching fields.

Hello, I was wondering if it’s possible to search for a record added in a modal (e.g., person, company, etc.) based on a specific field. For example, searching for a person using the phone number or email. Currently, it seems this can only be done via the UUID, but that’s not very practical.
2 Replies
marie
marie2mo ago
Hi @Denis, what do you use to execute your search? We have search endpoints exposed (searchPeople, searchCompanies, etc..). For now the search is using specific fields for standard objects: name, emails and job title for people; name and domain name for companies; etc. (you can find them in the workspace-entity files in the constants "SEARCH_FIELDS_FOR_XXX": example). For custom objects (an object you have created, for example "Listing"), we use the "label identifier", which defaults to name but can be updated in the data settings. Our medium-term vision is to make this configuration editable, to let you add or remove a field from the "searchable fields". Oh sorry I read your question too fast - this is only exposed in the graphql API but will be in the rest API soon. In the meantime you can use findMany endpoints with filters !
Want results from more Discord servers?
Add your server