My Oracle Support Banner

How to Convert PrettyURL Obtained from REST into a Real URL in Spaces? (Doc ID 1526610.1)

Last updated on FEBRUARY 01, 2022

Applies to:

Oracle WebCenter Portal - Version to [Release 11g]
Information in this document applies to any platform.


We cannot build using REST api from javascript a link added to a navigation model using the link element.

What we want to achieve is to have a list of navigation models defined in WebCenter Spaces, then using Navigation REST API we want to read their structure and build dynamic JS menus. The problem we have is that the PATH information for links added to the navigation models are missing in the REST responses, we only get the prettyURLs.

We have the following case:

Create a new space
1. Create a new Space (TestSpace1)

In the TestSpace1 create a new navigation model
1. Navigate to the TestSpace1 -> Resources -> Navigations and create a new navigation model called TestSpace1Nav
2. Obtain the metadata file information, selecting the About button
3. Edit the navigation model and add 2 Links
3.1 A link to external page
3.2 A link to a space page
4. Save the navigation model by clicking on OK (step6.png)

Using the Navigation REST API
1. Make a call to rest resource index (<HOST>/rest/api/resourceIndex) and obtain the link for the navigations
2. Call the navigations REST endpoint obtained above and find the navigation model (by the id obtained at point 2) in the list of navigations
3. Call the root resources REST link for the navigation model

Notice there is no information indicating the Paths defined at steps 3.1 and 3.2, but only the prettyUrls.

Is this a bug, or it was not intended to expose the real URLs behind links? Maybe is there any possibility to invoke the links using the prettyURLs?

We know that for the default navigation model defined on webcenter, we could invoke links like "https://<HOST>/webcenter/faces/", which would actually work, but only for the default navigation model, but it does not help us, because we have many navigation models.

In other words, how can a prettyURL be converted to a real URL that can be called to access the navigation element?


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.