-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
1
-
1
-
Summary
A set of new REST API for Space Permissions are introduced in Confluence 9.1, allowing admin to view, set, and revoke permissions for spaces:
However, when sending a GET request to the endpoint below to retrieve a list of permissions granted for users and groups to a specific Space:
<Base_URL>/rest/api/space/{spaceKey}/permissions
The result for users are responded in the JSON format below:
{ "operation": { "targetType": "space", "operationKey": "read" }, "subject": { "type": "group", "name": "confluence-users" }, "spaceKey": "PROJ", "spaceId": 131083 }, { "operation": { "targetType": "space", "operationKey": "read" }, "subject": { "type": "user", "userKey": "4028800d98315ec60198315f45c00000" }, "spaceKey": "PROJ", "spaceId": 131083 },
Despite the result for groups are returned with Group Name, the result for users are in userKey value, which is not easy for the admin to identify "who" the users are.
Suggestion
For user type responses, also include username value so that the REST API responses can also be consumed by admin/user without extra steps.
Why this is Important
As of now, there are extra steps required for admin to run in order to identify the user(s), which can become expensive when the list of useKey is long.
Either via a REST API:
<Base_URL>/rest/api/user?key=4028800d98315ec60198315f45c00000
or a Database Query:
## for a single userKey select username from user_mapping where user_key='4028800d98315ec60198315f45c00000'; ## for multiple userKey select username from user_mapping where user_key in ('4028800d98315ec60198315f45c00000','4028800d98315ec60198315f6caa000a');