HTTP GET Data Source

Available on the Advanced and Enterprise tiers:

Essentials
Advanced
Enterprise

Contents

About

The HTTP GET Data SourceClosed Data sources, also known as "Lookups", are external sources of data that you upload or connect to TrueContext. You can reference this data in a form to populate answers or answer options. Data sources save typing, reduce errors, and make it easy to provide mobile users with only the relevant, most current data. allows TrueContext to retrieve data from a web application or data storage system accessible through the internet through an HTTP GET request, and is typically used to set up a custom integration.

The data retrieved by this data source can then be used to populate a list of options in dropdown or radiobutton questions in a form, or populate additional answers based on a selection.

Tips for System Integrators:
  • This data source can use any API request that uses the GET method. Usually this is for requests named something like "Retrieve a List of Records".

Basic Setup

  1. Create the data source as described here.

  2. Select HTTP GET Data Source as the type.

  3. Select a Name and optionally enter a Description.

  4. Set up the data source using the information below.

Data Retrieval and Format

Push updates to device after a fetch

If this option is selected, users will get a notification from the TrueContext app after a fetch. It will prompt users to reconcile (send/receive or refresh). This setting is recommended if it is important that users have the most up-to-date data.

Fetch Schedule

Automatically fetch new data on a schedule:

  • If checked, data will be retrieved at the specified Fetch Frequency interval.
    • Make sure that the team has at least one Problem Contact Email Address. If a fetch is unsuccessful for any reason, this address will receive an email with an error message and details. Without this email, it may not be immediately clear that a fetch has failed.
  • If unchecked, the data source will not be updated automatically. To retrieve new data, the data source will need to be manually updated through the "Fetch New Data" button on the data source's details page in the web portal.

Fetch Frequency:

Choose Hourly, Daily, Weekly or Monthly. This is how often the data source will fetch new data from the data source.

Fetch Timezone: This applies to all fetch frequency options except “Hourly.” The data retrieval will occur at midnight in the specified time zone, at the specified interval.

Input Configuration:

Data Format

Be sure to choose the data format that is going to be returned by the system you are integrating with. To be certain, look at their API documentation for the GET call you would like to make. In the Sample Response Body, it will show you the format.

Info: For a JSON response body, check that TrueContext supports the structure of the JSON data.

Other Settings

  • UTF-8 Encoded: This is not relevant for JSON or XML.

  • Trim Whitespace: This option will remove any space, tab, or other "whitespace" characters that may be present at the beginning or end of a data value. This is recommended.

  • CSV Delimiter: This option is relevant only when uploading a CSV file. When saving to delimited format from a spreadsheet application, comma is generally used as the separating character, but semi-colon may be used by some applications in some regions.

  • Enable pagination (JSON data only): Select this option if your JSON data is paginated. Under Pagination “Next Link” Key, enter the name of the JSON field that contains the link to the next page of data. The following example shows how to enter a pagination key.

Connection

Connection Configuration

Configure a new HTTP Connection or choose an existing connection.

URL Suffix

In your HTTP Connection, you will have set up a Base Connection URL, which is usually the first part of the URL that will be used by all your data sourcesClosed Data sources, also known as "Lookups", are external sources of data that you upload or connect to TrueContext. You can reference this data in a form to populate answers or answer options. Data sources save typing, reduce errors, and make it easy to provide mobile users with only the relevant, most current data. and destinations.

In the data source URL Suffix field, you enter the remainder of the URL. This is the part that is usually unique, and specifies exactly which object to retrieve data from.

How can I find this value?

Go to the API documentation for the system you would like to connect to, and find the documentation for a GET call, like "GET - Retrieve a list of Records."

It will show the required URL format. In the example below, the URL is completed with the ID and name of the actual resource I want to write to; other API docs may require you to find this value yourself.

Be sure to:

  • Exclude any special characters that are not part of the URL, like quotes or backslashes (see above)
  • Ensure that the Base Connection URL combined with the URL Suffix form a valid URL
    • One common mistake is to omit the slash between them

HTTP Headers

Include any necessary request headers based on your third-party system’s API documentation specifications, except for authentication headers.

Note:Use an HTTP Connection to authenticate instead of Data Source or Data DestinationClosed A Data Destination specifies where to send data from a submitted form. You can use Data Destinations to automate data sharing and storage, routing data to a specific service (such as email or cloud storage) in several different formats. headers. This keeps credentials and authentication values secure. The topic HTTP Connection includes a list of supported authentication methods.