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
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives