Page cover

๐Ÿซ‚Group

Get content restriction status for group

GET /wiki/rest/api/content/{id}/restriction/byOperation/{operation}/group/{group}

Returns whether the specified content restriction applies to a group.

  • This endpoint combines the get content restriction status by group name and group id.

  • If you provide the group id (UUID), the method will create the endpoint with the verb /byGroupId/{groupNameOrID}

  • If you provide the group name, the endpoint uses the verb /group/{groupNameOrID}.

var endpoint strings.Builder
endpoint.WriteString(fmt.Sprintf("wiki/rest/api/content/%v/restriction/byOperation/%v/", contentID, operationKey))

// check if the group id is an uuid type
// if so, it's the group id
groupID, err := uuid.Parse(groupNameOrID)

if err == nil {
	endpoint.WriteString(fmt.Sprintf("byGroupId/%v", groupID.String()))
} else {
	endpoint.WriteString(fmt.Sprintf("group/%v", groupNameOrID))
}

Add group to content restriction

PUT /wiki/rest/api/content/{id}/restriction/byOperation/{operation}/group/{grou[}

Adds a group to a content restriction. That is, grant read or update permission to the group for a piece of content.

Remove group from content restriction

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

Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of content.

Last updated

Was this helpful?