Polled Data Files

Polled Data Files were introduced in 11.2.0 and 11.4.0. Although designed with Zapier integrations in mind, this feature can support any 3rd party integration that relies on periodically requesting a data file from LearningBuilder.

Overview

Polled Data Files support third party integrations that receive data from LearningBuilder and then do something with it.

These types of third party integrations typically take one of two forms:

  1. Polling - The 3rd party system periodically requests data from LearningBuilder, figures out if any of the data is new, and then acts on it;

  2. WebHooks - LearningBuilder actively notifies the 3rd party of updated data immediately when changes occur.

The Polled Data Files feature supports the polling integration method.

Using this feature, LearningBuilder generates a data file on some configurable schedule, such as information about recently updated Members.

That file is published as a static asset, so that multiple third party systems can access it without causing additional performance load on LearningBuilder.

Essentially, the data file is updated on a schedule that LearningBuilder controls, allowing third parties to poll that file for changes on a schedule that they control, while minimizing performance impact to current users on LearningBuilder.

Zapier integrations are an example of a third party integration using Polled Data Files.

Configuring a Polled Data File

Setting up a new Polled Data File requires System Administrator privileges.

Once the feature is configured, end users can access the file using an API Key with appropriate access.

Configuration steps

Configuration steps

1

Create a SQL procedure that returns the necessary data

Use SAMPLE_POLLED_FILE_PROCEDURE as a starting point

If you intend to use this file with Zapier, the result set must contain a column called id that can be used for de-duplication. See https://platform.zapier.com/docs/dedupe and comments in SAMPLE_POLLED_FILE_PROCEDURE for more details.

Otherwise, LearningBuilder imposes no specific schema on the result set.

2

Add the procedure to the list of Custom Database Objects

Go to Sys Admin → App Configuration → Custom Database Objects and add that procedure using Feature Enum 10 for PolledDataFile

3

Add a Polled Data File linked to that procedure

Go to Sys Admin → Polled Data Files and create a new data file

  1. Select the desired procedure as the data source

  2. Select the API Key permission(s) that are required to access the file. If there are no custom permissions that you wish to use, then select the built-in ACCESS_POLLED_DATA_FILES permission.

4

Create an API Key authorization ruleset that provides the necessary permissions

Create (or edit an existing) API Key ruleset in Sys Admin → App ConfigurationAuthorization Rules.

This ruleset must grant:

  1. The built-in ACCESS_POLLED_DATA_FILES permission;

  2. The permission required by the Polled Data File (if using a custom permission)

Accessing a Polled Data File

Third party services can access the data file at /API/PolledDataFile/Get/<procedureName> where <procedureName> is the name of a SQL Stored Procedure that has been configured for use by this system (as described above).

In order to execute the procedure:

  • The request must identify a stored procedure that is mapped to a Polled Data File;

  • The request must include a valid API Key, where the owner still has the required Role;

  • The API Key must grant access to the Required Permission specified on the Polled Data File configuration