Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

This article illustrates how to create a profile in for use with the CSV Table and JSON Table macros using a URL.

Info

Before you begin:

  • Before you enter the URL for a repository, ensure that it complies with the REST standards published by GitHub or GitLab.
    • Click here for more information on REST Pattern for GitLab.
    • Click here for more information on REST Pattern for GitHub.
  • Know what is a complete URL. A typical path for the raw file on GitLab looks like:
    /projects/:id/repository/files/:file_path/raw
  • Since the host address begins with:
     https://gitlab.com/api/v4
  • The complete URL, in this example, looks like: 
 https://gitlab.com/api/v4/projects/:id/repository/files/:file_path/raw?ref=master
  • For illustrative purposes, we have used a public Bitbucket public repository. The process for adding a profile and using it in macros remains the same for other repositories and external sources.
  • Verify that the URL conforms to the Confluence Whitelist; provided, whitelisting is enabled in Configuration settings.


There are three ways to work with URLs where you can use:

...

To use this profile in a Confluence page:

  1. Search for the CSV macro Table macro and edit it.
  2. Select Profile in Data source > Method of locating script.
  3. Select BitbucketFullURL from the Profiles drop-down list, and then, click Save.        

...

You can create a profile by providing a base URL and then, enter the relative path to the relevant files in the CSV Table macro.

  1. Navigate to CONFLUENCE ADMINISTRATION > Settings > Manage apps > Advanced Tables > Profiles.

  2. Click Add Profile.

  3. Enter a unique name for the profile in the Profile name text box. For this example, enter BitbucketProfile in the text box.
  4. Select URL from the options in Profile type
  5. Enter https://bitbucket.org/bobswift-test/ in the URL to CSV Data text box.

  6. Click Save profile to create the profile.

To use this profile in a Confluence page:

  1. Search for the CSV Table macro and edit it.
  2. Select Profile in Data source > Method of locating script.
  3. Select BitbucketProfile from the Profiles drop-down list in the editor.
  4. Enter the relative path to the CSV file in the URL to of CSV data parameter.
  5. Click Save.

...

You can skip creating a profile entirely and enter an absolute URL in the URL to of CSV filedata parameter.

  1. In a Confluence page, search for the CSV Table macro and edit it.
  2. Enter https://bitbucket.org/bobswift-test/testfiles/raw/4e437c71635ac79f796456495807fb6c65218c84/Rows-5k.csv in the the URL to of CSV file data parameter.
  3. Click Save.