How to navigate with in the confluence cloud instance with web-item

Hi Community,

I added a web-item and it needs to navigate to the add-on configuration within the confluence cloud instance. If I give an absolute URL of the config it is working, but not with the relative config URL. Is there any way to get a confluence cloud instance base URL in the descriptor file?
Here is the app descriptor config I tried.

"webSections": [
            {
              "location": "system.admin",
              "weight": 50,
              "name": {
                "value": "SAMPLE CONFIGURATION"
              },
              "key": "sample-configuration"
            }
        ],
        "webItems": [
            {
              "location": "system.admin/sample-configuration",
              "weight": 200,
              "styleClasses": [
                "webitem",
                "system-present-webitem"
              ],
              "url": "/plugins/servlet/ac/<app-key>/global-configuration", // It is not working
              //"url": "<confluence_baseurl>/plugins/servlet/ac/<app-key>/global-configuration", //It is working
              "context": "addon",
              "target": {
                "type": "page"
              },
              "tooltip": {
                "value": "Example tooltip"
              },
              "name": {
                "value": "Addon name"
              },
              "key": "addon-webitem"
            }
        ],

Thanks in Advance

@rambabu.patina, instead of "context": "addon", you should specify "context": "product".

1 Like

Hi @rambabu.patina ,
make sure you have a line like:

  "baseUrl": "{{localBaseUrl}}",

in your descriptor file (if you are using ACE).

Thanks @epehrson for your swift response, It worked like a charm.

1 Like