How to get page id from confluence connect macro parameter of type confluence-content?

I created a static content macro with one parameter of type confluence-content. I would like to get the content id from that parameter, and I noticed that the value of the parameter passed is the page name.

What is the way to get the page id in the macro implementation?

The descriptor of the macro (part of atlassian-connect.json) looks like:

"staticContentMacros": {
        "url": "/pageops/display-id?page={selected-page}",
        "categories": ["navigation"],
        "outputType": "inline",
        "bodyType": "none",
        "name": {
            "value": "Display page id"
        "key": "display-page",
        "parameters": [
                "identifier": "selected-page",
                "name": {
                    "value": "Page"
                "type": "confluence-content"

I am using atlassian-connect-spring-boot for implementation.

You may want to try adding &pageId={} to your url.

I’ve configured this endpoint in my atlassian-connect.json file. I’m not able to get values for any of the variables mentioned in the parameters. I’m using a tomcat server & struts 2.