Hello Everyone,
I’m working on a Confluence Forge app and need to retrieve two things for a specific space:
-
List of groups that have permissions on the space
-
Whether Anonymous access is enabled for that space
I’ve checked the available Confluence Cloud REST APIs, including /wiki/rest/api/space/{spaceKey} and /wiki/rest/api/space/{spaceId}/permissions, but I’m not sure if these endpoints provide all the required details or if there’s a better approach in Forge to get this information.
Is there a recommended API or another method in Forge to:
Any guidance or examples would be appreciated.
Thanks and Regards,
Jyoti
Hello @JyotiKumari
Before asking questions, it’s good idea to do some basic searching on the topic using Google and public AI tools, like ChatGPT, as your two questions are asked on a semi-frequent basis.
Start by asking ChatGPT your question. I did, and it gave me a detailed and totally correct answer, with example REST API calls, explanations and caveats.
Have fun!
Hello @sunnyape,
Thanks for your suggestion — I did check with ChatGPT earlier, and it suggested using the endpoint:
/wiki/rest/api/space/<spaceKey>?expand=permissions
I do receive group and anonymous access details when calling this API directly, but when invoking it through a Forge app, I’m getting the following error:
/wiki/rest/api/space/<spaceKey>?expand=permissions 410 (Gone)
(stack trace output follows as in the original)→message: “com.atlassian.confluence.api.service.exceptions.pagesmodes.GoneException: This deprecated endpoint has been removed.”
- statusCode: 410
If there is a different or updated API that works specifically from Forge, could you please share it? Any pointers would be appreciated.
Thanks again!
Thanks and Regards,
Jyoti
When you then read the v1 REST API documentation, did you see if there are any GET Space or GET Space Permission endpoints documented there?
If not, when you then provided that information to ChatGPT about that v1 endpoint being deprecated, then asked it if there was an equivalent v2 endpoint that has replaced it, what answer did it provide to you?
Finally, when you then read the v2 REST API documentation, did you see if it has any GET Space or GET Space Permission endpoints?
Hello @sunnyape ,
Thank you so much, my issue is resolved.
Regards,
Jyoti
1 Like