Upload Result
immichpy.client.types.UploadResult
pydantic-model
Bases: BaseModel
The result of an upload operation containing all uploaded, rejected, and failed entries.
Show JSON schema:
{
"$defs": {
"AssetMediaResponseDto": {
"description": "AssetMediaResponseDto",
"properties": {
"id": {
"description": "Asset media ID",
"title": "Id",
"type": "string"
},
"status": {
"$ref": "#/$defs/AssetMediaStatus"
}
},
"required": [
"id",
"status"
],
"title": "AssetMediaResponseDto",
"type": "object"
},
"AssetMediaStatus": {
"description": "Upload status",
"enum": [
"created",
"replaced",
"duplicate"
],
"title": "AssetMediaStatus",
"type": "string"
},
"FailedEntry": {
"description": "Represents a file that failed to upload.",
"properties": {
"filepath": {
"description": "The path to the local file that failed to upload.",
"format": "path",
"title": "Filepath",
"type": "string"
},
"error": {
"description": "The error message from the server.",
"title": "Error",
"type": "string"
}
},
"required": [
"filepath",
"error"
],
"title": "FailedEntry",
"type": "object"
},
"RejectedEntry": {
"description": "Represents a file that was rejected during upload (check).",
"properties": {
"filepath": {
"description": "The path to the local file that was rejected.",
"format": "path",
"title": "Filepath",
"type": "string"
},
"asset_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the asset. Set if reason is 'duplicate'.",
"title": "Asset Id"
},
"reason": {
"anyOf": [
{
"enum": [
"duplicate",
"unsupported_format"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The reason for the rejection.",
"title": "Reason"
}
},
"required": [
"filepath"
],
"title": "RejectedEntry",
"type": "object"
},
"UploadStats": {
"properties": {
"total": {
"description": "The total number of files to upload.",
"title": "Total",
"type": "integer"
},
"uploaded": {
"description": "The number of files that were uploaded.",
"title": "Uploaded",
"type": "integer"
},
"rejected": {
"description": "The number of files that were rejected.",
"title": "Rejected",
"type": "integer"
},
"failed": {
"description": "The number of files that failed to upload.",
"title": "Failed",
"type": "integer"
}
},
"required": [
"total",
"uploaded",
"rejected",
"failed"
],
"title": "UploadStats",
"type": "object"
},
"UploadedEntry": {
"description": "Represents a successfully uploaded file.",
"properties": {
"asset": {
"$ref": "#/$defs/AssetMediaResponseDto",
"description": "The asset that was uploaded."
},
"filepath": {
"description": "The path to the local file that was uploaded.",
"format": "path",
"title": "Filepath",
"type": "string"
}
},
"required": [
"asset",
"filepath"
],
"title": "UploadedEntry",
"type": "object"
}
},
"description": "The result of an upload operation containing all uploaded, rejected, and failed entries.",
"properties": {
"uploaded": {
"description": "The assets that were uploaded.",
"items": {
"$ref": "#/$defs/UploadedEntry"
},
"title": "Uploaded",
"type": "array"
},
"rejected": {
"description": "The files that were rejected.",
"items": {
"$ref": "#/$defs/RejectedEntry"
},
"title": "Rejected",
"type": "array"
},
"failed": {
"description": "The files that failed to upload.",
"items": {
"$ref": "#/$defs/FailedEntry"
},
"title": "Failed",
"type": "array"
},
"stats": {
"$ref": "#/$defs/UploadStats",
"description": "The statistics of the upload."
}
},
"required": [
"uploaded",
"rejected",
"failed",
"stats"
],
"title": "UploadResult",
"type": "object"
}
Fields:
-
uploaded(list[UploadedEntry]) -
rejected(list[RejectedEntry]) -
failed(list[FailedEntry]) -
stats(UploadStats)
failed
pydantic-field
failed: list[FailedEntry]
The files that failed to upload.
rejected
pydantic-field
rejected: list[RejectedEntry]
The files that were rejected.
stats
pydantic-field
stats: UploadStats
The statistics of the upload.
uploaded
pydantic-field
uploaded: list[UploadedEntry]
The assets that were uploaded.
immichpy.client.types.UploadStats
pydantic-model
Bases: BaseModel
Show JSON schema:
{
"properties": {
"total": {
"description": "The total number of files to upload.",
"title": "Total",
"type": "integer"
},
"uploaded": {
"description": "The number of files that were uploaded.",
"title": "Uploaded",
"type": "integer"
},
"rejected": {
"description": "The number of files that were rejected.",
"title": "Rejected",
"type": "integer"
},
"failed": {
"description": "The number of files that failed to upload.",
"title": "Failed",
"type": "integer"
}
},
"required": [
"total",
"uploaded",
"rejected",
"failed"
],
"title": "UploadStats",
"type": "object"
}
Fields:
failed
pydantic-field
failed: int
The number of files that failed to upload.
rejected
pydantic-field
rejected: int
The number of files that were rejected.
total
pydantic-field
total: int
The total number of files to upload.
uploaded
pydantic-field
uploaded: int
The number of files that were uploaded.
immichpy.client.types.RejectedEntry
pydantic-model
Bases: BaseModel
Represents a file that was rejected during upload (check).
Show JSON schema:
{
"description": "Represents a file that was rejected during upload (check).",
"properties": {
"filepath": {
"description": "The path to the local file that was rejected.",
"format": "path",
"title": "Filepath",
"type": "string"
},
"asset_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the asset. Set if reason is 'duplicate'.",
"title": "Asset Id"
},
"reason": {
"anyOf": [
{
"enum": [
"duplicate",
"unsupported_format"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The reason for the rejection.",
"title": "Reason"
}
},
"required": [
"filepath"
],
"title": "RejectedEntry",
"type": "object"
}
Fields:
asset_id
pydantic-field
asset_id: str | None = None
The ID of the asset. Set if reason is 'duplicate'.
filepath
pydantic-field
filepath: Path
The path to the local file that was rejected.
reason
pydantic-field
reason: RejectionReason | None = None
The reason for the rejection.
immichpy.client.types.FailedEntry
pydantic-model
Bases: BaseModel
Represents a file that failed to upload.
Show JSON schema:
{
"description": "Represents a file that failed to upload.",
"properties": {
"filepath": {
"description": "The path to the local file that failed to upload.",
"format": "path",
"title": "Filepath",
"type": "string"
},
"error": {
"description": "The error message from the server.",
"title": "Error",
"type": "string"
}
},
"required": [
"filepath",
"error"
],
"title": "FailedEntry",
"type": "object"
}
Fields:
error
pydantic-field
error: str
The error message from the server.
filepath
pydantic-field
filepath: Path
The path to the local file that failed to upload.
immichpy.client.types.UploadedEntry
pydantic-model
Bases: BaseModel
Represents a successfully uploaded file.
Show JSON schema:
{
"$defs": {
"AssetMediaResponseDto": {
"description": "AssetMediaResponseDto",
"properties": {
"id": {
"description": "Asset media ID",
"title": "Id",
"type": "string"
},
"status": {
"$ref": "#/$defs/AssetMediaStatus"
}
},
"required": [
"id",
"status"
],
"title": "AssetMediaResponseDto",
"type": "object"
},
"AssetMediaStatus": {
"description": "Upload status",
"enum": [
"created",
"replaced",
"duplicate"
],
"title": "AssetMediaStatus",
"type": "string"
}
},
"description": "Represents a successfully uploaded file.",
"properties": {
"asset": {
"$ref": "#/$defs/AssetMediaResponseDto",
"description": "The asset that was uploaded."
},
"filepath": {
"description": "The path to the local file that was uploaded.",
"format": "path",
"title": "Filepath",
"type": "string"
}
},
"required": [
"asset",
"filepath"
],
"title": "UploadedEntry",
"type": "object"
}
Fields:
asset
pydantic-field
asset: AssetMediaResponseDto
The asset that was uploaded.
filepath
pydantic-field
filepath: Path
The path to the local file that was uploaded.
immichpy.client.types.RejectionReason
module-attribute
RejectionReason = Literal['duplicate', 'unsupported_format']