データの移行
Data Transfer API を使用するには、転送を定義し、insert
メソッドを使用して転送を開始します。転送は、データが転送される 1 つ以上のアプリに関して定義され、アプリ固有のパラメータを含めることができます。
移行プロセスの概要は次のとおりです。
- データを転送するアプリケーションを決定します。
- 移行元、移行先のユーザー、およびデータを転送するアプリケーションを指定する
DataTransfer
リソースを定義します。
insert()
メソッドを使用して転送を開始します。
たとえば、次の JSON リクエスト本文では、カレンダーを移行元ユーザー(SOURCE_USER_ID
)から移行先ユーザー(DESTINATION_USER_ID
)に転送します。Directory API の user.get()
メソッドを呼び出し、ユーザーのメールアドレスまたはメール エイリアスを指定することで、各オーナーのユーザー ID を取得できます。
{
"oldOwnerUserId": "SOURCE_USER_ID",
"newOwnerUserId": "DESTINATION_USER_ID",
"applicationDataTransfers": [
{
"applicationId": "435070579839",
"applicationTransferParams": [
{
"key": "RELEASE_RESOURCES",
"value": [
"TRUE"
]
}
]
}
]
}
Data Transfer API には、転送の作成と管理に役立つ追加のメソッドとリソースが含まれているため、次のようなことができます。
- データ転送に使用できるアプリケーションを一覧表示します。
- アプリケーション ID でアプリケーション情報を取得する。
- ソースユーザー、宛先ユーザー、ステータス別にリスト転送。
- リソース ID で転送リクエストを取得します。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2023-09-14 UTC。
[null,null,["最終更新日 2023-09-14 UTC。"],[[["The Data Transfer API allows you to transfer data between users for specific applications, such as calendars, by defining a transfer and initiating it with the `insert` method."],["You need to define a `DataTransfer` resource which identifies the source and destination users, along with the applications and their parameters for data transfer."],["The process involves determining the applications, defining the transfer resource, and initiating the transfer using the `insert()` method."],["You can use the Data Transfer API to list available applications, retrieve application details, and manage transfer requests by listing or getting them based on user or status."]]],["Define a data transfer by specifying source and destination users and the applications involved. This is done by creating a `DataTransfer` resource. Initiate the transfer using the `insert()` method. Retrieve user IDs via the Directory API's `user.get()` method. Additional actions include listing applications, retrieving application information, listing transfers, and retrieving transfer requests. Application-specific parameters can be included. An example is provided of transferring a calendar.\n"]]