[Solved] Using the REST API how can I filter for Partial and Complete responses

0

I’ve tried the following filter but that returns no results:

&filter[field][0]=status&filter[operator][0]==&filter[value][0]=Complete&filter[field][1]=status&filter[operator][1]==&filter[value][1]=Partial

When I just have one filter on status (either Complete or Partial) like the following:

&filter[field][0]=status&filter[operator][0]==&filter[value][0]=Complete

It returns the expected results. Is there a way to return both Partial and Completes in a single call?

Brad Patton asked

    Best answer

    1

    When you add a filter to an API call, you are specifying a condition that the response must meet in order to be included in the return. If there are multiple conditions specified in the filter, then the response must fulfill all of the conditions.

    The first filter that you listed will only include responses that have the status of complete and the status of partial. Since this isn’t possible, it returns no responses.

    You can exclude disqualified responses directly with the following filter:

    &filter[field][0]=status&filter[operator][0]=!=&filter[value][0]=Disqualified

    Whether or not a response is a test response is recorded in a different field, you can use this filter to only include responses that aren’t test responses:

    &filter[field][1]=is_test_data&filter[operator][1]==&filter[value][1]=0

    Zachary answered
      0

      Have you tried eliminating the filter completely and worrying about the status once they retrieved on the processing side.?

      ithotline answered
        • I do that currently but I have a lot of disqualified and test responses that I don’t want and are slowing down the process. Hence the desire to get back less data.

        ×

        Login

        Question stats

        • Active
        • Views4366 times
        • Answers2 answers
        • Followers0 followers