According to this Launch macro via button you have a macro that renders the above html which above html is a form that pokes the
http://tgd-agile-4025:1990/confluence/rest/jirarequest/1.0/create/initiative.
In the endpoint of the create/initiative you want to fetch some ContentEntityObject (i am assuming the one from which you call the rest) you mentioned in the question. Am i right?
Assuming I am right, add to your macro’s execute function just before the return:
contextMap.put("pageId",conversionContext.getEntity().getIdAsString());
In the form append the pageId as follows:
<form id="createinitiative" class="aui" action="http://tgd-agile-4025:1990/confluence/rest/jirarequest/1.0/create/initiative?pageId=$pageId" method="GET">
In your rest class now add a @QueryParam("pageId") String pageId in the create method.
You got the pageId. Inject the PageManager in the REST class and fetch the object with one of the PageManager’s methods.
Generally talking, in the REST context when you need to create something you use the POST and not GET. Grab an idea here
If I assumed right, but you still can’t make it work, post some of your code along with errors