The Data Transfer API manages the transfer of data from one user to another within a domain. One use case of this transfer is to reallocate application data belonging to a user who has left the organization.
To move the data, first define a
DataTransfer
resource,
then initiate the transfer using the
insert()
method. For example, the following JSON request body transfers a calendar from
the source user to the destination user. 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"
]
}
]
}
]
}
The Data Transfer API includes additional methods and resources to help you construct and administer transfers: