Google Grupları'nın ayarlarını güncellemek ve almak için her API isteğinin kimliğini doğrulayın ve bir API anahtarı ekleyin. Ayrıntılar için Erişim kimlik bilgileri oluşturma başlıklı makaleyi inceleyin. Daha fazla bilgi için Kimlik doğrulama ve yetkilendirme hakkında başlıklı makaleyi inceleyin.
Bir grubun tüm ayarlarını güncelleme
Bir grubun ayarlarını güncellemek için aşağıdaki PUT HTTP isteğine Authorization üstbilgisini ve API anahtarını ekleyin:
PUT https://www.googleapis.com/groups/v1/groups/GROUP_ID
GROUP_ID yerine grubun kimliğini girin. Örneğin, aşağıdaki güncellemeler salesgroup@example.com grubu ayarlarını günceller:
PUT https://www.googleapis.com/groups/v1/groups/salesgroup@example.com
İstek metni JSON biçimindedir. Aşağıdaki örnekte olası tüm ayarlar gösterilmektedir:
{
"kind": "groupsSettings#groups",
"email": "salesgroup@example.com",
"name": "Sales Group",
"description": "This is the sales group",
"whoCanAdd": "ALL_MANAGERS_CAN_ADD",
"whoCanJoin": "INVITED_CAN_JOIN",
"whoCanViewMembership": "ALL_IN_DOMAIN_CAN_VIEW",
"whoCanViewGroup": "ALL_IN_DOMAIN_CAN_VIEW",
"whoCanInvite": "ALL_MANAGERS_CAN_INVITE",
"allowExternalMembers": "true",
"whoCanAddExternalMembers": "ONLY_ADMINS_CAN_ADD_EXTERNAL_MEMBERS",
"whoCanPostMessage": "ALL_IN_DOMAIN_CAN_POST",
"allowWebPosting": "true",
"primaryLanguage": "en",
"maxMessageBytes": 10240,
"isArchived": "true",
"archiveOnly": "false",
"messageModerationLevel": "MODERATE_NONE",
"spamModerationLevel": "ALLOW",
"replyTo": "REPLY_TO_IGNORE",
"customReplyTo": "sales@example.com",
"includeCustomFooter": "true",
"customFooterText": "This messages is from the Sales Group at example.com",
"sendMessageDenyNotification": "true",
"defaultMessageDenyNotificationText": "Your Message has been denied.",
"showInGroupDirectory": "false",
"allowGoogleCommunication": "false",
"membersCanPostAsTheGroup": "false",
"messageDisplayFont": "DEFAULT_FONT",
"includeInGlobalAddressList": "false",
"whoCanLeaveGroup": "ALL_MEMBERS_CAN_LEAVE",
"whoCanContactOwner": "ALL_IN_DOMAIN_CAN_CONTACT",
"whoCanAddReferences": "ALL_MEMBERS",
"whoCanAssignTopics": "NONE",
"whoCanUnassignTopic": "NONE",
"whoCanTakeTopics": "NONE",
"whoCanMarkDuplicate": "NONE",
"whoCanMarkNoResponseNeeded": "NONE",
"whoCanMarkFavoriteReplyOnAnyTopic": "NONE",
"whoCanMarkFavoriteReplyOnOwnTopic": "NONE",
"whoCanUnmarkFavoriteReplyOnAnyTopic": "NONE",
"whoCanEnterFreeFormTags": "NONE",
"whoCanModifyTagsAndCategories": "NONE",
"favoriteRepliesOnTop": "false",
"whoCanApproveMembers": "ALL_MANAGERS_CAN_APPROVE",
"whoCanBanUsers": "OWNERS_AND_MANAGERS",
"whoCanModifyMembers": "OWNERS_AND_MANAGERS",
"whoCanApproveMessages": "OWNERS_ONLY",
"whoCanDeleteAnyPost": "OWNERS_AND_MANAGERS",
"whoCanDeleteTopics": "OWNERS_AND_MANAGERS",
"whoCanLockTopics": "OWNERS_AND_MANAGERS",
"whoCanMoveTopicsIn": "NONE",
"whoCanMoveTopicsOut": "NONE",
"whoCanPostAnnouncements": "NONE",
"whoCanHideAbuse": "OWNERS_AND_MANAGERS",
"whoCanMakeTopicsSticky": "OWNERS_AND_MANAGERS",
"whoCanModerateMembers": "OWNERS_AND_MANAGERS",
"whoCanModerateContent": "OWNERS_ONLY",
"whoCanAssistContent": "ALL_MEMBERS",
"customRolesEnabledForSettingsToBeMerged": "false",
"enableCollaborativeInbox": "false",
"whoCanDiscoverGroup": "ALL_IN_DOMAIN_CAN_DISCOVER",
"defaultSender": "DEFAULT_SELF"
}
Başarılı bir yanıt, 200 HTTP durum kodu döndürür. Yanıt, durum koduyla birlikte güncellenen grup ayarlarını döndürür. Bu ayarlar hakkında daha fazla bilgi edinmek için API referansını inceleyin.
Aşağıdaki örnekte JSON yanıtı gösterilmektedir:
{
"kind": "groupsSettings#groups",
"email": "salesgroup@example.com",
"name": "Sales Group",
"description": "This is the sales group",
"whoCanAdd": "ALL_MANAGERS_CAN_ADD",
"whoCanJoin": "INVITED_CAN_JOIN",
"whoCanViewMembership": "ALL_IN_DOMAIN_CAN_VIEW",
"whoCanViewGroup": "ALL_IN_DOMAIN_CAN_VIEW",
"whoCanInvite": "ALL_MANAGERS_CAN_INVITE",
"allowExternalMembers": "true",
"whoCanAddExternalMembers": "ONLY_ADMINS_CAN_ADD_EXTERNAL_MEMBERS",
"whoCanPostMessage": "ALL_IN_DOMAIN_CAN_POST",
"allowWebPosting": "true",
"primaryLanguage": "en",
"maxMessageBytes": 10240,
"isArchived": "true",
"archiveOnly": "false",
"messageModerationLevel": "MODERATE_NONE",
"spamModerationLevel": "ALLOW",
"replyTo": "REPLY_TO_IGNORE",
"customReplyTo": "sales@example.com",
"includeCustomFooter": "true",
"customFooterText": "This messages is from the Sales Group at example.com",
"sendMessageDenyNotification": "true",
"defaultMessageDenyNotificationText": "Your Message has been denied.",
"showInGroupDirectory": "false",
"allowGoogleCommunication": "false",
"membersCanPostAsTheGroup": "false",
"messageDisplayFont": "DEFAULT_FONT",
"includeInGlobalAddressList": "false",
"whoCanLeaveGroup": "ALL_MEMBERS_CAN_LEAVE",
"whoCanContactOwner": "ALL_IN_DOMAIN_CAN_CONTACT",
"whoCanAddReferences": "ALL_MEMBERS",
"whoCanAssignTopics": "NONE",
"whoCanUnassignTopic": "NONE",
"whoCanTakeTopics": "NONE",
"whoCanMarkDuplicate": "NONE",
"whoCanMarkNoResponseNeeded": "NONE",
"whoCanMarkFavoriteReplyOnAnyTopic": "NONE",
"whoCanMarkFavoriteReplyOnOwnTopic": "NONE",
"whoCanUnmarkFavoriteReplyOnAnyTopic": "NONE",
"whoCanEnterFreeFormTags": "NONE",
"whoCanModifyTagsAndCategories": "NONE",
"favoriteRepliesOnTop": "false",
"whoCanApproveMembers": "ALL_MANAGERS_CAN_APPROVE",
"whoCanBanUsers": "OWNERS_AND_MANAGERS",
"whoCanModifyMembers": "OWNERS_AND_MANAGERS",
"whoCanApproveMessages": "OWNERS_ONLY",
"whoCanDeleteAnyPost": "OWNERS_AND_MANAGERS",
"whoCanDeleteTopics": "OWNERS_AND_MANAGERS",
"whoCanLockTopics": "OWNERS_AND_MANAGERS",
"whoCanMoveTopicsIn": "NONE",
"whoCanMoveTopicsOut": "NONE",
"whoCanPostAnnouncements": "NONE",
"whoCanHideAbuse": "OWNERS_AND_MANAGERS",
"whoCanMakeTopicsSticky": "OWNERS_AND_MANAGERS",
"whoCanModerateMembers": "OWNERS_AND_MANAGERS",
"whoCanModerateContent": "OWNERS_ONLY",
"whoCanAssistContent": "ALL_MEMBERS",
"customRolesEnabledForSettingsToBeMerged": "false",
"enableCollaborativeInbox": "false",
"whoCanDiscoverGroup": "ALL_IN_DOMAIN_CAN_DISCOVER",
"defaultSender": "DEFAULT_SELF"
}
Bir grubun bazı ayarlarını güncelleme
Bu ayarların bir alt kümesini güncellemek istiyorsanız kısmi güncelleme için PATCH HTTP isteğini kullanın.
PATCH https://www.googleapis.com/groups/v1/groups/GROUP_ID
Bir grubun ayarlarını alma
Bir grubun ayarlarını almak için aşağıdaki GET HTTP isteğine Authorization üstbilgisini ekleyin:
GET https://www.googleapis.com/groups/v1/groups/groupUniqueId
Aşağıdaki örnekte salesgroup@example.com grubu ayarları alınır:
GET https://www.googleapis.com/groups/v1/groups/salesgroup@example.com
Başarılı bir yanıt, 200 HTTP durum kodu döndürür. Yanıt, durum koduyla birlikte salesgroup@example.com grubunun ayarlarını döndürür. Bu ayarlar hakkında daha fazla bilgi edinmek için API referansını inceleyin.
Aşağıdaki örnekte JSON yanıtı gösterilmektedir:
{
"kind": "groupsSettings#groups",
"email": "salesgroup@example.com",
"name": "Sales Group",
"description": "This is the sales group",
"whoCanAdd": "ALL_MANAGERS_CAN_ADD",
"whoCanJoin": "INVITED_CAN_JOIN",
"whoCanViewMembership": "ALL_IN_DOMAIN_CAN_VIEW",
"whoCanViewGroup": "ALL_IN_DOMAIN_CAN_VIEW",
"whoCanInvite": "ALL_MANAGERS_CAN_INVITE",
"allowExternalMembers": "true",
"whoCanAddExternalMembers": "ONLY_ADMINS_CAN_ADD_EXTERNAL_MEMBERS",
"whoCanPostMessage": "ALL_IN_DOMAIN_CAN_POST",
"allowWebPosting": "true",
"primaryLanguage": "en",
"maxMessageBytes": 10240,
"isArchived": "true",
"archiveOnly": "false",
"messageModerationLevel": "MODERATE_NONE",
"spamModerationLevel": "ALLOW",
"replyTo": "REPLY_TO_IGNORE",
"customReplyTo": "sales@example.com",
"includeCustomFooter": "true",
"customFooterText": "This messages is from the Sales Group at example.com",
"sendMessageDenyNotification": "true",
"defaultMessageDenyNotificationText": "Your Message has been denied.",
"showInGroupDirectory": "false",
"allowGoogleCommunication": "false",
"membersCanPostAsTheGroup": "false",
"messageDisplayFont": "DEFAULT_FONT",
"includeInGlobalAddressList": "false",
"whoCanLeaveGroup": "ALL_MEMBERS_CAN_LEAVE",
"whoCanContactOwner": "ALL_IN_DOMAIN_CAN_CONTACT",
"whoCanAddReferences": "ALL_MEMBERS",
"whoCanAssignTopics": "NONE",
"whoCanUnassignTopic": "NONE",
"whoCanTakeTopics": "NONE",
"whoCanMarkDuplicate": "NONE",
"whoCanMarkNoResponseNeeded": "NONE",
"whoCanMarkFavoriteReplyOnAnyTopic": "NONE",
"whoCanMarkFavoriteReplyOnOwnTopic": "NONE",
"whoCanUnmarkFavoriteReplyOnAnyTopic": "NONE",
"whoCanEnterFreeFormTags": "NONE",
"whoCanModifyTagsAndCategories": "NONE",
"favoriteRepliesOnTop": "false",
"whoCanApproveMembers": "ALL_MANAGERS_CAN_APPROVE",
"whoCanBanUsers": "OWNERS_AND_MANAGERS",
"whoCanModifyMembers": "OWNERS_AND_MANAGERS",
"whoCanApproveMessages": "OWNERS_ONLY",
"whoCanDeleteAnyPost": "OWNERS_AND_MANAGERS",
"whoCanDeleteTopics": "OWNERS_AND_MANAGERS",
"whoCanLockTopics": "OWNERS_AND_MANAGERS",
"whoCanMoveTopicsIn": "NONE",
"whoCanMoveTopicsOut": "NONE",
"whoCanPostAnnouncements": "NONE",
"whoCanHideAbuse": "OWNERS_AND_MANAGERS",
"whoCanMakeTopicsSticky": "OWNERS_AND_MANAGERS",
"whoCanModerateMembers": "OWNERS_AND_MANAGERS",
"whoCanModerateContent": "OWNERS_ONLY",
"whoCanAssistContent": "ALL_MEMBERS",
"customRolesEnabledForSettingsToBeMerged": "false",
"enableCollaborativeInbox": "false",
"whoCanDiscoverGroup": "ALL_IN_DOMAIN_CAN_DISCOVER",
"defaultSender": "DEFAULT_SELF"
}