Post

3 followers Follow
0
Avatar

Filter by Key

I've been trying to filter a request by key. Following the example described in the Podio API Doc and using the Sandbox I am setting as value in the key field the following "654321;6" where 654321 is the field_id and 6 the value. As a result I got the following: Invalid value "{key}" (string): Invalid filtering key.

I will appreciate anybody's advise.

Alan Alvarado Answered

Please sign in to leave a comment.

12 comments

0
Avatar

Hi Alan,

Could you share the code or API request (URL and post body) you're trying to make and the full response please?

Thanks,
Andreas

Andreas Garnæs 0 votes
0
Avatar

Hi Andreas,

I change the filter of my POST for the following: {filters:{"created_on": {"from":"{2015-10-1}","to":"{2015-10-5}"}}} my issue with this POST it is that it is retrieving data from 2015-9-23, that means that I have information from September. Any idea?

Alan Alvarado 0 votes
0
Avatar

That sounds weird. Would you be able to share the full HTTP request and response?

Andreas Garnæs 0 votes
0
Avatar

Thanks Andreas for your message, my fault, I was able to solve it. One thing only, the response retrieve 20 items (default) how can I increase it to 50? I have done this:

{filters:{"created_on": {"start":"{date.startOfMonth}","end":"{date.endOfMonth}"}}},{"limit": 50}

but I continue getting 20 items instead 50. Appreciate your help

Alan Alvarado 0 votes
0
Avatar

Your JSON looks malformed, it should be like this:

{
  "filters": {
    "created_on": {
      "start": "{date.startOfMonth}",
      "end": "{date.endOfMonth}"
    }
  },
  "limit": 50
}
Andreas Garnæs 0 votes
0
Avatar

Could you share your full request please? Have you set the Content-Type header to text/json?

Andreas Garnæs 0 votes
0
Avatar

Hi Andreads,

Using the same function, am I able to get specific fields? In order to minimize the transferred data between each request to Podio.

Thanks!

Alan Alvarado 0 votes
0
Avatar

You can add the query parameters view=x and fields=y to the URL to control the JSON output. Try for example view=mini&fields=comments,comment_count. view controls what included by default, and then fields let you specify a comma-separated list of fields to additionally include.

Andreas Garnæs 0 votes