In the documentation there is a short mention about building responses. We use Google Apps Script, and because a podio response is about 30kb, we can hit a daily 100Mb limit quite fast. I want to optimize my calls and found this option.
But, is there any documentation about the way to use these parameters?
Bundling responses using fields parameter
It can often be useful to include more or less content in responses than the defaults provided by Podio. E.g. by default a request to Filter Items does not include the files of each individual item or when you get a single item you might want to include the app the item belongs to in the response. To solve those cases you can use a fields parameter in your URL.
// Include "votes" when getting a single item
// Include files when getting filtered items
// Include the full app when getting an item
These examples show the three main ways to use the fields parameter:
Include additional attributes on the object you are getting (such as votes on an item)
Include additional attributes on objects from a nested property (such as including files on the items property)
Use a standard view instead of listing all fields (such as including the full app on an item). Typical values are micro, mini, full
You can use nesting to get additional fields on any number of sub-properties. E.g. you can get the full app and the full space when fetching a single item:
// Include the full app and the full space when getting an item
Using fields to bundle objects can be a way to drastically reduce the amount of API requests you have to make.
Please sign in to leave a comment.