Issue Summary
When using the macro-by-ID REST API with Forge macros, top‑level Forge inline macros work as documented: using the ADF local-id as {{
{macroId}}} returns the macro’s parameters.However, the same Forge inline macro returns 404 Not Found when it is nested inside a Forge bodied macro, even though:
* The nested macro exists in the page’s storage as ac:adf-extension / inline-extension
* It has a valid parameters.local-id that matches the {{{macroId}
}} in the request
- The content ID, version, and user permissions are all correct
So currently only top‑level Forge macros can be resolved by local-id via this endpoint; nested Forge macros cannot.
Steps to Reproduce
- Create a Confluence page.
- Add a Forge inline macro directly on the page (top-level).
- Add a Forge bodied macro on the page.
- Inside the bodied macro, insert the same Forge inline macro type.
- Publish the page.
- Retrieve the page storage (e.g. GET /wiki/rest/api/content/{contentId}?expand=body.storage) and collect:
- local-id for the top-level inline macro
- local-id for the bodied macro
- Call:
-
- Top-level:
GET /wiki/rest/api/content/{contentId}/history/0/macro/id/{local-id-top-level} → 200 OK
- Top-level:
-
- Nested:
GET /wiki/rest/api/content/{contentId}/history/0/macro/id/{local-id-nested} → 404 Not Found
- Nested:
Expected Results
Both the top-level and nested Forge inline macros should be resolvable via:
GET /wiki/rest/api/content/{contentId}/history/{version}/macro/id/{local-id}
and return their macro parameters.
Actual Results
- Top-level Forge inline macro: returns parameters as expected.
- Nested Forge inline macro inside a Forge bodied macro: returns 404 Not Found, even though the macro exists in storage and has a valid local-id.
{ "statusCode": 404, "data": { "authorized": true, "valid": true, "errors": [], "successful": true }, "message": "com.atlassian.confluence.api.service.exceptions.api.NotFoundException: No macro found on content id : ContentId{id=11111111} with version: 0 and macroId: xxx-xxx-xxx-xxx-xxx" }
Workaround
Fetch page storage via GET /wiki/rest/api/content/{contentId}?expand=body.storage.
Parse the storage to locate the nested Forge macro’s ac:adf-extension / inline-extension node by parameters.local-id.