Archive: insert

Requires authorization

Migrates an email message into the archive of the Google group using media upload.

This method supports an /upload URI and accepts uploaded media with the following characteristics:

  • Maximum file size: The maximum mail message size is 16MB. This limit includes the message's meta data headers, body, and any attachments.
  • Accepted Media MIME types: message/rfc822

The Google Groups Migration API’s project limit is 10 queries per second (QPS) per account. The maximum API requests per day is 500,000.
For more information about the RFC822 format, see the RFC822 standard format, and for media upload migration, see the Developer's Guide.

Request

HTTP request

POST https://www.googleapis.com/upload/groups/v1/groups/groupId/archive?uploadType=media

Parameters

Parameter name Value Description
Path parameters
groupId string The email address of the group where the migrated email is archived. This email address is a variable in the request's URL path.
If a group owner changes the group's email address either using the Admin console or the Directory API, you must use the new email address in the groupId variable.
Required query parameters
uploadType string The type of upload request to the /upload URI. Acceptable values are:
  • media - Simple upload. Upload the media data.
  • resumable - Resumable upload. Upload the file in a resumable fashion, using a series of at least two requests.

Authorization

This request requires authorization with the following scope (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/apps.groups.migration

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "groupsmigration#groups",
  "responseCode": string
}
Property name Value Description Notes
kind string The kind of insert resource this is. Value: groupsmigration#groups
responseCode string

An API response’s status code for a migration request accompanied by the HTTP status code.
The responseCode status values include:

AUTHORIZATION FAILURE — The administrator's authorization credentials are invalid. A 401 HTTP status code is returned.

BACKEND FAILURE — The server has a problem or is busy. A 503 HTTP status code is returned. Using an exponential backoff algorithm, wait for a small delay before retrying the failed call.

INVALID MESSAGE FAILURE — The email message is in an invalid format. If a message is rejected as malformed, you'll receive a 400 Bad Request HTTP status code. Invalid format examples include:

  • The message could have missing From, To, and Date fields.
  • An error occurs if a line in the message is not terminated by a CR+LF (that is, "\r\n") style newline.
  • The email message is empty.
  • The migration's target group does not exist or is in 'read-only' mode. For more information about the read-only sharing mode, see the Google Groups for Business sharing options.

SUCCESS — The mail has been successfully archived in the account's group archive. A 200 HTTP status code is returned.

UNSUPPORTED_PARALLEL_OPERATION — The API does not support parallel message insertions into the same group archive. Nor are batch requests supported in this version of the API. But the API supports parallel requests for email insertions into different group archives. A 400 HTTP status code is returned.

Send feedback about...

Groups Migration API
Groups Migration API
Need help? Visit our support page.