{
  "openapi": "3.0.1",
  "info": {
    "title": "Item Transfer API",
    "description": "The Item Transfer API allows SitecoreAI *Organization Admins* and *Organization Owners* to incorporate special files (*sources*) containing migrated content and media data into the database of the *destination* environment.\n\nThe Item Transfer API is primarily used to consume `.raif` files produced by the [Content Transfer API](https://api-docs.sitecore.com/sai/content-transfer). In this primary workflow, source files are read from Azure Blob Storage. \n\nAlternatively, you can use the Item Transfer API to [upload](#operation/uploadBlobSource) small `.raif` files (under 100 MB) from your Sitecore file system, but this is a secondary workflow intended for smaller or ad hoc transfers.\n\nFor large content migrations between environments, use the Content Transfer API to generate `.raif` files via chunked streaming, and then consume them using the Item Transfer API.\n\nEach `.raif` 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\nNote the following:\n- To use this REST API, you must authorize your API requests.\n- You must be an *Organization Admin* or *Organization Owner* to use this API. \n- Unlike the Content Transfer API, the Item Transfer API is used only in your *destination* environment, not in your *source* environment.\n\n# Migrating content\n\nThe Item Transfer API covers the *destination* side of a content migration. Before using this API, complete all steps in the [Content Transfer API](https://api-docs.sitecore.com/sai/content-transfer) to generate `.raif` files in the destination environment.\n\nAlso ensure you have the *Organization Admin* or *Organization Owner* role, and that you have determined your *destination* [base URL](#section/base-url) and created a [JWT](#section/authorization) for the environment. \n\n## Verify the blob is available\n\n[Return the list of available blob sources](#operation/getBlobSources) to confirm that the `.raif` file produced by the Content Transfer API is present and has a `BlobState` of `Uploaded`, which means that the file is ready to consume.\n\n## Start consuming the blob\n\n[Start consuming the source](#operation/startItemsTransfer) into the destination database, passing the `.raif` file name as the `blobName` parameter. Transferred items are immediately available to work with in the destination environment while the system completes the sync to the database in the background. The `location` response header contains a URL. The final path segment of the URL is the transfer ID used in subsequent requests.\n\n## Monitor the transfer\n\nAlthough items are available immediately, poll the transfer status to detect failures. If the background sync fails before completing, items that were not yet synced will become unavailable and the transfer must be retried.\n\n[Poll the transfer status](#operation/getTransfers) until `TransferState` is `Finished`. If `TransferState` is `Failed`, [retry the transfer](#operation/retryFailedItemsTransfer).\n\nIf `BlobState` is `TransferredWithErrors`, this is a terminal state indicating a partial success. To investigate, [retrieve the transfer details](#operation/getTransferById) and review the `ValidationErrors` list.\n\nYou can also [retrieve the details of a specific transfer](#operation/getTransferById) or [view the transfer history](#operation/getTransfersHistory).\n\n## Clean up\n\nAfter the transfer is finished, [delete the blob source](#operation/deleteBlobSource) to remove the `.raif` file from Azure Blob Storage.\n\nThis completes the migration process.\n\n\n# Base URL\nIn the base URL, replace `{host}` with your environment host name of your *destination* environment (where you're migrating data to).\n\nFind the environment host name in SitecoreAI Deploy > **Projects** > your project > **Authoring environments** > your environment > **Details** > **Environment host name**.\n\nExample environment host name: `your-environment.sitecorecloud.io`\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 `403 Forbidden`, 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",
    "version": "3.0",
    "x-metadata": {
      "product": "SitecoreAI"
    },
    "license": {
      "name": "closed source",
      "url": "https://www.sitecore.com"
    }
  },
  "servers": [
    {
      "url": "https://{host}/sitecore/shell/api/v3/ItemsTransfer",
      "variables": {
        "host": {
          "default": "your-environment.sitecorecloud.io",
          "description": "The environment host name."
        }
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Transfers",
      "description": "Operations related to managing and monitoring item transfers."
    },
    {
      "name": "Items",
      "description": "Operations for viewing details of specific transferred items."
    },
    {
      "name": "Sources",
      "description": "Operations for managing file and blob storage sources for transfers."
    },
    {
      "name": "History",
      "description": "Access historical records of item transfers."
    }
  ],
  "paths": {
    "/transfers": {
      "get": {
        "operationId": "getTransfers",
        "summary": "Return the status of consumed and transferred sources",
        "description": "Returns a paged list of currently available active and completed transfers across all Sitecore databases.\nEach entry includes original file name, transfer date, and transfer state.\n",
        "tags": [
          "Transfers"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The page number to retrieve. Defaults to 1 if not specified.",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "example": 1
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "The number of items to return per page. Defaults to 50 if not specified.",
            "schema": {
              "type": "integer",
              "default": 50
            },
            "example": 50
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransfersPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/transfers/{transferId}": {
      "get": {
        "operationId": "getTransferById",
        "summary": "Retrieve the details of a transferred source",
        "description": "Retrieves the detailed metrics about items count, state, errors, and validation warnings for an actively transferring or completed source.\n",
        "tags": [
          "Transfers"
        ],
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the transfer to retrieve. If you don't know this value, first [Start consuming a file or blob source](#operation/startItemsTransfer).",
            "schema": {
              "type": "string"
            },
            "example": "12345678-1234-1234-1234-123456789abc"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferDetailsResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/transfers/databases/{databaseName}/sources": {
      "post": {
        "operationId": "startItemsTransfer",
        "summary": "Start consuming a file or blob source into a database",
        "description": "Starts a content transfer from Azure Blob storage or a local Sitecore file system source into the target database.\n\nPrimary workflow:\n\nUse `blobName` to consume `.raif` files produced by the Content Transfer API from Azure Blob Storage. Example:\n\n`blobName=content-transfer-12345678-1234-1234-1234-123456789abc.raif`\n\nSecondary workflow for small, ad hoc scenarios:\n\nUse `fileName` only when consuming a `.raif` file from the local Sitecore file system. Example:\n\n`fileName=testFile.raif`\n\nProvide either `blobName` or `fileName`, not both.\n\nIn the response, the `location` header contains the full path to the consumed source in the *destination* environment.\n\nThe final path segment following the final slash is the blob name or file name:\n\n`https://my-environment.sitecorecloud.io/sitecore/shell/api/v3/ItemsTransfer/sources/blobs/{BlobNameOrFileName}`\n\nYou will use the blob name or file name in other endpoints. For example, when you [retrieve the details of a transferred source](#operation/getTransferById).\n",
        "tags": [
          "Transfers"
        ],
        "parameters": [
          {
            "name": "databaseName",
            "in": "path",
            "description": "The name of the target database for the transfer.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "master"
          },
          {
            "name": "blobName",
            "in": "query",
            "description": "The primary and recommended parameter. The name of the Azure Blob source to consume. If you provide `blobName`, do not provide `fileName`.",
            "schema": {
              "type": "string"
            },
            "example": "content-transfer-12345678-1234-1234-1234-123456789abc.raif"
          },
          {
            "name": "fileName",
            "in": "query",
            "description": "The parameter for local file system sources. If you provide `fileName`, do not provide `blobName`. If consuming `.raif` files produced by the Content Transfer API, use `blobName` instead.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted. Provides the `location` header to check specific transfer status."
          },
          "400": {
            "description": "Bad Request. Returned if parameters are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/transfers/databases/{databaseName}/sources/{sourceName}": {
      "put": {
        "operationId": "retryFailedItemsTransfer",
        "summary": "Retry the transfer of a failed source for a specific database by re-queuing it for processing",
        "description": "Retries a failed attempt to transfer a source file into a database. Only sources with a transfer state of `Failed` can be retried.\n",
        "tags": [
          "Transfers"
        ],
        "parameters": [
          {
            "name": "databaseName",
            "in": "path",
            "required": true,
            "description": "The name of the target database for the transfer.",
            "schema": {
              "type": "string"
            },
            "example": "master"
          },
          {
            "name": "sourceName",
            "in": "path",
            "required": true,
            "description": "The name of the source to retry. This is the file or blob name returned in the `location` response header when you [started the transfer](#operation/startItemsTransfer).",
            "schema": {
              "type": "string"
            },
            "example": "content-transfer-12345678-1234-1234-1234-123456789abc.raif"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetryResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/transfers/databases/{databaseName}/sources/{sourceName}/items": {
      "get": {
        "operationId": "getTransferredItems",
        "summary": "Return a paginated list of transferred items for a specific database and source",
        "description": "Returns a paginated list of items for an ongoing or completed transfer in the specified database. Provide the required `databaseName` and `sourceName` of an ongoing or completed transfer.\n",
        "tags": [
          "Items"
        ],
        "parameters": [
          {
            "name": "databaseName",
            "description": "The name of the target database for the transfer.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "master"
          },
          {
            "name": "sourceName",
            "in": "path",
            "required": true,
            "description": "The name of the source associated with the transfer (blob name).",
            "schema": {
              "type": "string"
            },
            "example": "content-transfer-12345678-1234-1234-1234-123456789abc.raif"
          },
          {
            "name": "page",
            "in": "query",
            "description": "The page number to retrieve. Defaults to 1 if not specified.",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "example": 1
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "The number of items to return per page. Defaults to 50 if not specified.",
            "schema": {
              "type": "integer",
              "default": 50
            },
            "example": 50
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListItemsResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/transfers/databases/{databaseName}/sources/{sourceName}/items/{itemId}": {
      "get": {
        "operationId": "getTransferredItemDetails",
        "summary": "Retrieve the details of a specific transferred item for a given database and source",
        "description": "Given a particular `itemId` within an active `sourceName` into a `databaseName`, returns all captured metadata and corresponding localized or versioned field information.\n",
        "tags": [
          "Items"
        ],
        "parameters": [
          {
            "name": "databaseName",
            "description": "The name of the target database for the transfer.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "master"
          },
          {
            "name": "sourceName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The name of the source associated with the transfer (blob name).",
            "example": "content-transfer-12345678-1234-1234-1234-123456789abc.raif"
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the item.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "110d559f-dea5-42ea-9c1c-8a5df7e70ef9"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemDetailsResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sources/blobs": {
      "get": {
        "operationId": "getBlobSources",
        "summary": "Return a paginated list of blob sources available in the system",
        "description": "Retrieves the list of available blob sources from Azure Blob Storage that have not yet been deleted or permanently archived.\n",
        "tags": [
          "Sources"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The page number to retrieve. Defaults to 1 if not specified.",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "example": 1
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "The number of items to return per page. Defaults to 50 if not specified.",
            "schema": {
              "type": "integer",
              "default": 50
            },
            "example": 50
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlobSourcesResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sources/blobs/{blobName}": {
      "get": {
        "operationId": "getBlobSourceState",
        "summary": "Retrieve the state of a specific blob source",
        "description": "Returns the current upload and processing state of a specific blob source. Use this to poll the blob's state after uploading.\n",
        "tags": [
          "Sources"
        ],
        "parameters": [
          {
            "name": "blobName",
            "in": "path",
            "required": true,
            "description": "The name of the source associated with the transfer.",
            "schema": {
              "type": "string"
            },
            "example": "content-transfer-12345678-1234-1234-1234-123456789abc.raif"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlobDetailsResult"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "uploadBlobSource",
        "summary": "Upload a blob to the system for processing",
        "description": "Uploads a blob. Note that the file data is pushed using stream content chunks. The file size must be less than 100 MB. Set the `gzip` query parameter to `true` if the stream applies gzip algorithms.\n",
        "tags": [
          "Sources"
        ],
        "parameters": [
          {
            "name": "blobName",
            "in": "path",
            "required": true,
            "description": "The name of the source associated with the transfer.",
            "schema": {
              "type": "string"
            },
            "example": "content-transfer-12345678-1234-1234-1234-123456789abc.raif"
          },
          {
            "name": "gzip",
            "in": "query",
            "description": "Whether the stream applies gzip algorithms.",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "example": true
          }
        ],
        "requestBody": {
          "description": "The raw binary stream of the blob.",
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "application/gzip": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteBlobSource",
        "summary": "Discard a transferred source by deleting its associated file or blob",
        "description": "Permanently removes the artifacts across the blob storage and caches representing the passed source.\n",
        "tags": [
          "Sources"
        ],
        "parameters": [
          {
            "name": "blobName",
            "in": "path",
            "required": true,
            "description": "The name of the source associated with the transfer.",
            "schema": {
              "type": "string"
            },
            "example": "content-transfer-12345678-1234-1234-1234-123456789abc.raif"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sources/files": {
      "get": {
        "operationId": "getFileSources",
        "summary": "List file sources",
        "description": "Returns all file sources natively accessible by SitecoreAI CMS, with optional support for paginated tracking.\n",
        "tags": [
          "Sources"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The page number to retrieve. Defaults to 1 if not specified.",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "example": 1
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "The number of items to return per page. Defaults to 50 if not specified.",
            "schema": {
              "type": "integer",
              "default": 50
            },
            "example": 50
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileSourcesResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/history": {
      "get": {
        "operationId": "getTransfersHistory",
        "summary": "Retrieve a paginated history of consumed sources across all databases",
        "description": "Returns the complete transition timeline of each transfer in descending order by `ConsumeDate`. Useful for inspecting historical runs.\n",
        "tags": [
          "History"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The page number to retrieve. Defaults to 1 if not specified.",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "example": 1
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "The number of items to return per page. Must be greater than 0.",
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1
            },
            "example": 50
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "TransfersPagedResponse": {
        "type": "object",
        "properties": {
          "Page": {
            "type": "integer",
            "description": "The current page number.",
            "example": 1
          },
          "PageSize": {
            "type": "integer",
            "description": "The number of items per page.",
            "example": 50
          },
          "TotalCount": {
            "type": "integer",
            "description": "The total number of items available.",
            "example": 120
          },
          "Transfers": {
            "type": "array",
            "description": "The list of transfers.",
            "items": {
              "$ref": "#/components/schemas/TransferStatusResult"
            }
          }
        }
      },
      "TransferStatusResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Identifier or label for the data source.",
            "example": "consumed.20260707 073702 2312695.7f65fb3a-652d-482a-9cd0-133fa91965a2"
          },
          "SourceName": {
            "type": "string",
            "description": "The name of the source associated with the transfer (blob name).",
            "example": "content-transfer-12345678-1234-1234-1234-123456789abc.raif"
          },
          "DatabaseName": {
            "type": "string",
            "description": "The name of the database associated with the source.",
            "example": "master"
          },
          "ConsumedDate": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the source was processed.",
            "example": "2026-06-21T10:06:51Z"
          },
          "TransferState": {
            "type": "string",
            "description": "The current state of the transfer. `Finished` indicates a successful, completed transfer.",
            "enum": [
              "Unknown",
              "InProgress",
              "Finished",
              "Failed",
              "Queued",
              "Discarded"
            ],
            "example": "Finished"
          },
          "Strategy": {
            "type": "string",
            "description": "The strategy used for merging the source data.",
            "enum": [
              "OverrideExistingItem",
              "KeepExistingItem",
              "OverrideExistingTree"
            ],
            "example": "OverrideExistingItem"
          },
          "Description": {
            "type": "string",
            "description": "The transfer status."
          }
        }
      },
      "TransferDetailsResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TransferStatusResult"
          },
          {
            "type": "object",
            "properties": {
              "TotalItemsCount": {
                "type": "integer",
                "description": "The total number of items in the source.",
                "example": 1
              },
              "TransferredItemsCount": {
                "type": "integer",
                "description": "The number of items written to the destination database. Items skipped due to the merge strategy are not counted.",
                "example": 0
              },
              "ValidationErrors": {
                "type": "array",
                "description": "A list of validation error messages encountered during the transfer. Null if there are no errors.",
                "items": {
                  "type": "string"
                }
              },
              "SourcesCount": {
                "type": "integer"
              }
            }
          }
        ]
      },
      "RetryResult": {
        "type": "object",
        "properties": {
          "DatabaseName": {
            "type": "string",
            "description": "The name of the target database for the transfer.",
            "example": "master"
          },
          "SourceName": {
            "type": "string",
            "description": "The name of the source associated with the transfer (blob name).",
            "example": "content-transfer-12345678-1234-1234-1234-123456789abc.raif"
          }
        }
      },
      "ItemData": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier of the item.",
            "example": "110d559f-dea5-42ea-9c1c-8a5df7e70ef9"
          },
          "Name": {
            "type": "string",
            "description": "The item name.",
            "example": "Home"
          },
          "ParentId": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier of the item's parent.",
            "example": "0de95ae4-41ab-4d01-9eb0-67441b7c2450"
          },
          "TemplateId": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier of the item's template.",
            "example": "76036f5e-cbce-46d1-af0a-4143f9b557aa"
          },
          "MasterId": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier of the branch template used to create the item. If the item was not created from a branch template, this is the null GUID.",
            "example": "00000000-0000-0000-0000-000000000000"
          },
          "IsTransferred": {
            "type": "boolean",
            "description": "Whether the item has been successfully transferred.",
            "example": true
          },
          "TimeStamp": {
            "type": "integer",
            "format": "int64",
            "description": "The item's last-modified timestamp, expressed as .NET ticks (the number of 100-nanosecond intervals since January 1, 0001).",
            "example": 639189385549007900
          },
          "TimeStampDate": {
            "type": "string",
            "format": "date-time",
            "description": "The item's last-modified timestamp, expressed as an ISO 8601 date-time string.",
            "example": "2026-07-06T12:42:34.9007873Z"
          },
          "SourceName": {
            "type": "string",
            "description": "The name of the source associated with the transfer (blob name).",
            "example": "content-transfer-12345678-1234-1234-1234-123456789abc.raif"
          }
        }
      },
      "FieldData": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier of the field.",
            "example": "a60acd61-a6db-4182-8329-c957982cec74"
          },
          "Value": {
            "type": "string",
            "description": "The field value."
          },
          "Language": {
            "type": "string",
            "description": "The language of the item version this field value belongs to. Omitted for shared fields.",
            "example": "en"
          },
          "Version": {
            "type": "integer",
            "description": "The version number of the item version this field value belongs to. Omitted for shared and unversioned fields.",
            "example": 1
          }
        }
      },
      "ItemDetailsResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ItemData"
          },
          {
            "type": "object",
            "properties": {
              "Fields": {
                "type": "array",
                "description": "The field values of the item.",
                "items": {
                  "$ref": "#/components/schemas/FieldData"
                }
              }
            }
          }
        ]
      },
      "ListItemsResult": {
        "type": "object",
        "properties": {
          "Page": {
            "type": "integer",
            "description": "The current page number."
          },
          "PageSize": {
            "type": "integer",
            "description": "The number of items per page."
          },
          "TotalCount": {
            "type": "integer",
            "description": "The total number of items available."
          },
          "Items": {
            "type": "array",
            "description": "The list of transferred items.",
            "items": {
              "$ref": "#/components/schemas/ItemData"
            }
          }
        }
      },
      "BlobSourceInfo": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "The blob name.",
            "example": "content-transfer-12345678-1234-1234-1234-123456789abc.raif"
          },
          "BlobState": {
            "type": "string",
            "description": "The transfer status of the blob. `Uploaded` indicates that the blob is ready to be [consumed](#operation/startItemsTransfer). `TransferredWithErrors` is a terminal state indicating partial success. In this state, retrieve the transfer details to inspect `ValidationErrors`.",
            "enum": [
              "Unknown",
              "Uploading",
              "Uploaded",
              "Initializing",
              "Error",
              "Consumed",
              "Transferred",
              "TransferredWithErrors",
              "Queued",
              "Discarded"
            ]
          }
        }
      },
      "BlobSourcesResult": {
        "type": "object",
        "properties": {
          "Page": {
            "type": "integer",
            "description": "The current page number."
          },
          "PageSize": {
            "type": "integer",
            "description": "The number of items per page."
          },
          "TotalCount": {
            "type": "integer",
            "description": "The total number of items available."
          },
          "Sources": {
            "type": "array",
            "description": "The list of blobs.",
            "items": {
              "$ref": "#/components/schemas/BlobSourceInfo"
            }
          }
        }
      },
      "BlobDetailsResult": {
        "type": "object",
        "properties": {
          "BlobState": {
            "type": "string",
            "description": "The transfer status of the blob.",
            "enum": [
              "Unknown",
              "Uploading",
              "Uploaded",
              "Initializing",
              "Error",
              "Consumed",
              "Transferred",
              "TransferredWithErrors",
              "Queued",
              "Discarded"
            ]
          },
          "Error": {
            "type": "string",
            "description": "Any error related to the blob. Null if there are no errors."
          },
          "SourceName": {
            "type": "string",
            "description": "The name of the source associated with the transfer (blob name).",
            "example": "content-transfer-12345678-1234-1234-1234-123456789abc.raif"
          }
        }
      },
      "FileSourceInfo": {
        "type": "object",
        "properties": {
          "FileName": {
            "type": "string",
            "description": "The file name.",
            "example": "testFile.raif"
          },
          "DatabaseName": {
            "type": "string",
            "description": "The name of the target database for the transfer.",
            "example": "master"
          }
        }
      },
      "FileSourcesResult": {
        "type": "object",
        "properties": {
          "Page": {
            "type": "integer",
            "description": "The current page number."
          },
          "PageSize": {
            "type": "integer",
            "description": "The number of items per page."
          },
          "TotalCount": {
            "type": "integer",
            "description": "The total number of items available."
          },
          "Sources": {
            "type": "array",
            "description": "The list of files and blobs.",
            "items": {
              "$ref": "#/components/schemas/FileSourceInfo"
            }
          }
        }
      },
      "HistoryEvent": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "The transfer state at the time of this event.",
            "enum": [
              "Unknown",
              "InProgress",
              "Finished",
              "Failed",
              "Queued",
              "Discarded"
            ],
            "example": "Finished"
          },
          "Date": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when this state transition occurred.",
            "example": "2026-07-06T12:58:16.9256078Z"
          }
        }
      },
      "TransfersHistory": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "The unique identifier of the transfer.",
            "example": "consumed.20260706 125726 2205656.795faa0a-a59b-4f35-b4f7-a60249beb6ab"
          },
          "SourceName": {
            "type": "string",
            "description": "The name of the source associated with the transfer (blob name).",
            "example": "content-transfer-12345678-1234-1234-1234-123456789abc.raif"
          },
          "ConsumeDate": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the source was consumed into the destination database.",
            "example": "2026-07-06T12:42:34.9007873Z"
          },
          "Strategy": {
            "type": "string",
            "description": "The strategy used for merging the source data.",
            "enum": [
              "OverrideExistingItem",
              "KeepExistingItem",
              "OverrideExistingTree"
            ],
            "example": "OverrideExistingItem"
          },
          "Events": {
            "type": "array",
            "description": "A chronological list of state transition events for the transfer.",
            "items": {
              "$ref": "#/components/schemas/HistoryEvent"
            }
          }
        }
      },
      "HistoryResult": {
        "type": "object",
        "properties": {
          "Page": {
            "type": "integer",
            "description": "The current page number."
          },
          "PageSize": {
            "type": "integer",
            "description": "The number of items per page."
          },
          "TotalCount": {
            "type": "integer",
            "description": "The total number of items available."
          },
          "Sources": {
            "type": "array",
            "description": "The list of files and blobs.",
            "items": {
              "$ref": "#/components/schemas/TransfersHistory"
            }
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "Error": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}