3

Is it possible to get the URI of a Page from the published URL with SDL Web 8? I understand that the new Topology Manager stores the URL for every page and it's possible to know the URL from the backend CME. However, is there a Core Service API method to pass in a URL and get the Page URI?

2
  • Have you looked at the Linking Service on the CD side? It was there since Tridion 2013 and I believe is continued as a micro service in Web8. I'm not specifically sure if you can get the URI, but this might be the API to check out for this info. Apr 7, 2016 at 12:30
  • There is indeed a way to resolve the URL (the UI uses it btw for "view on site" - don't have time to look it up though, in meetings all day.
    – Nuno Linhares
    Apr 7, 2016 at 14:22

1 Answer 1

4

The SDL Web 8 Core Service does provide an API to resolve a Page ID (TCM URI or WebDAV URL) to a "Publish URL" (the absolute URL of that Page on a given Target Type). This is the API that is used by the new "View on Site" feature in the CME (mentioned by Nuno).

However, there is no CM API for the reverse lookup you're asking for. As Nickoli mentioned, such an API is available on the CD side.

For clarity: Topology Manager does not store the URL of every Page in CM. It only stores the Context URLs of the publishing targets, i.e. the first part of an absolute URL which is not stored in CM. The absolute URL for a Page returned by the new GetPublishUrl API in the Core Service is a combination of the context URL of the publishing target obtained from TTM and the context-relative Page URL stored in CM.

1
  • Good point, we do URI to URL resolving, not the other way around. You could find the matching discovery server and then get the linking info via Topology Manager
    – Nuno Linhares
    Apr 7, 2016 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.