URLs for AccuRev Elements

These URLs will show the content of AccuRev elements. The URL format is:

http://<server:port>/accurev/webgui/browse/<depot>/<stream>/<path>?<parameters>

Examples:

To display the contents of the most recent version of MainApp.html as text:

http://localhost:8080/accurev/webgui/browse/accurev/mars/java/doc/MainApp.html?view=content
If 23 is the element ID of MainApp.html, the following displays the contents of the most recent version of MainApp.html as text:
http://localhost:8080/accurev/webgui/browse/accurev/mars?view=content&eid=23

To display the most recent version of MainApp.html in an OS-associated browser:

http://localhost:8080/accurev/webgui/browse/accurev/mars?view=render&eid=23

Alternative URL format to display the most recent version of MainApp.html in an OS-associated browser:

http://localhost:8080/accurev/webgui/browse/*render*/accurev/mars?eid=23

URL Format Definition

The parts of the URL are described below:

root
The URL used to access AccuRev objects from the AccuRev Web UI:
http://<server:port>/accurev/webgui/browse
depot
The name or numerical ID of a depot.
stream
The name or numerical ID of a stream.
path
Optional. The path to an AccuRev element within a stream.
separator
Required if there are parameters. The question mark character ? is used to separate the parameters from the rest of the URL.
parameters
Parameters identify what element versions will be acted on and how. They are shown as name=value pairs. Multiple parameters are separated by the ampersand character &.
view
Optional. The action to be taken on the specified element. If no view parameter is specified, the view defaults to content.
content
Opens the element in the AccuRev Web UI.
render
Renders the contents of the given element in the browser window if possible. Otherwise calls the appropriate program to display the element based on operating system file type associations.
eid
The element ID.
v
The element’s virtual version, which must be specified in the proper AccuRev format (<stream#>\<version#>, for example, 148\2). If it is not present, the URL retrieves most recent version of the element in the given stream.

Rendering Web Pages That Contain Relative Links

The view=render parameter suffices for many types of content that require external programs to display.

Web pages, which contain references to images, style sheets, and other embedded content, require a different approach. For best results when rendering web pages with embedded content referenced using relative links, remove the view=render parameter and construct the URL starting with http://<server:port>/accurev/webgui/browse/*render*/.

The following example renders the contents of the most recent version of DevPlan20.html in a web browser, including images in the web page that are stored in the plans\images subdirectory:

http://localhost:8080/accurev/webgui/browse/*render*/devplans/OurProduct-2.0/plans/ DevPlan20.html

URL Permanence

Some absolute URLs that reference an AccuRev element or element comparison are constructed so that they always display the same content. These permanent URLs, which contain references to both the element ID (eid) and version, will always return the same element version regardless of any further work done on the element. To construct a permanent URL, both the depot and stream must be specified with numerical IDs (not names), and the URL must include both element ID (eid) and version parameters. The sole exception to this is in the case of an URL referencing a snapshot stream. Since snapshots are immutable, all URLs that specify a snapshot are permanent.