API search/get multiple rows in a sheet
I need some help formulating an API call to retrieve multiple rows of data in a sheet that have a specific key word.
I can successfully use the /2.0/search/sheets/xxxxxx?query="A2" query to get a list of rows however I don't know how to continue this query to then pull all the rows of data that match the query.
Answers
-
Does your source sheet have a filter on it that matches the value you're looking for? If so, you could use a Get Sheet request and apply this filter as a parameter:
GET /sheets/{id}?filterId={filterId}&exclude=filteredOutRows
Here's the documentation on this: Get Sheet
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Can anyone actually confirm that the above ?filterid={filterId} works?
we cannot get this work. the filter id never changes in the response.
we have noticed that if you change filters in the smartsheet website, then the filter ID changes in the response.
-
....?filterid={ID}&exclude=filteredOutRows didn't help me either could you find a way?
-
I have been trying to figure this out with the python API and discovered in addition to the exclude="filteredOutRows" parameter the sequence of your options are key.
The API code wants the filter_id last. So using something like this works.
t = smartAPI.Sheets.get_sheet(
9905399599899399, # sheetId
exclude="filteredOutRows",
filter_id=5758236805621636, # filterId - created in the Smartsheet sheet
)
I tested it in Postman and this same format works.
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.6K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 468 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 64 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives