Details
-
Suggestion
-
Resolution: Unresolved
-
None
Description
Summary
At present the API /wiki/rest/api/space/KEY?expand=permissions doesnt give results for ALL>>Delete Own, PAGE >>archive and MAIL>>Delete
Steps to Reproduce
- Open a browser tab
- Add a JSON viewer extension from the web store
- Add a set of permissions on the UI end of the space.
- Use this API https://sitename.atlassian.net/wiki/rest/api/space/spacekey?expand=permissions to get the space permissions.
- It should all the permissions parameter i.e all 15 in space permissions.
- Currently, this API will only give 12 operations excluding ALL>>Delete Own, PAGE >>archive and MAIL>>Delete
Browser Consolefunction main() { const getData = async () => { const url = 'https://<SITENAME>.atlassian.net/wiki/rest/api/space/<SPACEKEY>?expand=permissions'; const response = await fetch(url).then((r) => (r.json())); response.permissions.forEach(ele => {console.log(ele.operation)}) }; getData(); } main();
Outcome
{operation: "restrict_content", targetType: "space"} VM1098:5 {operation: "create", targetType: "attachment"} VM1098:5 {operation: "delete", targetType: "page"} VM1098:5 {operation: "export", targetType: "space"} VM1098:5 {operation: "create", targetType: "comment"} VM1098:5 {operation: "create", targetType: "blogpost"} VM1098:5 {operation: "delete", targetType: "comment"} VM1098:5 {operation: "delete", targetType: "blogpost"} VM1098:5 {operation: "delete", targetType: "attachment"} VM1098:5 {operation: "create", targetType: "page"} VM1098:5 {operation: "administer", targetType: "space"} VM1098:5 {operation: "read", targetType: "space"}
It's not showing Archive, Delete Own, and Mail delete permissions
Suggestion
For Users to inspect and see consolidated space permissions, it's good to include all 15 operations when using API.