This documentation has moved. For the most recent documentation, check out https://docs.adaptavist.com. Please update your bookmarks and links.

Skip to end of metadata
Go to start of metadata

Description

This Restful Table Macro provides the ability to create a table that contains data retrieved from a given URL.

Adding a RESTful table to your Confluence page allows you to include data that can 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.

Please note that this macro has been designed as a developer macro and requires some knowledge of REST API’s. To learn more about what can be done using REST API’s in Confluence please follow this link

Usage

Click Insert > Other Macros.

This will take you to the Macro Browser, where you can search and select the Restful Table Macro from the list. 



Parameters 

There are three parameters that can be set for the Restful Table Macro. These are as follows:

ParameterDescriptionType

Default

Required?
Resource URL

Specify the URL from which to retrieve the data 

string

none

(tick)

Header
Headers are the labels for each column relating to the data
stringnone(tick)
ID

A value indicate 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 attribute

stringnone(tick)


Once the Restful Table has been added to a page, it will appear on page load. A page can contain multiple tables.

Example

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

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


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

Parameters not included in the table column are ignored, so the user can specify exactly what parameters he wants displayed.



  • No labels