Can podio's api filter item response with only

2019-03-04 18:22发布

问题:

My script needs to check from time to time that all items present in an app are recorded in its own db. Indeed even when using the podio hooks, it happens that my script and podio are getting desynchronised.

It uses the filter item api call by batch of 100 of items. In this case the script doesn't need to know all the fields values, but only the basic informations: item_id, app, title, link and current_revision.

I wonder if it's possible to set a query parameter in the filter function only only get the mini view of each item. This could improve greatly performances.

回答1:

You can use fields parameter for that.
More details on how it works and how else it could be used are right here: https://developers.podio.com/index/api in "Bundling responses using fields parameter" section.

Using fields to bundle objects can be a way to drastically reduce the amount of API requests you have to make.

Most likely you are looking for fields=items.view(micro) parameter. Podio API will return then only 5 values for each item:

  1. app_item_id
  2. item_id
  3. title
  4. link
  5. revision


标签: podio