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 25MB. This limit includes the message's metadata headers, body, and any attachments.
- Accepted Media MIME types:
message/rfc822
The project limit for the Groups Migration API 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 .
Request
HTTP request
POST https://www.googleapis.com/upload/groups/v1/groups/ groupId /archive?uploadType=media
Parameters
groupId
string
groupId
variable.uploadType
string
The type of upload request to the /upload
URI with one of the following
values:
-
media
- Simple upload that uploads the media data. -
resumable
- Resumable upload that uploads the file in a resumable fashion, using a series of at least two requests.
Authorization
This request requires authorization with the following scope:
Scope |
---|
https://www.googleapis.com/auth/apps.groups.migration
|
For more information, see the authentication and authorization page.
Request body
Don't 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 }
kind
string
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 the following:
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 receive a 400 Bad Request
HTTP status code. Invalid format
examples include the following:
- The message could have missing
From
,To
, andDate
fields. - An error occurs if a line in the message
isn't
terminated by a CR+LF (that is,
"\r\n"
) style newline. - The email message is empty.
- The migration's target group doesn't 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 Groups Migration API doesn't
support parallel message insertions into the same group archive. Also, the
Groups Migration API doesn't support batch requests. But the
Groups Migration API supports parallel requests for email insertions into different
group archives. A 400
HTTP status code is returned.