Versions Compared

Key

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

...

Click any of the links to know more:

Anchor
vis_53_tutl_URLs_macros
vis_53_tutl_URLs_macros
Types of URLs used in the Visio Viewer macro

First, it is important to understand how the macro processes URLs. A URL provided in a macro can be:

...

Note
titleVerify these points about the URL!

If a URL is entered in URL to Visio file, without specifying any profile or an application link, ensure that:

  • Only a raw URL is given to access Visio files from a remote location. 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.
  • The URL can access Visio files on public, remote locations. For example, if a URL is given to access a Visio file from a Bitbucket repository, the repository must be public. Thus, user credentials need not be given so that the macro can easily access the specified location and render the relevant file.

If these points are not followed and the macro is unable to either process the given URL or access the given location, relevant errors are displayed.

Anchor
vis_53_tutl_URLs_priority
vis_53_tutl_URLs_priority
Precedence in URL processing

URLs given in the macros are processed in the following order as explained:

Priority givenURL typeDescription
1Application links

If the given URL is linked to a specific application like Bitbucket, the macro does not require any user credentials and renders the specified file. Refer to this article for information about application links.

2ProfilesIf Profile is specified, the macro appends the URL given in URL to Visio file to the URL specified in the profile configuration, and accesses the location to render the required file.
3Simple URLsLastly, if no application links or profiles are given and just an absolute URL is given, the URL is processed as-is and the required file is rendered. Note that the specified URL must point to a public resource; else, it is recommended to create and use a profile to access any private location.

Anchor
vis_53_tutl_URLs_profiles
vis_53_tutl_URLs_profiles
Usage of URLs and profiles in the macro

The correlation between URLs and profiles with respect to the macro can be explained as:

Is Profile given?

(Y - Yes, N - No)

Is Location given?

(Y - Yes, N - No)

Macro behavior
YNAccesses the URL specified in the profile through the pre-configured information.
NYAccesses the URL specified and renders the Visio content as required.
YYAppends the URL mentioned in the URL to Visio file parameter to the URL configured in the profile. Thus, the macro(s) creates an absolute path to the required file. If this path is not valid, a network error message is displayed. To resolve this issue, contact your Confluence administrator for more information.

Anchor
vis_53_tutl_URLs_works
vis_53_tutl_URLs_works
How it all works

Profile configuration

For this example, let’s assume a profile is created as follows:

Note
titlePoints to note in the screenshot:
  • Here, the profile is to be linked with Bitbucket and the base URL of the application is to be entered in the URL field.
  • The macro uses the given User and Password parameters to access the location specified in the URL to Visio file parameter in the macro editor. You can also provide access tokens, if applicable. An access token works almost like a direct link to the specified URL and thus, does not require user credentials. See the profile configuration documentation for more information.

Macro editor settings

After the profile is created, it must be specified in the macro along with the path to the Visio file to be rendered.

  1. Create or edit a page, add the Visio Viewer macro, and edit to open the macro editor.

  2. Select the relevant profile from the Profile drop-down.
  3. Enter a relative path (partial URL) to access the required Visio file in URL to Visio file

    Tip

    Click Preview to verify that the path given with the profile renders the Visio file correctly.


    Note

    As mentioned, the macro appends the relative path in the URL to Visio file with the base URL given in the profile. If this (absolute) path is valid, the specified file is read and the Visio content is displayed, else, a network error is displayed.


  4. Save the macro and publish the page to see the content.

Anchor
vis_53_tutl_URLs_impPoints
vis_53_tutl_URLs_impPoints
Points to remember

  • Only raw URLs must be given and any absolute URL must point to a remote location that is accessible without user credentials. For example, a raw URL that can access a Visio file in a public Bitbucket repository is valid. But to render a Visio file located in a private repository, we recommend using a profile.
  • Profiles are a means to access and retrieve contents from external applications such as Bitbucket. A profile already contains the base URL and the required credentials (user credentials or an access token) to access the relevant application.
  • If a URL that links to another application linked with Confluence is provided, the macro recognizes such URLs and renders the specified Visio file without asking for user credentials. The macro asks for user credentials only for the first time that it tries to connect with the linked application.
  • If a profile is specified in the macro editor, enter a relative path in the URL to Visio file field to access the required file(s). 
  • If an absolute URL is entered in the URL to Visio file field, the macro can directly access the file(s) in the specified path; given that the file is in a public location that does not require user credentials to be accessed.

Anchor
vis_53_tutl_URLs_addlLinks
vis_53_tutl_URLs_addlLinks
Additional links