Get page rest path in velocity/groovy/js/whatever

Hi,

I need to inject a groovy/velocity/js/whatever script into a wiki page that will display REST path to that page.
Is $services.rest.url what I need ?
Are there any examples of usage ? I could not find any ?

Are there any examples of usage ? I could not find any ?

I found https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/XWikiRESTfulAPI#HGenerateaRESTURLforaresource.

1 Like

Thank you, sir!
Much appreciated!

So my solution would be
$services.rest.url($doc.documentReference)

will give it a try!

It works!
Thank a ton once again!