Elements Connect

1 - Fetch data from data source

The first step in configuring a connected custom field consists in setting up the way it fetches data from an external data source. You'll configure either a REST API request (with GET or POST, and optional FreeMarker for dynamic queries) or a database query (visual builder or raw SQL). Both types support cache configuration and can be validated through the built-in Configuration Tester before saving.

Fetch data from a REST API

API request

In this section you will be able to specify how your data will be retrieved.

API request configuration panel for a REST API data source in Elements Connect (data source, HTTP method, REST endpoint, and cache options)

Data source

This is the REST API from which your data will be fetched and put in your connected custom field.

Method

The HTTP method used to retrieve data from the REST API. Two methods are currently supported:

  • GET: the standard method for read-only data retrieval. Simple to set up, no request body required.

  • POST: used when the API requires a request body to specify search or filter criteria. The body accepts JSON.

Both methods supports FreeMarker for dynamic values (issue context, current user, user input, and dependencies on other custom fields).

Configuring a JSON request body for a POST method REST API request in Elements Connect

REST endpoint

This field is prefilled with the URL of your API, as it was defined in the data source configuration. You can complete here with the appropriate endpoint to reach the data you need.

Learn more in our Query guide: Dynamic and cascading queries in Elements Connect.

Cache

How does cache / caching data works in Elements Connect?

Test your configuration

You can use the Configuration Tester to check that your API request has been correctly set up, that it retrieves the expected information, and to see the response.

Configuration Tester for a REST API request in Elements Connect, previewing the API response before saving the connected custom field

Learn more: Configuration tester

Data in API response

Next step 👉 Filter data from your API response

Fetch data from a database

Database query

Data source

This is the database from which your data will be fetched and put in your connected custom field.

SQL query

In this section, you can either configure your query manually (SQL mode), or use our visual tool to navigate among your data source structure and create your query more easily (visual mode).

Visual mode
image-20240906-144835.png
SQL mode
SQL mode in Elements Connect, writing a raw SQL query manually for a database data source

Cache

How does cache / caching data works in Elements Connect?

Test your configuration

You can use the Configuration Tester to check that your SQL query has been correctly set up, that it retrieves the expected information, and to see the response.

The results can be displayed in either a JSON or table format.

Configuration Tester for a database data source in Elements Connect, showing SQL query results in JSON and table format

Learn more: Configuration tester

Live update

Live update is an option available for connected custom fields configured with the Object storage type. When enabled, the displayed value of the field is refreshed every time the Jira issue is viewed, ensuring the data always reflects the current state of your data source.