Create a profile with a URL

Removal notice:

Please note that the URL user and URL user password parameters were removed in 5.8.5 (see Deprecation notice: URL user and URL user password parameters). We recommend using profiles to access external data.

This article illustrates how to create a profile using a URL to be used with any of the HTML for Confluence macros.

Before you begin:

  • Before you enter the URL for a repository, ensure that it is a raw URL. 

    A raw URL is defined as the part of the URL following the domain information and includes the query string, if present. For example, in the URL string http://www.contoso.com/articles/recent.aspx, the raw URL is /articles/recent.aspx. 

  • Know what is a complete URL.

    • A typical path for the raw file on Bitbucket looks like:
      /projects/:id/repository/files/:file_path/raw

    • The host address (base URL) begins with:
      https://bitbucket.workspace.com

    • The complete URL, in this example, looks like: 
      https://bitbucket.workspace.com/projects/:id/repository/files/:file_path/raw?ref=master

  • For illustrative purposes, we have used a public Bitbucket repository. Use URLs to add to profiles and in macros as per your requirement and your instance. The process for adding a profile and using it in macros remains the same for other repositories and external sources.

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

For this example, let's use the Html-bobswift macro to illustrate profile creation and usage. The screenshots illustrate where the relevant parameters are to be given. Specify information in the profile window and macro editor as per your requirement in your instance.

Using an absolute URL in a profile

You can create a profile by providing the complete URL in the macro editor.

  1. Select  > Manage apps, either search for HTML for Confluence or scroll to Bob Swift Configuration, and click HTML to view app configuration.

  1. Click Add Profile.

  2. Enter a unique name for the profile in the Profile name text box.

  3. Select URL from the options in Profile type. 

  4. Enter an absolute URL of the location to be accessed in the URL text box. 

  5. Click Save profile to create the profile.

    Image shows how to add a profile with absolute URL.
    HTML Configuration > Profiles > Add profile

To use this profile in a Confluence page:

  1. Add the Html-bobswift macro or edit an existing macro on the page.

  2. Select the newly created profile from the Profile list and then, click Save.

    Image shows how to add a profile to the Html-bobswift macro.
    Add profile to Html-bobswift macro

Using a partial URL in a profile

You can create a profile by providing a partial URL to access the remote location and entering the relative path to the relevant file in the macro editor.

  1. Select  > Manage apps, either search for HTML for Confluence or scroll to Bob Swift Configuration, and click HTML to view app configuration.

  1. Click Add Profile.

  2. Enter a unique name for the profile in the Profile name text box.

  3. Select URL from the options in Profile type. 

  4. Enter the base URL in the URL text box. A base URL is a part of the path that specifies the location that the macro must access.

  5. Click Save profile to create the profile.

To use this profile in a Confluence page:

  1. Add the Html-bobswift macro or edit an existing macro on the page.

  2. Select the newly created profile from the Profile list in the editor.

  3. Enter the relative path of the HTML file in the Location of HTML data parameter. The relative URL is appended to the base URL specified in the profile to create an absolute path to the file to be rendered.

  4. Click Save.

Helpful resources

 


Find answers from the community.

Ask a question to the community.

Log a request with our support team.

Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2024 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.

Unable to render {include} The included page could not be found.