-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
High
-
Component/s: Page - Attachments (Image, Video, etc.), Page - Content APIs
-
None
-
2
-
Severity 3 - Minor
-
Warranty
Issue Summary
On at least one Confluence Cloud site, the REST API endpoint GET /wiki/api/v2/attachments consistently returns HTTP 500 (INTERNAL_SERVER_ERROR) for valid requests.
The behavior suggests there is at least one attachment record with no associated parent content (an “orphaned attachment”). When the API attempts to process this record during cursor-based pagination, it fails with a server error and the entire request returns 500.
This makes it impossible for apps to reliably list all attachments on the affected site.
Steps to Reproduce
- On an affected Confluence Cloud site, call the global v2 attachments endpoint, for example:
GET https://api.atlassian.com/ex/confluence/\{cloudId}/api/v2/attachments?limit=150&sort=-modified-date - Observe that the API returns HTTP 500 with a generic error response body:
{{Unknown macro: { "errors"}}}
- Reduce the limit parameter progressively (e.g. 150 → 50 → 10 → 1) and retry the same call.
- Even at limit=1, the API continues to return HTTP 500 for the affected site.
Notes:
- The request uses a valid app token with the appropriate Confluence scopes.
- No 401/403 errors are returned.
- The issue has been present from the start of app usage on the affected site.
Expected Results
- The API should successfully return a page of attachments, respecting the requested limit and sort parameters.
- If an attachment record is in an inconsistent state (for example, not associated with any container/content), the API should handle it gracefully (e.g. skip or filter it out) instead of failing the entire request with HTTP 500.
Actual Results
- The API returns HTTP 500 for every request to GET /wiki/api/v2/attachments on the affected site, even with limit=1.
- The response body is a generic “Internal Server Error” with no additional detail:
{{Unknown macro: { "errors"}}}
- This prevents apps from listing attachments and blocks backup/archival use cases for that site.
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available
- mentioned in
-
Page Loading...