Query API Parameters

Parameters

The Query API relies on a HTML POST to collect data from you, and a response is then returned back. The following parameters are acceptable values to place in your POST request.

w_api_key

Your 16 digit API key is required. If you do not have a key, read how to get one here.

w_form

The URL of the form you would like to pull data from. Required.

w_start

The entry you would like to start at. This parameter is not required, and it defaults to the first entry, 0.

w_page_size

How many records you would like to retrieve. The maximum is 100, and the default is 25. This parameter is not required.

w_sort

If you would like your results to be sorted, use this parameter. The expected value is the ID of the field you would like to place the sort on. For example, if you had a field titled First Name then you would supply the corresponding ID of 1 in the POST. The result would be all results returned, sorted by First Name alphabetically. To find your field/ID pairs, go to your Wufoo API page.

w_sort_direction

This paramtere takes two values: ‘ASC’ or ‘DESC’. The default value is ‘ASC’. In the example above, ‘ASC’ would return rows from a to z, while ‘DESC’ would return rows from z to a.

w_condition_count

If you would like to apply filters to your data, you must supply conditions. An example of this in conversation would be:

Show me all entries where First Name is equal to Ryan

In the example above, there would be one condition: ‘where First Name is equal to Ryan’. So, for the w_condition_count parameter, you would set a value of 1. Below, we will learn how to specify the actual conditions.

w_condition_field_i

Using the same example set above in w_condition_count, we will now set the condition field. In this case, it would be ‘First Name’. It is also important to note that in w_condition_field_i, the i represents the condition count. If this is the first condition, you would put a 1 there, like so:

w_condition_field_1 = 1

Again, we will use the corresponding field ID to represent the field. You can add up to 10 conditions. For each one, you would place the number instead of the i.

w_condition_i

Using the same example set above in w_condition_count, we will now set the condition. In this case, it would be ‘is equal to’. It is also important to note that in w_condition_i, the i represents the condition count. If this is the first condition, you would put a 1 there, like so:

w_condition_1 = Is equal to

You can add up to 10 conditions. For each one, you would place the number instead of the i.

Acceptable values for this parameters are:

  • Is equal to
  • Contains
  • Does not contain
  • Begins with
  • Ends with

w_condition_value_i

Using the same example set above in w_condition_count, we will now set the condition value. In this case, it would be ‘Ryan’. It is also important to note that in w_condition_value_i, the i represents the condition count. If this is the first condition, you would put a 1 there, like so:

w_condition_value_1 = Ryan

You can add up to 10 conditions. For each one, you would place the number instead of the i.

w_condition_match

This parameter comes into play when you have more than one condition. You may supply it with two values: ‘any’ or ‘all’. If you use ‘any’, then the returned result will contain data that matches any of your conditions. If you use ‘all’, then the returned result will only contain data that matches all of your conditions. The default value is ‘any’.

Updated : December 18th, 2007