jotform / jotform-api-nodejs

JotForm API - NodeJS Client
GNU General Public License v2.0
33 stars 26 forks source link

Filter "form_id" doesn't work for "GET /user/forms" #8

Closed wzup closed 7 years ago

wzup commented 7 years ago

Check out this method of Node.js SDK, it doesn't filter by formID GET /user/forms

Try yourself.

See, I specify limit=100 but I also specify to filter result by two formIDs only. So I have to receive just 2 items. But I receive full 100 items. How it can be?? id filter key doesn't work either

https://api.jotform.com/user/forms?apiKey=...&filter="{"form_id":[827356126,9384673498]}"&limit=100&orderby=created_at

// Encoding URI component doesn't do the job either:
https://api.jotform.com/user/forms?apiKey=&filter="%7B%22form_id%22%3A%5B4065204955%2C5309169199%5D%7D"&limit=100&orderby=created_at

{
    responseCode: 200,
    resultSet: {
        offset: 0,
        limit: 100,
        orderby: "created_at",
        filter: ""{"form_id":[60422050068949,53609169109965]}"", // <==== the filter
        count: 100  // <==== HOW IS IT POSSIBLE??? Must be only 2
    },
    message: "success",
    content: [ 100 items here ]
}
kennethpdev commented 7 years ago

You can only filter it using the right properties. To filter out results with their form IDs you have to use id and not form_id. Also you can only query one form at a time with the formID filter like this &filter={"id":"62851496905971"}. Please create an issue about filtering multiple formIDs and see if we can implement that. Thanks