HTTP GET Data Source

TrueContext uses an 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. to retrieve data from external web applications or storage systems via HTTP GET requests. This data can populate Dropdown, Multiselect, and Radio Button questions—ideal for asset lists, inventory, customer records, or other operational data.

This topic explains how the HTTP GET Data Source works and how to configure it in TrueContext.

Available on the Advanced and Enterprise tiers:

Essentials
Advanced
Enterprise

Contents


How an HTTP GET Data Source works

A TrueContext HTTP GET Data Source fetches data from external systems by means of an HTTP GET request.


Setup instructions: HTTP GET Data Source

Prerequisites


Basic configuration

  1. From the Forms & Integrations menu, create or edit a Data Source.

  2. Choose HTTP GET as the Data Source type.

  3. On the Name tab:

    1. Enter a Name (required).
    2. Enter a Description (optional) to help identify the Data Source when you have more than one in the system.
  4. Do you want to fetch data as soon as you’re done setting up the Data Source?

    • If yes, in the Actions section, select Fill the Source Data immediately.

    • If no, go to the section Data Retrieval and Format.


Data Retrieval and Format

Notification and fetch settings

  1. You can set up the Data Source to notify field technicians when the TrueContext server has fetched new data.

    Do you want to prompt users to reconcile after a fetch?

    • If yes, select Push updates to device after a fetch.

      Tip:We recommend this option when it’s critical for your field technicians to have the most up-to-date information.

    • If no, clear the option to push updates.

  2. You can fetch data automatically or manually.

    • To fetch data automatically at regular intervals (hourly maximum):

    • To only fetch data manually, as needed, clear the Automatically fetch new data on a schedule option.


Input configuration

The Input Configuration section contains settings for how TrueContext handles the HTTP response.

  1. Check the API documentation for the target system, and note the format of the sample response body. Then, select the Data Format of the HTTP response.

    Result: The options change based on your selections.

  2. Set up the format-specific data handling options.

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

    All data formats
    Setting Description
    UTF-8 Encoded Uses the UTF-8 character encoding standard to support global character sets.
    Trim Whitespace Removes leading and trailing whitespace from data values. Recommended to avoid API issues.
    CSV
    Setting Description
    CSV Delimiter Comma or semicolon, to separate data values.
    XML and JSON
    Setting Description
    Root Node

    Specifies which node to use when your API response has multiple nodes at the root level.


    XML Example:

    <response>
      <items>
        <item>...</item>
        <item>...</item>
      </items>
      <links>
        <link>...</link>
        <link>...</link>
      </link>
    </response>


    To retrieve data from the items node, set the Root Node to /response/items.


    JSON Examples:

    • Top-level array): Use the name of the array node at the root of the JSON response.

      {
        "items": [ ... ],
        "links": [ ... ]
      }
      • To retrieve data from the items array, set the Root Node to:

        /items

      • To retrieve data from the links array, set the Root Node to:

        /links

    • Nested array: Use JSON Pointer syntax to specify a nested array node within the response.

      {
        "data": 
      {    "items": [ ... ]
        }
      {    "links": [ ... ]
        }
      }

      To retrieve data from the items array inside data, set the Root Node to:

      /data/items

    Note:When you specify paths to data fields, use JSON Pointer syntax. Start your path with a forward slash (/). The forward slash at the beginning means you're starting from the root of the document.

    JSON
    Setting Description
    Enable pagination

    Enables retrieval of paginated datasets using link, token, or offset methods.

    Link-based pagination
    Description Configuration Examples
    Uses a field in the API response (such as @odata.nextLink) to provide the URL for the next page. Provide the JSON Pointer syntax to the next page link.

    /@odata.nextLink

    /links/next

    Token-based pagination
    Description Configuration Examples
    Extracts a token (such as next_page_token) from the response and sends it as a request parameter. Provide the JSON Pointer syntax for the token and the token parameter name.

    Token node: /meta/next_cursor

    Token parameter: cursor

    Offset-based pagination
    Description Configuration Examples
    Uses numeric parameters (offset, limit) to specify which records to retrieve next.

    Provide:

    • Offset parameter

    • Limit parameter

    • One of:

      • Total Results Node
      • More Results Node
    • Offset: offset, startAt
    • Limit: limit, maxResults
    • Total: /meta/pagination/total
    • More: /info/more_records

    Note:When you specify paths to data fields, use JSON Pointer syntax. Start your path with a forward slash (/). The forward slash at the beginning means you're starting from the root of the document.


Connection

An HTTP Connection establishes secure communication between TrueContext and a third-party system.

  1. On the Connection tab, set up a new HTTP Connection or choose an existing connection. Do you need to set up a new connection?


