{"templateId":"openapi_docs","sharedDataIds":{"openAPIDocsStore":"oas-sai/content-transfer/index.yaml","sidebar":"sidebar-sidebar.yaml__sai_content-transfer","current-catalog-info":"current-catalog-info-/sai/content-transfer"},"props":{"definitionId":"sai/content-transfer/index.yaml","dynamicMarkdocComponents":[],"baseSlug":"/sai/content-transfer","seo":{"title":"Content Transfer API","siteUrl":"https://api-docs.sitecore.com","image":"/assets/favicon.19b81ef710429ff2169b164acdb39de23d65db39632db445eeef84aa38980a00.db81178d.svg","keywords":"documentation, api","lang":"en-US","jsonLd":{"@context":"https://schema.org","@type":"Website","url":"http://api-docs.sitecore.com","name":"Sitecore APIs Documentation"},"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"itemId":"","disableAutoScroll":true,"metadata":{"type":"openapi","title":"Content Transfer API","description":"The Content Transfer REST API allows SitecoreAI administrators to initiate, monitor, and finalize content transfer operations for migrating content data from one SitecoreAI environment (the *source*) to another (the *destination*). This enables efficient transfer of data between environments using chunked data streaming with encryption and compression support.\n\nEach transfer operation includes at least one set of chunked data, where each chunk set represents a single data tree that was nominated for transfer. When an operation is complete, each of its chunk sets will be represented by a `.raif` file in the destination environment. To finish integrating the transferred data, use the separate [Item Transfer API](https://api-docs.sitecore.com/sai/item-transfer) to have the destination database consume the `.raif` files.\n\nThe key stages of a content transfer operation are as follows:\n- **Create the transfer operation** - specify the content you want to transfer and apply optional configuration parameters, creating the initial operation. Depending on how much data is being transferred, this will create one or more sets of chunked data.\n- **Monitor the operation** - view key information about an existing transfer operation, including its current status and metadata for each of its chunk sets (such as the ID and how many chunks it contains).\n- **Transfer data chunks** - for each chunk of data in a particular chunk set, copy the chunk data from the source environment to a corresponding location in the destination environment. This stage involves calling two endpoints as a pair.\n- **Complete a chunk set transfer** - when all chunks in a particular set have been transferred, mark that set as complete and generate a `.raif` file in the destination environment.\n- **Cleanup** - when all chunk sets in a transfer operation are complete, delete the transfer operation from the source environment and clean up all associated resources.\n\n# Base URL\nIn the base URL, replace `{host}` with your environment host name. Find the value in SitecoreAI Deploy > **Projects** > your project > **Authoring environments** > your environment > **Details** > **Environment host name**. \n\n# Authorization\nTo authorize your requests, use environment automation client credentials and generate a JSON Web Token (JWT).\n\nNote: To create client credentials, you must be an [Organization Admin or Organization Owner](https://doc.sitecore.com/portal/en/developers/sitecore-cloud-portal/roles.html).\n\n## Create an automation client\n1. In the Sitecore Cloud Portal, open SitecoreAI Deploy.\n2. Click **Credentials** > **Environment** > **Create credentials** > **Automation**.\n3. Fill out the automation client details, then click **Create**.\n4. Copy the client ID and the client secret because you won't be able to view them again in SitecoreAI Deploy. You'll use them to request a JWT.\n\n## Request a JWT\n\nRun the following cURL command to request a JWT. Replace the placeholder values with your client ID and client secret.\n```curl\n  curl -X POST 'https://auth.sitecorecloud.io/oauth/token' \\\n  --header 'Content-Type: application/x-www-form-urlencoded' \\\n  --data-urlencode 'client_id={YOUR_CLIENT_ID}' \\\n  --data-urlencode 'client_secret={YOUR_CLIENT_SECRET}' \\\n  --data-urlencode 'grant_type=client_credentials' \\\n  --data-urlencode 'audience=https://api.sitecorecloud.io'\n```\n\nThe JWT expires in 24 hours. If your requests unexpectedly return a response with status `401 Unauthorized`, request a new JWT by repeating this `POST` request.\n\nWe recommend that you cache the JWT for 24 hours to avoid repeating this `POST` request while the JWT is still valid.\n\n## Include the JWT in the request header\n\nYou can now start making REST API requests. You must include the JWT in the request header of every request. For example:\n```curl\n  curl -X GET '{YOUR_BASE_URL}/...' \\\n  -H 'Authorization: Bearer {YOUR_JWT}' \\\n  -H 'Accept: application/json'\n```\n","product":"SitecoreAI"},"compilationErrors":[],"markdown":{"partials":{},"variables":{"rbac":{"teams":["anonymous"]},"user":{},"remoteAddr":{"hostname":"api-docs.sitecore.com","port":4000,"ipAddress":"216.73.216.62"},"lang":"default_locale","env":{"PUBLIC_REDOCLY_BRANCH_NAME":"master"}}},"pagePropGetterError":{"message":"","name":""}},"slug":"/sai/content-transfer","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}