Can podio's api filter item response with only a mini detail level for each item?

老子叫甜甜 提交于 2019-12-02 20:56:29

问题


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


来源:https://stackoverflow.com/questions/41952268/can-podios-api-filter-item-response-with-only-a-mini-detail-level-for-each-item

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!