Create a new Connection

  1. Enter a unique Name (required) and a Description (optional). If you have multiple HTTP ConnectionsClosed A Connection is an integration point that's used to link a TrueContext Data Source or Data Destination to an external service to import or export data. Data Destinations and Data Sources that share the same external service can also share the same Connection., a detailed description helps you identify each one.

  2. Select the FormSpaces that can access the Connection.

  3. Under Base Connection URL, enter your third-party system Base URL.

    Tip: The Base URL is the part of an API endpoint that all endpoints for a system have in common. You specify the Base URL in the Connection, and then you specify endpoints in Data Sources and Destinations. This way, you can reuse your Connection for multiple integrations with the same system.

    For example, if your API endpoint is https://api.thirdparty.com/1.0/data/{dataId}, then your Base URL is https://api.thirdparty.com/.

  4. Do you need to authenticate using an Authentication Scheme?

    • If no, select Anonymous Access.

    • If yes, select an Authentication Scheme.

      Authentication Scheme Credentials required
      Basic Enter a Username and Password.
      Digest Enter a Username and Password.
      NTLM Enter a Username and Password.
      Form-Based
      1. Enter a Username, Password, Login POST Url, Username POST Parameter, and Password POST Parameter.

      2. (Optional) Enter a Connection Initialization GET URL.

      3. If required, enter any additional POST Parameters.

      Bearer Enter a Bearer Token.
      OAuth 2.0

      Note:Before you set up your Connection using OAuth, you must configure an OAuth app in your authorization server. When you do this, specify the following Redirect URI: https://live.prontoforms.com/security/oauth/connections/httpoauth

      Info:We’re now TrueContext.

      Select a Grant Type:

      Grant Type Actions
      Client Credentials
      1. Enter an Access Token URL, Client ID, and Client Secret.

      2. (Optional) Enter a list of Scopes separated by a space.

      3. (Optional) Select Add to set up Additional Parameters. Enter a Parameter Name and Parameter Value. You can enter up to ten additional parameters.

      4. Select Connect to check that you successfully connected.

      Authorization Code
      1. Enter an Authorization Code URL, Access Token URL, Client ID, and Client Secret.

      2. (Optional) Enter a list of Scopes separated by a space.

      3. (Optional) Select Add to set up Additional Parameters. Enter a Parameter Name and Parameter Value. You can enter up to ten additional parameters.

      4. Select Connect to check that you successfully connected.

      Note:If you change any of the OAuth 2.0 values you entered, the system resets your Connection. Select Connect, and then save your changes.

      Tip:TrueContext supports OAuth 2.0 Refresh Tokens. The system attempts to refresh the Connection if it expires.

      API Key Enter a Header Name and Header Value. These are included with all HTTP requests to authenticate with the third-party system.

Set up the HTTP request

  1. Your Connection defines a Base Connection URL. This is the first part of the URL used by your HTTP Data Sources and Destinations.

    In the URL Path field, enter the portion of the URL that uniquely identifies the resource you want to retrieve.

    To find the URL for the GET endpoint, refer to your system's API documentation.

    Note:Remember to:
    • Ensure that the Base Connection URL and URL Path combination forms a valid URL. For example, if the Base Connection URL is https://api.yourcompany.com/v1/ and the URL Path is customers, the resulting URL is:

      https://api.yourcompany.com/v1/customers

      Make sure there's a slash between the two parts.

    • Exclude any special characters that aren't part of the URL.

  2. Enter any required Query-String Arguments as a set of key-value pairs. TrueContext sends these as query parameters as part of the URL. For example, you can use query parameters to limit results by date range, status, or geographic region.

  3. 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.


Best practices for HTTP GET requests

  1. Request only the data fields you actually need in mobile forms to optimize API performance.
  2. Use appropriate filters (query parameters) to limit result set size and reduce data transfer times.
  3. Configure reasonable fetch frequencies to balance data freshness with system performance.
  4. Monitor API rate limits and adjust fetch timing to avoid exceeding quota restrictions.
  5. Use HTTPS endpoints whenever possible for encrypted data transmission.
  6. Store authentication credentials in Connection settings, not Data Source configuration.
  7. Regularly review and rotate API keys and authentication tokens for security.
  8. Limit API permissions to read-only access when possible.

Troubleshooting

  1. Check your base URL format if you're experiencing connection failures. Ensure the external system is accessible.
  2. Verify that firewall rules allow outbound connections from TrueContext servers.
  3. Confirm that your API credentials are current and valid if receiving authentication errors.
  4. Check that authentication headers are properly configured in Connection settings.
  5. Review your API documentation to ensure correct data format selection.
  6. Verify root node paths for JSON responses and delimiter settings for CSV data.
  7. Confirm the query parameters if you're receiving empty result sets.
  8. Test the complete API endpoint directly using tools like Postman or curl to verify expected responses.