The readWebforms function attempts to return webforms that match all of the given filters.


The readWebforms function may return 1 or many webform objects. See the documentation on the webformObject for a list of the data fields that could potentially be returned.


webformObject[] webforms = bApi.readWebforms( filter webformFilter, pageNumber);


Name Type Required Description
filter webformFilter Yes The filter used to return specific webforms.
pageNumber int Yes Retrieves the next “batch” of objects as the value specified increases from 1. In order to obtain an entire set of objects for a given call, you should increase the number value assigned to pageNumber until no more objects are returned.

PHP Code Example

 * This example will return webform objects for webforms
 * that whose name matched the given filter.
$client = new SoapClient('', 
                          array('trace' => 1,
                                'features' => SOAP_SINGLE_ELEMENT_ARRAYS)
try {
    // Add in a valid API token
    $token = "ADD TOKEN HERE";
    print "logging in\n";
    $sessionId = $client->login(array('apiToken' => $token))->return;
    $session_header = new SoapHeader("",
                                     array('sessionId' => $sessionId));
    // set up a filter to read webforms
    $filter = array('type' => 'AND',
                'name' => array('operator' => 'Contains',
                                 'value' => 'SOME VALUE')
    print "reading webforms\n";
    $webforms = $client->readWebforms(array('pageNumber' => 1,
                                            'filter' => $filter
} catch (Exception $e) {
    print "uncaught exception\n";
    print $e;
// print matching webforms
foreach ($webforms as $webform) {
        print("ID: " . $webform->id . " Name: " . $webform->name . "\n");

Python Code Example

from suds.client import Client
from suds import WebFault
import sys
import logging
# Tested with Python 2.6.1 and suds soap library version 0.4
# See suds home page:
# Bronto API WSDL
# start up basic logging
# login using the token to obtain a session ID
bApi = Client( BRONTO_WSDL )
    session_id = bApi.service.login(TOKEN)
# just exit if something goes wrong
except WebFault, e:
   print '\nERROR MESSAGE:'
   print e
# Set up the soap headers using the
# session_id obtained from login()
session_header = bApi.factory.create("sessionHeader")
session_header.sessionId = session_id
# Create the webformFilter passed into
# readWebforms()
filter = bApi.factory.create('webformFilter')
stringValue = bApi.factory.create('stringValue')
stringValue.value = 'SOME VALUE'
filterOperator = bApi.factory.create('filterOperator')
stringValue.operator = filterOperator.Contains
filterType = bApi.factory.create('filterType') = stringValue
filter.type = filterType.AND
pageNumber = 1
    webform_list = bApi.service.readWebforms(filter, pageNumber)
except WebFault, e:
    print '\nERROR MESSAGE:'
    print e
print bApi.last_sent()
print bApi.last_received()
print webform_list
for webform in webform_list:
    print 'Webform Name: ' +
    print 'Webform ID: ' +
    print 'Webform Type: ' + webform.type