Hi,
I’m getting errors in my app when a Confluence group name contains a “/” (forward slash).
I.e. a group called “ateam/intro”.
When I do a call to the Confluence API, with the URI: https://your-domain.atlassian.net/wiki/rest/api/group/{groupName}
i.e. https://your-domain.atlassian.net/wiki/rest/api/group/ateam/intro, I get back a 404 response, as the forward slash in the group name is interpreted as a path.
Am I supposed to use encodeURIComponent() on the group name? Asking because I get the group names from Confluence from another API call in JSON. And I want to avoid errors due to using the wrong encoding. Unfortunately I could not find any information in the documentation.
Atlassian actually also seems to have deprecated the old endpoints that require the use of group names instead of IDs but have not announced this anywhere if I’m not mistaken.
@nmansilla Was/Is there an announcement about deprecation of the get group by name API endpoints? My app relies on this, when will the endpoints be removed?
According to the docs, the /rest/api/group/{groupName} endpoint is deprecated.
I can access the information about my test/group using /rest/api/group/by-name?name=test/group and /rest/api/group/member?name=test/group. Does this solve your problem?
@candid Thank you for your help! This should work.
The reason I tagged @nmansilla is that @sven.schatter and I did not see any announcement of the deprecation, and the bug report about group names with a “/” is still open. If the API is deprecated, I would have expected that the bug report would be closed with a reference to the deprecation.
@marc Correct, group names with special characters can now be fetched since it can be queried by using the query parameters instead of the path parameters.