I want to find a way of using the Google API to retrieve a specific row of data based on criteria I supply. I am thinking "getByDataFilter" might do this?
I am writing an app for personal use. I want to use Google Sheets as my backend so that I can mail merge from it. At this stage I am using the API explorer to see what data I can get. I have figured out how to get data from a range of cells using
GET https://sheets.googleapis.com/v4/spreadsheets/1keCaROqv4ytDaf5AhcMV13Jj3N_eZCpLfRAGt2ycwA8/values/A%3AL?valueRenderOption=UNFORMATTED_VALUE&fields=values&key={YOUR_API_KEY}
I have tried playing around with getByDataFilter but cannot seems to return any filtered values.
I have the following which basically returns everything.
POST https://sheets.googleapis.com/v4/spreadsheets/1keCaROqv4ytDaf5AhcMV13Jj3N_eZCpLfRAGt2ycwA8:getByDataFilter?fields=sheets(data(columnMetadata%2FdeveloperMetadata%2Flocation%2FdimensionRange%2FstartIndex%2CrowData%2Fvalues%2FeffectiveValue%2CstartColumn%2CstartRow))&key={YOUR_API_KEY} { "dataFilters": [ { "developerMetadataLookup": { "metadataLocation": { } } } ] }
I expect to be able to filter the data and only return the columns that match the criteria I specify. i.e. a simple example would be if I had a sheet like this
----------------------------------
| Name | Age | Job |
----------------------------------
| Craig | 42 | Teacher |
----------------------------------
| Tim | 23 | Student |
----------------------------------
| Jess | 45 | Accountant |
----------------------------------
I want to be able to somehow filter for Tim's row and return ['Tim',23,'Student']
Thanks,
Craig
['Tim',23,'Student']
from your sample Spreadsheet? 2. Can you use the access token retrieved by OAuth2 and/or service account? - Tanaike