Filter by Key

Answered

Comments

12 comments

  • Andreas Garnæs

    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

    0
    Comment actions Permalink
  • Alan Alvarado

    Hi Andreas,

    Sure the url it is https://api.podio.com/item/app/{app_id}/filter/ and the body it is
    {filters:{"fecha": {"start":"2015-09-1 ","end":"2015-09-3 "}}}

    0
    Comment actions Permalink
  • Andreas Garnæs

    Is fecha a date field? If so, please try the keys from and to as described at the bottom of this page (under the date header): https://developers.podio.com/doc/filters

    0
    Comment actions Permalink
  • Alan Alvarado

    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?

    0
    Comment actions Permalink
  • Andreas Garnæs

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

    0
    Comment actions Permalink
  • Alan Alvarado

    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

    0
    Comment actions Permalink
  • Andreas Garnæs

    Your JSON looks malformed, it should be like this:

    {
      "filters": {
        "created_on": {
          "start": "{date.startOfMonth}",
          "end": "{date.endOfMonth}"
        }
      },
      "limit": 50
    }
    
    0
    Comment actions Permalink
  • Alan Alvarado

    Here is a link to the response and I got only 20 items http://www.jsoneditoronline.org/?id=eb8fadaf70272352eeb45f82e22a5936

    0
    Comment actions Permalink
  • Andreas Garnæs

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

    0
    Comment actions Permalink
  • Alan Alvarado

    It was my fault on the headers, now it is working. Thanks!

    0
    Comment actions Permalink
  • Alan Alvarado

    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!

    0
    Comment actions Permalink
  • Andreas Garnæs

    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.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk