Hello everyone,
I have list of more than 2000 products in a table. I want to search products using API. Please help me, how to do that?
Hello everyone,
I have list of more than 2000 products in a table. I want to search products using API. Please help me, how to do that?
Do you have an integration tool, like Pabbly Connect they have a built in action for search records. Otherwise you need to make an api call like this:
Thanks for the reply. I donât have any automaton tool.
Hereâs the example of my use case; Let suppose, I have table of products containing more than 2000 products. How to search products using api? I know, I can use ?filter=âproduct_nameâ :[âWhite Art Paperâ]. But my question is, how can I search without using the full name? I mean using âpaperâ instead of âwhite art paperâ and it should show all the products having the searched keyword in the product name.
Hi There,
Unfortunately, there is not a way to search via API in this way at this time but would be great as a future improvement!
Thanks,
This probably wonât help you @Techville_eServices , but just in case.
It is possible to do full text search on Grist documents using SQLiteâs full text support. We donât have API support for this though, so it is only useful if you are self-hosting, or where periodic downloading is acceptable.
For example, if I were to download the class enrollment template, I could enable full-text search on some columns of one of its tables by installing sqlite-utils and then running:
sqlite-utils enable-fts Class\ Enrollment.grist Classes Semester Class_Name Class_Code --create-triggers
Now I can make full text queries either directly using the MATCH operator or by using sqlite-utils
again:
$ sqlite-utils search Class\ Enrollment.grist Classes "Yoga"
[{"rowid": 3, "id": 3, "manualSort": 3, "Semester": "Spring 2019", "Class_Name": "Yoga Kids", "Class_Code": "2019S-Yoga", "Instructor": 4, "Times": "Sunday 10:00\u201311:00", "Days": "2019 Spring Sundays", "Start_Date": 1548547200, "End_Date": 1560038400, "Max_Students": 12, "gristHelper_Display2": "Toupe, Joby", "Count": 7, "Spots_Left": 5},
{"rowid": 7, "id": 7, "manualSort": 7, "Semester": "Fall 2019", "Class_Name": "Yoga Kids", "Class_Code": "2019F-Yoga", "Instructor": 4, "Times": "Sunday 10:00\u201311:00", "Days": "2019 Fall Sundays", "Start_Date": 1567900800, "End_Date": 1575763200, "Max_Students": 12, "gristHelper_Display2": "Toupe, Joby", "Count": 8, "Spots_Left": 4}]
Again, I realize this is not going to help in a scenario where you need an API endpoint you can call against a live Grist document on our hosted service.