Beim Aktualisieren und Abrufen von Einstellungen für Google Groups-Gruppen sind für eine API-Anfrage die Authentifizierung und der API-Schlüssel erforderlich, wie unter Anmeldedaten erstellen beschrieben. Weitere Informationen finden Sie unter Informationen zu Authentifizierung und Autorisierung.
Alle Einstellungen für eine Gruppe aktualisieren
Wenn du die Einstellungen einer Gruppe aktualisieren möchtest, füge den Authorization
-Header und den API-Schlüssel in die folgende PUT
-HTTP-Anfrage ein:
PUT https://www.googleapis.com/groups/v1/groups/GROUP_ID
Ersetzen Sie GROUP_ID
durch die ID der Gruppe. Mit dem folgenden Befehl werden beispielsweise die Gruppeneinstellungen für „salesgroup@beispiel.de“ aktualisiert:
PUT https://www.googleapis.com/groups/v1/groups/salesgroup@example.com
Der Anfragetext ist im JSON-Format. Das folgende Beispiel zeigt alle möglichen Einstellungen:
{ "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": "false", "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 findest du in der API-Referenz.
Das folgende Beispiel zeigt 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": "false", "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 einen Teil dieser Einstellungen aktualisieren möchten, verwenden Sie die PATCH
-HTTP-Anfrage für eine Teilaktualisierung.
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 den Authorization
-Header in die folgende GET
-HTTP-Anfrage ein:
GET https://www.googleapis.com/groups/v1/groups/groupUniqueId
Im folgenden Beispiel werden die Gruppeneinstellungen für „vertriebsgruppe@beispiel.de“ 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@beispiel.de“ zurückgegeben. Weitere Informationen zu diesen Einstellungen findest du in der API-Referenz.
Das folgende Beispiel zeigt 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": "false", "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" }