I want to filter items from a Podio app, and fetch just the values for a subset of specific fields.
This should hopefully reduce the response time of the API.
The number of fields returned can be limited by specifying the fields
query GET parameter.
But it doesn't seem to work as expected and the documentation doesn't go in detail.
Fetch subset of fields for filtered-items?
with /item/app/{app_id}/filter/micro?fields=items.fields(email)
but the field isn't returned.
What am I doing wrong? I'd expect to get the micro
view and add the email
field to it.
Fetch a standard view instead of listing all fields
with /item/app/{app_id}/filter/?items.view(mini)
but doesn't seem to work with any custom defined view.
The documentation is unclear on what parameters can be used on which endpoints.
- Does this work just on the
item/
endpoint? (/item/{item_id}?fields=app.view(micro)
) - How to achieve the same on the
item/app/
endpoint?\ - Is it possible to fetch a custom view, rather than a standard one?
- If yes: just Team-Views or also Private-Views?
How to get a subset of the fields from an app view:
provide the name of a custom view? In my experience all the fields are still returned.
provide the name of a standard view,
micro
,mini
,full
, viafields=items.view(micro)
; the standard are not ideal for my use case. Is it possible to filter using a custom view?provide the name of a standard view (
micro
/mini
) and specify additional fields via GET parameterfields=items.fields(email,name,city)
?
(I wasn't able to make this work either)
My preferred way would be the first one, so I can programmatically choose fields without having to configure them in Podio.
The documentation is not really clear on what's possible (and might be not up to date), on what params to use and on what format should be provided.
Also isn't clear what can be used with item/app/APPID/filter
, item/ITEMID
.
Also info found on the Podio forum are discordant.
How to return a subset of fields, when filtering on an App?
(the purpose is to slim down the API request, reduce the workload and get a faster response time)
EDIT:
NOTE: that the Podio concept of App's FIELDS is not the same as the RESTful concept of FIELDS.
Hence using the GET fields
parameter in the way that Deepa Podio explained, works on the RESTful response fields, not on the Podio fields!
So...
How to return a subset of Podio Fields, when filtering on a Podio App?
Example, if the filter
API response is:
[
{
"sharefile_vault_url": null,
"title": "Test item",
"app_item_id": 2552,
"fields": [
{
"type": "text",
"field_id": 217293226,
"label": "Birth Date",
"config": {
"label": "Birth Date",
"settings": {
"format": "plain",
"size": "small"
}
},
"external_id": "birth-date"
{
"type": "app",
"field_id": 219992505,
"label": "Number of Parents",
"values": [
{
"value": ...
}
],
"external_id": "number-of-parents"
}
}
]
How to return just the number-of-parents
Podio field and exclude all the others?