{"templateId":"openapi_docs","sharedDataIds":{"openAPIDocsStore":"oas-sai/item-transfer/index.yaml","sidebar":"sidebar-sidebar.yaml__sai_item-transfer","current-catalog-info":"current-catalog-info-/sai/item-transfer"},"props":{"definitionId":"sai/item-transfer/index.yaml","dynamicMarkdocComponents":[],"baseSlug":"/sai/item-transfer","seo":{"title":"Item 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":"Item Transfer API","description":"The Item Transfer API allows administrators to incorporate special files (*sources*) containing migrated content and media data into the database of the destination environment. Sources can come from the file system or Azure Blob Storage.\n\nThe Item Transfer API consumes `.raif` files created using the [Content Transfer API](https://api-docs.sitecore.com/sai/content-transfer). Each file represents a single data tree from the source environment, and each tree is either a single item or an item plus all of its descendants.\n\nYou can also [upload](#operation/startItemsTransfer) small `.raif` files (less than 50 MB) directly to blob storage, but for large content migrations between environments, use the **Content Transfer API**, which uses chunked streaming to produce `.raif` files in the destination environment automatically.\n\nYou can also use this API to explore and validate sources, fetch details about a specific source, examine a history of consumed sources, retry failed sources, and discard sources you no longer need.\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\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/item-transfer","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}