Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,369,462
Community Members
 
Community Events
168
Community Groups

How to escape group names in the Confluence Cloud API

Using the following APIs in the confluence Cloud API, I want to grant group permissions.

API: /wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/group/{groupName}

But if the group name contains spaces.  e.g. test group.

The space is a problem and the API URL is invalid.

Example: /wiki/rest/api/~/group/test group

Is there any way to escape this?

There is also a method to specify the group ID, but in order to obtain the group ID, it is necessary to specify the group name in the same way, which requires escaping.

1 answer

1 accepted

0 votes
Answer accepted

Was self resolved.

Hi @青山 明 

It is better not to use group name. It can be changed. 

You should use groupId. You can get group id with https://developer.atlassian.com/cloud/confluence/rest/api-group-group/#api-wiki-rest-api-group-get . Get all groups, find group by name and send groupId.

 

Kind regards

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events