The Adaptavist Group LogoDocumentation

Restful Table

This Restful Table macro adds a table that contains data retrieved from a given URL. Adding a Restful table to a Confluence page allows for data to change over the lifespan of that page (dynamic data). This can save time and can reduce error caused by manually updating data.

Example use cases could include the monitoring of traffic on specific pages, viewing completed work, stock exchange, etc.

Note: Please note that this macro has been designed as a developer macro and requires some knowledge of REST APIs. To learn more about what can be done using REST APIs in Confluence, you can start with this Wikipedia article.

Add a Restful Table to your page

  1. Navigate to the page you want to edit.
  2. Click Edit.
  3. Click the location where you want to add the table.
  4. Click Insert More Content → Other Macros.
  5. Select the Restful Table macro from Macro Browser.
  6. There are three parameters that must be set for the Restful Table macro:
    ParameterDescriptionTypeDefaultRequired
    Resource URLSpecify the URL from which to retrieve the datastringnone
    HeaderHeaders are the labels for each column relating to the datastringnone
    IDA value indicating to which column the data belongs e.g. If a data entry has a 'userID' attribute, the Header can be set to 'User ID' and the ID will be 'userID', replicating the name of the data attributestringnone
  7. Click Insert.
    The macro placeholder displays.
  8. Save the page to view the rendered table.

Creating a Restful Table

Below are the parameters that must be set for the macro:

This is an example of the data within the page that will be retrieved using the URL https://jsonplaceholder.typicode.com/posts for this table.

Note: Limitation: Fetched json objects must be in an array, that is to say, they must be enclosed in square brackets; additionally results are only read one level deep

Below is the output of the example Restful Table macro on the Confluence page.

Note: Parameters not included in the table column are ignored, so the user can specify exactly what parameters they want displayed.

Search documentation

Start typing to search the docs.