Wenn Sie Einstellungen für Google Groups aktualisieren und abrufen möchten, authentifizieren Sie jede API-Anfrage und fügen Sie einen API-Schlüssel ein. Weitere Informationen finden Sie unter Anmeldedaten erstellen. Weitere Informationen finden Sie unter Authentifizierung und Autorisierung.
Alle Einstellungen für eine Gruppe aktualisieren
Wenn Sie die Einstellungen einer Gruppe aktualisieren möchten, fügen Sie der folgenden PUT-HTTP-Anfrage den Header Authorization und den API-Schlüssel hinzu:
PUT https://www.googleapis.com/groups/v1/groups/GROUP_ID
Ersetzen Sie GROUP_ID durch die ID der Gruppe. Im folgenden Beispiel werden die Einstellungen der Gruppe „salesgroup@example.com“ aktualisiert:
PUT https://www.googleapis.com/groups/v1/groups/salesgroup@example.com
Der Anfragetext hat das JSON-Format. Im folgenden Beispiel sind alle möglichen Einstellungen aufgeführt:
{
"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"
}
Bei einer erfolgreichen Antwort wird der HTTP-Statuscode 200 zurückgegeben. Zusammen mit dem Statuscode werden in der Antwort die aktualisierten Gruppeneinstellungen zurückgegeben. Weitere Informationen
zu diesen Einstellungen finden Sie in der API
Referenz.
Im folgenden Beispiel sehen Sie die JSON-Antwort:
{
"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"
}
Einige Einstellungen für eine Gruppe aktualisieren
Wenn Sie nur eine Teilmenge dieser Einstellungen aktualisieren möchten, verwenden Sie die PATCH-HTTP-Anfrage für eine teilweise Aktualisierung.
PATCH https://www.googleapis.com/groups/v1/groups/GROUP_ID
Einstellungen für eine Gruppe abrufen
Wenn Sie die Einstellungen einer Gruppe abrufen möchten, fügen Sie der folgenden GET-HTTP-Anfrage den Header Authorization hinzu:
GET https://www.googleapis.com/groups/v1/groups/groupUniqueId
Im folgenden Beispiel werden die Einstellungen der Gruppe „salesgroup@example.com“ abgerufen:
GET https://www.googleapis.com/groups/v1/groups/salesgroup@example.com
Bei einer erfolgreichen Antwort wird der HTTP-Statuscode 200 zurückgegeben. Zusammen mit dem Statuscode werden in der Antwort die Einstellungen der Gruppe „salesgroup@example.com“ zurückgegeben. Weitere Informationen zu diesen Einstellungen finden Sie in der API
Referenz.
Im folgenden Beispiel sehen Sie die JSON-Antwort:
{
"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"
}