-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
Component/s: Space - Create
-
Severity 3 - Minor
Issue Summary
The Confluence REST API v2 space creation endpoint POST /wiki/api/v2/spaces fails with a 500 Internal Server Error when the roleAssignments parameter is included in the request body. The endpoint accepts the payload without validation errors but crashes silently on the backend, returning no actionable detail in the error response. The behavior affects Confluence Cloud instances running in RBAC (roles-only) mode, which is the required mode for newer instances. The original bug was tracked in CONFCLOUD-83797 but the regression appears to be a distinct issue.
Steps to Reproduce
- Use a Confluence Cloud instance with RBAC enabled (roles-only mode).
- Obtain a valid space role ID by calling GET /wiki/api/v2/space-roles and noting the ID of an Admin-type role.
- Obtain a valid Atlassian account ID of a user who exists on that site.
- Send the following request:
POST https://\{your-site}.atlassian.net/wiki/api/v2/spaces Content-Type: application/json { "key": "TESTKEY", "name": "Test Space", "roleAssignments": [ { "roleId": "<valid-admin-role-id>", "principal": { "principalId": "<valid-user-account-id>", "principalType": "USER" } } ] }
- Observe the response.
Expected Results
The space is created successfully with the specified role assignments applied. The response returns HTTP 200 with the created space object.
Actual Results
The API returns HTTP 500 with the following response body and no actionable detail:
"errors": [{"status": 500,"code": "INTERNAL_SERVER_ERROR","title": "Internal Server Error","detail": null}]
Internal logs show the following error at the time of the request:
org.springframework.web.server.ResponseStatusException: 500 INTERNAL_SERVER_ERROR "Space alias already exists"
Workaround
Create the space without roleAssignments first using POST /wiki/api/v2/spaces, then configure role assignments in a follow-up call using POST /wiki/api/v2/spaces/{id}/role-assignments. Note that this workaround does not support atomic space creation with custom role assignments and requires two separate API calls with the additional complexity of fetching existing assignments before modifying them.
- blocks
-
ECOHELP-100873 Loading...
- was cloned as
-
COMMIT-27777 Loading...