Refering to :
https://developer.atlassian.com/server/confluence/searching-using-the-v2-search-api/
Using
searchResults.each { thePage ->
pageId = thePage.getIdAsString()
pageName = thePage.getDisplayTitle()
---------
How do I get Page Id - I have tried:
.getId()
.getPageId()
.getEntityId()
.getIdAsString()
.getFieldValue("pageId")
.getFieldValue("Id")
No luck....
There no clue (for me) at https://docs.atlassian.com/atlassian-confluence/6.2.1/com/atlassian/confluence/search/v2/SearchResult.html
I found the answer here:
https://moduscreate.com/blog/confluence-scriptrunner-and-impersonation/
pageId = thePage.handle.id
or
pageId = thePage.getHandle().getId()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.