To use the Data Transfer API, you define a transfer and then initiate
it using the insert
method. The transfer is defined in terms of one or more
applications whose data will be transferred, and can include
application-specific parameters.
The following is a high-level summary of the transfer process:
- Determine the applications for which you want to transfer data.
- Define a
DataTransfer
resource that specifies the source and destination users and the applications for which to transfer data. - Initiate the transfer by using the
insert()
method.
For example, the following JSON request body transfers a calendar from
the source user (SOURCE_USER_ID
) to the destination user
(DESTINATION_USER_ID
). You can retrieve the user IDs for
each owner by calling the
user.get()
method
of the Directory API and providing their email address or email alias.
{
"oldOwnerUserId": "SOURCE_USER_ID",
"newOwnerUserId": "DESTINATION_USER_ID",
"applicationDataTransfers": [
{
"applicationId": "435070579839",
"applicationTransferParams": [
{
"key": "RELEASE_RESOURCES",
"value": [
"TRUE"
]
}
]
}
]
}
Related topics
The Data Transfer API includes additional methods and resources to help you construct and administer transfers, allowing you to do things like the following:
- List applications available for data transfer.
- Get application information by application ID.
- List transfers by source user, destination user, or status.
- Get a transfer request by resource ID.