wordpressgravity-forms-plugin

Call wordpress gf (gravity forms) form entries by some filters via rest api


I want to call wordpress gf form entries by specific filters in form fields via rest api. for example i want to get the entries for formID=12 and ip for 1.1.1.1.

To do this, In the postMan, i’ve create new request tab and follow these steps :

  1. Set request method to GET

  2. Set url to : mySite.com/wp-json/gf/v2/entries

  3. Set user and pass in Authorization tab

  4. in body section, i’ve these code :

    { "form_id": 12, "field_filters": [ { "key": "ip", "value": "1.1.1.1" } ] }

And click on Send button. But still i’ve received all entries for all forms without any filter!! I think this filtering scenario not working!!

Can anybody help me which how to accomplish this task?

Thanks in advance


Solution

  • Step 4: Go to the Params tab and add the parameters:

    Key Value
    form_ids[] 12
    search {"field_filters":[{"key":"ip","value":"1.1.1.1"}]}

    You may also try using this endpoint:

    /wp-json/gf/v2/forms/12/entries