データ転送
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Data Transfer API を使用するには、転送を定義してから、insert
メソッドを使用して転送を開始します。転送は、データが転送される 1 つ以上のアプリケーションに関して定義され、アプリケーション固有のパラメータを含めることができます。
移行プロセスの概要は次のとおりです。
- データを転送するアプリケーションを特定します。
- 移行元のユーザーと移行先のユーザー、およびデータを転送するアプリケーションを指定する
DataTransfer
リソースを定義します。
insert()
メソッドを使用して転送を開始します。
たとえば、次の JSON リクエスト本文は、送信元ユーザー(SOURCE_USER_ID
)から宛先ユーザー(DESTINATION_USER_ID
)にカレンダーを転送します。各オーナーのユーザー ID を取得するには、Directory API の user.get()
メソッドを呼び出し、メールアドレスまたはメール エイリアスを指定します。
{
"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 および関連会社の登録商標です。
最終更新日 2025-03-25 UTC。
[null,null,["最終更新日 2025-03-25 UTC。"],[],[],null,["# Transfer data\n\nTo use the Data Transfer API, you define a transfer and then initiate\nit using the `insert` method. The transfer is defined in terms of one or more\napplications whose data will be transferred, and can include\n[application-specific parameters](/workspace/admin/data-transfer/v1/parameters).\n\nThe following is a high-level summary of the transfer process:\n\n1. Determine the applications for which you want to transfer data.\n2. Define a [`DataTransfer` resource](/workspace/admin/data-transfer/reference/rest/v1/transfers) that specifies the source and destination users and the applications for which to transfer data.\n3. Initiate the transfer by using the [`insert()` method](/workspace/admin/data-transfer/reference/rest/v1/transfers/insert).\n\nFor example, the following JSON request body transfers a calendar from\nthe source user (\u003cvar translate=\"no\"\u003eSOURCE_USER_ID\u003c/var\u003e) to the destination user\n(\u003cvar translate=\"no\"\u003eDESTINATION_USER_ID\u003c/var\u003e). You can retrieve the user IDs for\neach owner by calling the\n[`user.get()` method](/workspace/admin/directory/reference/rest/v1/users/get)\nof the Directory API and providing their email address or email alias. \n\n {\n \"oldOwnerUserId\": \"\u003cvar translate=\"no\"\u003eSOURCE_USER_ID\u003c/var\u003e\",\n \"newOwnerUserId\": \"\u003cvar translate=\"no\"\u003eDESTINATION_USER_ID\u003c/var\u003e\",\n \"applicationDataTransfers\": [\n {\n \"applicationId\": \"435070579839\",\n \"applicationTransferParams\": [\n {\n \"key\": \"RELEASE_RESOURCES\",\n \"value\": [\n \"TRUE\"\n ]\n }\n ]\n }\n ]\n }\n\nRelated topics\n--------------\n\nThe Data Transfer API includes additional methods and resources to\nhelp you construct and administer transfers, allowing you to do things like\nthe following:\n\n- [List](/workspace/admin/data-transfer/v1/reference/applications/list) applications available for data transfer.\n- [Get](/workspace/admin/data-transfer/v1/reference/applications/get) application information by application ID.\n- [List](/workspace/admin/data-transfer/v1/reference/transfers/list) transfers by source user, destination user, or status.\n- [Get](/workspace/admin/data-transfer/v1/reference/transfers/get) a transfer request by resource ID."]]