7485 lines
183 KiB
JSON
7485 lines
183 KiB
JSON
{
|
|
"components": {
|
|
"schemas": {
|
|
"ApiError": {
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"ok": {
|
|
"enum": [
|
|
false
|
|
],
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"ok",
|
|
"error"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"ApiOk": {
|
|
"properties": {
|
|
"ok": {
|
|
"enum": [
|
|
true
|
|
],
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"ok"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"ApiToken": {
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"last_used_at": {
|
|
"nullable": true,
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"revoked_at": {
|
|
"nullable": true,
|
|
"type": "string"
|
|
},
|
|
"token_prefix": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"user_id",
|
|
"name",
|
|
"token_prefix",
|
|
"created_at"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"AppStatus": {
|
|
"properties": {
|
|
"api_ms": {
|
|
"format": "float",
|
|
"type": "number"
|
|
},
|
|
"cleanup": {
|
|
"$ref": "#/components/schemas/CleanupSummary"
|
|
},
|
|
"port_check": {
|
|
"$ref": "#/components/schemas/PortCheckStatus"
|
|
},
|
|
"profile": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"pytorrent": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"scgi": {
|
|
"additionalProperties": true,
|
|
"nullable": true,
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"pytorrent",
|
|
"cleanup",
|
|
"scgi",
|
|
"port_check",
|
|
"api_ms"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"AppStatusResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"status": {
|
|
"$ref": "#/components/schemas/AppStatus"
|
|
}
|
|
},
|
|
"required": [
|
|
"status"
|
|
],
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"AuthUser": {
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"role": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"AutoBackupSettings": {
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"interval_hours": {
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
},
|
|
"last_run_at": {
|
|
"nullable": true,
|
|
"type": "string"
|
|
},
|
|
"retention_days": {
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"enabled",
|
|
"interval_hours",
|
|
"retention_days"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"AutoBackupSettingsRequest": {
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"interval_hours": {
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
},
|
|
"last_run_at": {
|
|
"nullable": true,
|
|
"type": "string"
|
|
},
|
|
"retention_days": {
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"AutoBackupSettingsResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"settings": {
|
|
"$ref": "#/components/schemas/AutoBackupSettings"
|
|
}
|
|
},
|
|
"required": [
|
|
"settings"
|
|
],
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"AutomationExportResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"export": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"AutomationImportResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"imported": {
|
|
"type": "integer"
|
|
},
|
|
"rules": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/AutomationRule"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"AutomationListResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"history": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"rules": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/AutomationRule"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"AutomationRule": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"AutomationRunResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"history": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"result": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"rules": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/AutomationRule"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"Backup": {
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"tables": {
|
|
"additionalProperties": {
|
|
"type": "integer"
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"name",
|
|
"created_at"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"BackupCreateInput": {
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"BackupListResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"backups": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/Backup"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"BackupPreview": {
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"automatic": {
|
|
"type": "boolean"
|
|
},
|
|
"created_at": {
|
|
"nullable": true,
|
|
"type": "string"
|
|
},
|
|
"tables": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/BackupPreviewTable"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"version": {
|
|
"nullable": true,
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"automatic",
|
|
"tables"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"BackupPreviewResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"preview": {
|
|
"$ref": "#/components/schemas/BackupPreview"
|
|
}
|
|
},
|
|
"required": [
|
|
"preview"
|
|
],
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"BackupPreviewTable": {
|
|
"properties": {
|
|
"columns": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"rows": {
|
|
"type": "integer"
|
|
},
|
|
"sample": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"rows",
|
|
"columns",
|
|
"sample"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"CleanupCacheSummary": {
|
|
"properties": {
|
|
"profile_id": {
|
|
"type": "integer"
|
|
},
|
|
"profile_rows": {
|
|
"type": "integer"
|
|
},
|
|
"runtime_items": {
|
|
"type": "integer"
|
|
},
|
|
"torrent_stats_rows": {
|
|
"type": "integer"
|
|
},
|
|
"tracker_rows": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"profile_id",
|
|
"profile_rows",
|
|
"runtime_items"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"CleanupResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"cleanup": {
|
|
"$ref": "#/components/schemas/CleanupSummary"
|
|
},
|
|
"deleted": {
|
|
"oneOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"CleanupSummary": {
|
|
"properties": {
|
|
"automation_history_total": {
|
|
"type": "integer"
|
|
},
|
|
"cache": {
|
|
"$ref": "#/components/schemas/CleanupCacheSummary"
|
|
},
|
|
"database": {
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"format": "int64",
|
|
"type": "integer"
|
|
},
|
|
"size_h": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"jobs_clearable": {
|
|
"type": "integer"
|
|
},
|
|
"jobs_total": {
|
|
"type": "integer"
|
|
},
|
|
"operation_logs_total": {
|
|
"type": "integer"
|
|
},
|
|
"planner_history_total": {
|
|
"type": "integer"
|
|
},
|
|
"retention_days": {
|
|
"properties": {
|
|
"automation_history": {
|
|
"type": "integer"
|
|
},
|
|
"jobs": {
|
|
"type": "integer"
|
|
},
|
|
"operation_logs": {
|
|
"type": "integer"
|
|
},
|
|
"planner_history": {
|
|
"type": "integer"
|
|
},
|
|
"smart_queue_history": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"smart_queue_history_total": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"jobs_total",
|
|
"jobs_clearable",
|
|
"smart_queue_history_total",
|
|
"retention_days",
|
|
"database",
|
|
"cache",
|
|
"planner_history_total",
|
|
"operation_logs_total"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"DeletedResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"deleted": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"FilePriorityRequest": {
|
|
"properties": {
|
|
"files": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"index": {
|
|
"type": "integer"
|
|
},
|
|
"priority": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"files"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"FilePriorityResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"errors": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"updated": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"HealthResponse": {
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"checks": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"ok": {
|
|
"type": "boolean"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Job": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"JobQueuedResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"bulk": {
|
|
"type": "boolean"
|
|
},
|
|
"bulk_parts": {
|
|
"type": "integer"
|
|
},
|
|
"chunk_size": {
|
|
"type": "integer"
|
|
},
|
|
"hash_count": {
|
|
"type": "integer"
|
|
},
|
|
"job_id": {
|
|
"type": "string"
|
|
},
|
|
"job_ids": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"jobs": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/Job"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"Label": {
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"color": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"OpenApiResponse": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"OperationLogClearRequest": {
|
|
"properties": {
|
|
"event_type": {
|
|
"description": "Optional event type filter. Empty clears all active-profile operation logs.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"OperationLogEntry": {
|
|
"properties": {
|
|
"action": {
|
|
"nullable": true,
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"details": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"details_h": {
|
|
"type": "string"
|
|
},
|
|
"details_json": {
|
|
"type": "string"
|
|
},
|
|
"event_type": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"profile_id": {
|
|
"nullable": true,
|
|
"type": "integer"
|
|
},
|
|
"severity": {
|
|
"type": "string"
|
|
},
|
|
"source": {
|
|
"type": "string"
|
|
},
|
|
"torrent_hash": {
|
|
"nullable": true,
|
|
"type": "string"
|
|
},
|
|
"torrent_name": {
|
|
"nullable": true,
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"OperationLogRetentionResult": {
|
|
"properties": {
|
|
"deleted": {
|
|
"type": "integer"
|
|
},
|
|
"deleted_days": {
|
|
"type": "integer"
|
|
},
|
|
"deleted_lines": {
|
|
"type": "integer"
|
|
},
|
|
"settings": {
|
|
"$ref": "#/components/schemas/OperationLogSettings"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"OperationLogSettings": {
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"profile_id": {
|
|
"type": "integer"
|
|
},
|
|
"retention_days": {
|
|
"maximum": 3650,
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
},
|
|
"retention_lines": {
|
|
"maximum": 1000000,
|
|
"minimum": 100,
|
|
"type": "integer"
|
|
},
|
|
"retention_mode": {
|
|
"enum": [
|
|
"days",
|
|
"lines",
|
|
"both",
|
|
"manual"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"OperationLogSettingsRequest": {
|
|
"properties": {
|
|
"retention_days": {
|
|
"maximum": 3650,
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
},
|
|
"retention_lines": {
|
|
"maximum": 1000000,
|
|
"minimum": 100,
|
|
"type": "integer"
|
|
},
|
|
"retention_mode": {
|
|
"enum": [
|
|
"days",
|
|
"lines",
|
|
"both",
|
|
"manual"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"OperationLogSettingsResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"retention": {
|
|
"$ref": "#/components/schemas/OperationLogRetentionResult"
|
|
},
|
|
"settings": {
|
|
"$ref": "#/components/schemas/OperationLogSettings"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"OperationLogStats": {
|
|
"properties": {
|
|
"by_day": {
|
|
"items": {
|
|
"properties": {
|
|
"bucket": {
|
|
"type": "string"
|
|
},
|
|
"n": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"by_month": {
|
|
"items": {
|
|
"properties": {
|
|
"bucket": {
|
|
"type": "string"
|
|
},
|
|
"n": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"by_type": {
|
|
"items": {
|
|
"properties": {
|
|
"event_type": {
|
|
"type": "string"
|
|
},
|
|
"n": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"settings": {
|
|
"$ref": "#/components/schemas/OperationLogSettings"
|
|
},
|
|
"top_actions": {
|
|
"items": {
|
|
"properties": {
|
|
"action": {
|
|
"type": "string"
|
|
},
|
|
"n": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"OperationLogsResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"limit": {
|
|
"type": "integer"
|
|
},
|
|
"logs": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/OperationLogEntry"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"offset": {
|
|
"type": "integer"
|
|
},
|
|
"settings": {
|
|
"$ref": "#/components/schemas/OperationLogSettings"
|
|
},
|
|
"stats": {
|
|
"$ref": "#/components/schemas/OperationLogStats"
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"PathBrowseResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"dirs": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"parent": {
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"PathDefaultResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"PlannerHistoryEntry": {
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"at": {
|
|
"format": "date-time",
|
|
"type": "string"
|
|
},
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"down": {
|
|
"type": "integer"
|
|
},
|
|
"dry_run": {
|
|
"type": "boolean"
|
|
},
|
|
"event": {
|
|
"type": "string"
|
|
},
|
|
"pause_reason": {
|
|
"type": "string"
|
|
},
|
|
"paused": {
|
|
"type": "integer"
|
|
},
|
|
"reasons": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"resumed": {
|
|
"type": "integer"
|
|
},
|
|
"up": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PlannerPreviewResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"history": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/PlannerHistoryEntry"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"history_total": {
|
|
"type": "integer"
|
|
},
|
|
"preview": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"PortCheckStatus": {
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"cached": {
|
|
"type": "boolean"
|
|
},
|
|
"checked_at": {
|
|
"format": "date-time",
|
|
"type": "string"
|
|
},
|
|
"checked_at_epoch": {
|
|
"format": "double",
|
|
"type": "number"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"port": {
|
|
"type": "integer"
|
|
},
|
|
"ports": {
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"public_ip": {
|
|
"type": "string"
|
|
},
|
|
"source": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"enum": [
|
|
"open",
|
|
"closed",
|
|
"unknown",
|
|
"disabled",
|
|
"error"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Preferences": {
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"bootstrap_theme": {
|
|
"enum": [
|
|
"default",
|
|
"flatly",
|
|
"litera",
|
|
"lumen",
|
|
"minty",
|
|
"sketchy",
|
|
"solar",
|
|
"spacelab",
|
|
"united",
|
|
"zephyr"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"disk_monitor_mode": {
|
|
"type": "string"
|
|
},
|
|
"disk_monitor_paths_json": {
|
|
"type": "string"
|
|
},
|
|
"disk_monitor_selected_path": {
|
|
"type": "string"
|
|
},
|
|
"font_family": {
|
|
"enum": [
|
|
"default",
|
|
"system-ui",
|
|
"figtree",
|
|
"inter",
|
|
"geist",
|
|
"manrope",
|
|
"dm-sans",
|
|
"source-sans-3",
|
|
"open-sans",
|
|
"roboto",
|
|
"lato",
|
|
"nunito-sans",
|
|
"poppins",
|
|
"montserrat",
|
|
"ibm-plex-sans",
|
|
"jetbrains-mono",
|
|
"adwaita-mono"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"peers_refresh_seconds": {
|
|
"enum": [
|
|
0,
|
|
10,
|
|
15,
|
|
30,
|
|
60
|
|
],
|
|
"type": "integer"
|
|
},
|
|
"port_check_enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"reverse_dns_enabled": {
|
|
"description": "Enables cached reverse DNS lookups for the Peers tab.",
|
|
"type": "boolean"
|
|
},
|
|
"table_columns_json": {
|
|
"description": "JSON-encoded TableColumnsPreference stored in user preferences.",
|
|
"type": "string"
|
|
},
|
|
"theme": {
|
|
"enum": [
|
|
"light",
|
|
"dark"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"tracker_favicons_enabled": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Profile": {
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"is_remote": {
|
|
"type": "boolean"
|
|
},
|
|
"max_parallel_jobs": {
|
|
"default": 5,
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"scgi_url": {
|
|
"type": "string"
|
|
},
|
|
"timeout_seconds": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ProfileInput": {
|
|
"properties": {
|
|
"is_remote": {
|
|
"description": "When true, CPU/RAM host usage is hidden; public IP checks try remote rTorrent commands when supported.",
|
|
"type": "boolean"
|
|
},
|
|
"max_parallel_jobs": {
|
|
"default": 5,
|
|
"description": "Maximum queued jobs that may run at once for this rTorrent. Move/remove jobs keep request order.",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"scgi_url": {
|
|
"type": "string"
|
|
},
|
|
"timeout_seconds": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"RatioGroup": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"RssConfigResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"feeds": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"rules": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"RtorrentConfigGenerateResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"config_text": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"RtorrentConfigResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"config": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"RtorrentConfigSaveResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"result": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"SmartQueueCheckResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"result": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"torrent_patch": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"SmartQueueResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"cooldown_remaining_seconds": {
|
|
"type": "integer"
|
|
},
|
|
"exclusions": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"history": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"history_total": {
|
|
"type": "integer"
|
|
},
|
|
"refill_remaining_seconds": {
|
|
"type": "integer"
|
|
},
|
|
"settings": {
|
|
"$ref": "#/components/schemas/SmartQueueSettings"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"SmartQueueSettings": {
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"auto_stop_idle": {
|
|
"type": "boolean"
|
|
},
|
|
"cooldown_minutes": {
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"ignore_seed_peer": {
|
|
"description": "When enabled, seed and peer counts are ignored by the stalled timer.",
|
|
"type": "boolean"
|
|
},
|
|
"ignore_speed": {
|
|
"type": "boolean"
|
|
},
|
|
"max_active_downloads": {
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
},
|
|
"min_peers": {
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"min_seeds": {
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"min_speed_bytes": {
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"protect_active_below_cap": {
|
|
"type": "boolean"
|
|
},
|
|
"refill_enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"refill_interval_minutes": {
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"stalled_seconds": {
|
|
"minimum": 30,
|
|
"type": "integer"
|
|
},
|
|
"start_grace_seconds": {
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"stop_batch_size": {
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"SpeedLimitRequest": {
|
|
"properties": {
|
|
"down": {
|
|
"description": "Bytes per second, 0 unlimited",
|
|
"type": "integer"
|
|
},
|
|
"up": {
|
|
"description": "Bytes per second, 0 unlimited",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"SystemDiskResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"disk": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"SystemStatusResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"status": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"TableColumnWidths": {
|
|
"additionalProperties": {
|
|
"type": "integer"
|
|
},
|
|
"description": "Column widths in pixels keyed by column id.",
|
|
"type": "object"
|
|
},
|
|
"TableColumnsPreference": {
|
|
"additionalProperties": true,
|
|
"description": "Torrent table column visibility and width preferences for desktop and mobile.",
|
|
"properties": {
|
|
"hidden": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"mobile": {
|
|
"additionalProperties": {
|
|
"type": "boolean"
|
|
},
|
|
"type": "object"
|
|
},
|
|
"mobileSmartFiltersEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"shown": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"widths": {
|
|
"$ref": "#/components/schemas/TableColumnWidths"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Torrent": {
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"completed_bytes": {
|
|
"format": "int64",
|
|
"type": "integer"
|
|
},
|
|
"down_rate": {
|
|
"type": "integer"
|
|
},
|
|
"hash": {
|
|
"type": "string"
|
|
},
|
|
"hashing": {
|
|
"type": "integer"
|
|
},
|
|
"label": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"paused": {
|
|
"type": "boolean"
|
|
},
|
|
"ratio_group": {
|
|
"type": "string"
|
|
},
|
|
"size_bytes": {
|
|
"format": "int64",
|
|
"type": "integer"
|
|
},
|
|
"state": {
|
|
"type": "string"
|
|
},
|
|
"up_rate": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"TorrentChunkActionRequest": {
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"first_chunk": {
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"last_chunk": {
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"priority": {
|
|
"maximum": 3,
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"TorrentChunkActionResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"result": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"result",
|
|
"message"
|
|
],
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"TorrentChunkCell": {
|
|
"properties": {
|
|
"completed": {
|
|
"type": "integer"
|
|
},
|
|
"first_chunk": {
|
|
"type": "integer"
|
|
},
|
|
"grouped": {
|
|
"type": "boolean"
|
|
},
|
|
"index": {
|
|
"type": "integer"
|
|
},
|
|
"last_chunk": {
|
|
"type": "integer"
|
|
},
|
|
"percent": {
|
|
"format": "float",
|
|
"type": "number"
|
|
},
|
|
"seen": {
|
|
"type": "boolean"
|
|
},
|
|
"status": {
|
|
"enum": [
|
|
"complete",
|
|
"partial",
|
|
"missing",
|
|
"seen"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
},
|
|
"unit_count": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"index",
|
|
"first_chunk",
|
|
"last_chunk",
|
|
"completed",
|
|
"total",
|
|
"percent",
|
|
"seen",
|
|
"status",
|
|
"grouped",
|
|
"unit_count"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"TorrentChunks": {
|
|
"properties": {
|
|
"bitfield_units": {
|
|
"type": "integer"
|
|
},
|
|
"cells": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/TorrentChunkCell"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"chunk_size": {
|
|
"type": "integer"
|
|
},
|
|
"chunk_size_h": {
|
|
"type": "string"
|
|
},
|
|
"chunks_hashed": {
|
|
"type": "integer"
|
|
},
|
|
"completed_chunks": {
|
|
"type": "integer"
|
|
},
|
|
"grouped": {
|
|
"type": "boolean"
|
|
},
|
|
"hash": {
|
|
"type": "string"
|
|
},
|
|
"size_chunks": {
|
|
"type": "integer"
|
|
},
|
|
"summary": {
|
|
"additionalProperties": {
|
|
"type": "integer"
|
|
},
|
|
"properties": {
|
|
"complete": {
|
|
"type": "integer"
|
|
},
|
|
"missing": {
|
|
"type": "integer"
|
|
},
|
|
"partial": {
|
|
"type": "integer"
|
|
},
|
|
"seen": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"visual_cells": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"hash",
|
|
"chunk_size",
|
|
"chunk_size_h",
|
|
"size_chunks",
|
|
"completed_chunks",
|
|
"chunks_hashed",
|
|
"bitfield_units",
|
|
"visual_cells",
|
|
"grouped",
|
|
"cells",
|
|
"summary"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"TorrentChunksResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"chunks": {
|
|
"$ref": "#/components/schemas/TorrentChunks"
|
|
}
|
|
},
|
|
"required": [
|
|
"chunks"
|
|
],
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"TorrentFilesResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"files": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"files"
|
|
],
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"TorrentFilterSummary": {
|
|
"properties": {
|
|
"completed_bytes": {
|
|
"description": "Completed bytes reported by rTorrent.",
|
|
"format": "int64",
|
|
"type": "integer"
|
|
},
|
|
"count": {
|
|
"description": "Number of torrents in this filter.",
|
|
"type": "integer"
|
|
},
|
|
"disk_bytes": {
|
|
"description": "Completed bytes reported by rTorrent; used as the displayed Data value.",
|
|
"format": "int64",
|
|
"type": "integer"
|
|
},
|
|
"down_total": {
|
|
"deprecated": true,
|
|
"description": "Backward compatibility field; not used by the filters UI.",
|
|
"format": "int64",
|
|
"type": "integer"
|
|
},
|
|
"progress_percent": {
|
|
"description": "Completed percentage for this filter.",
|
|
"format": "float",
|
|
"type": "number"
|
|
},
|
|
"remaining_bytes": {
|
|
"description": "size - completed_bytes, never below zero.",
|
|
"format": "int64",
|
|
"type": "integer"
|
|
},
|
|
"remaining_percent": {
|
|
"description": "Remaining percentage for this filter.",
|
|
"format": "float",
|
|
"type": "number"
|
|
},
|
|
"size": {
|
|
"description": "Total torrent payload size in bytes.",
|
|
"format": "int64",
|
|
"type": "integer"
|
|
},
|
|
"up_total": {
|
|
"deprecated": true,
|
|
"description": "Backward compatibility field; not used by the filters UI.",
|
|
"format": "int64",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"count",
|
|
"size",
|
|
"disk_bytes",
|
|
"completed_bytes",
|
|
"remaining_bytes",
|
|
"progress_percent",
|
|
"remaining_percent"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"TorrentListResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"error": {
|
|
"nullable": true,
|
|
"type": "string"
|
|
},
|
|
"profile_id": {
|
|
"type": "integer"
|
|
},
|
|
"summary": {
|
|
"$ref": "#/components/schemas/TorrentSummary"
|
|
},
|
|
"torrents": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/Torrent"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"torrents",
|
|
"summary"
|
|
],
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"TorrentPeer": {
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"banned": {
|
|
"type": "boolean"
|
|
},
|
|
"city": {
|
|
"type": "string"
|
|
},
|
|
"client": {
|
|
"type": "string"
|
|
},
|
|
"completed": {
|
|
"type": "integer"
|
|
},
|
|
"country": {
|
|
"type": "string"
|
|
},
|
|
"country_iso": {
|
|
"type": "string"
|
|
},
|
|
"down_rate": {
|
|
"type": "integer"
|
|
},
|
|
"down_rate_h": {
|
|
"type": "string"
|
|
},
|
|
"encrypted": {
|
|
"type": "boolean"
|
|
},
|
|
"host": {
|
|
"description": "Reverse DNS PTR hostname when reverse_dns_enabled is enabled and a hostname is cached or resolved.",
|
|
"type": "string"
|
|
},
|
|
"host_pending": {
|
|
"description": "True when a lightweight background PTR lookup was started but did not finish within the request budget.",
|
|
"type": "boolean"
|
|
},
|
|
"incoming": {
|
|
"type": "boolean"
|
|
},
|
|
"index": {
|
|
"type": "integer"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"port": {
|
|
"type": "integer"
|
|
},
|
|
"snubbed": {
|
|
"type": "boolean"
|
|
},
|
|
"up_rate": {
|
|
"type": "integer"
|
|
},
|
|
"up_rate_h": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"TorrentPeersResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"peers": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/TorrentPeer"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"peers"
|
|
],
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"TorrentSummary": {
|
|
"properties": {
|
|
"cache_ttl_seconds": {
|
|
"description": "Summary cache TTL in seconds.",
|
|
"type": "integer"
|
|
},
|
|
"cached": {
|
|
"description": "True when returned from cache.",
|
|
"type": "boolean"
|
|
},
|
|
"filters": {
|
|
"$ref": "#/components/schemas/TorrentSummaryFilters"
|
|
},
|
|
"generated_at_epoch": {
|
|
"description": "Unix timestamp when summary was generated.",
|
|
"format": "double",
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": [
|
|
"filters",
|
|
"cache_ttl_seconds",
|
|
"generated_at_epoch",
|
|
"cached"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"TorrentSummaryFilters": {
|
|
"properties": {
|
|
"all": {
|
|
"$ref": "#/components/schemas/TorrentFilterSummary"
|
|
},
|
|
"checking": {
|
|
"$ref": "#/components/schemas/TorrentFilterSummary"
|
|
},
|
|
"downloading": {
|
|
"$ref": "#/components/schemas/TorrentFilterSummary"
|
|
},
|
|
"error": {
|
|
"$ref": "#/components/schemas/TorrentFilterSummary"
|
|
},
|
|
"paused": {
|
|
"$ref": "#/components/schemas/TorrentFilterSummary"
|
|
},
|
|
"seeding": {
|
|
"$ref": "#/components/schemas/TorrentFilterSummary"
|
|
},
|
|
"stopped": {
|
|
"$ref": "#/components/schemas/TorrentFilterSummary"
|
|
}
|
|
},
|
|
"required": [
|
|
"all",
|
|
"downloading",
|
|
"seeding",
|
|
"paused",
|
|
"checking",
|
|
"error",
|
|
"stopped"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"TorrentTrackersResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"trackers": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"trackers"
|
|
],
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"TrackerActionResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"result": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"TrackerSummary": {
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"errors": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"hashes": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"pending": {
|
|
"type": "integer"
|
|
},
|
|
"scanned": {
|
|
"type": "integer"
|
|
},
|
|
"trackers": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"warming": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"TrackerSummaryResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"summary": {
|
|
"$ref": "#/components/schemas/TrackerSummary"
|
|
}
|
|
},
|
|
"required": [
|
|
"summary"
|
|
],
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"TrafficHistoryResponse": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"history": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"TemporaryLinkResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"example": "/download/r4nd0mTemporaryToken"
|
|
},
|
|
"expires_in": {
|
|
"type": "integer",
|
|
"example": 600
|
|
}
|
|
},
|
|
"required": [
|
|
"ok",
|
|
"url",
|
|
"expires_in"
|
|
]
|
|
}
|
|
},
|
|
"securitySchemes": {
|
|
"apiKeyAuth": {
|
|
"description": "Optional per-user API token. Tokens are accepted only when PYTORRENT_AUTH_ENABLE=1. When auth is disabled, API endpoints do not require credentials.",
|
|
"in": "header",
|
|
"name": "X-API-Key",
|
|
"type": "apiKey"
|
|
},
|
|
"bearerApiToken": {
|
|
"description": "Optional per-user API token in Authorization: Bearer <token>. Tokens are accepted only when PYTORRENT_AUTH_ENABLE=1.",
|
|
"scheme": "bearer",
|
|
"type": "http"
|
|
},
|
|
"sessionCookie": {
|
|
"description": "Optional Flask session cookie. Required only when PYTORRENT_AUTH_ENABLE=1 and no API token is used.",
|
|
"in": "cookie",
|
|
"name": "session",
|
|
"type": "apiKey"
|
|
}
|
|
}
|
|
},
|
|
"info": {
|
|
"title": "pyTorrent API",
|
|
"version": "0.0.1"
|
|
},
|
|
"openapi": "3.0.3",
|
|
"paths": {
|
|
"/api/app/status": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AppStatusResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Application status"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "pyTorrent application status"
|
|
}
|
|
},
|
|
"/api/auth/login": {
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"password": {
|
|
"format": "password",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"username",
|
|
"password"
|
|
],
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"auth_enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"user": {
|
|
"$ref": "#/components/schemas/AuthUser"
|
|
}
|
|
},
|
|
"required": [
|
|
"user",
|
|
"auth_enabled"
|
|
],
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Invalid credentials"
|
|
},
|
|
"404": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Authentication disabled"
|
|
}
|
|
},
|
|
"summary": "Log in with username and password"
|
|
}
|
|
},
|
|
"/api/auth/logout": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"404": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Authentication disabled"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Log out current user"
|
|
}
|
|
},
|
|
"/api/auth/me": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"auth_enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"user": {
|
|
"$ref": "#/components/schemas/AuthUser"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"404": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Authentication disabled"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Get current user"
|
|
}
|
|
},
|
|
"/api/auth/users": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"users": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/AuthUser"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"404": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Authentication disabled"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "List users"
|
|
},
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"user": {
|
|
"$ref": "#/components/schemas/AuthUser"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Create user"
|
|
}
|
|
},
|
|
"/api/auth/users/{user_id}": {
|
|
"delete": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"users": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/AuthUser"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Delete user"
|
|
},
|
|
"put": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"user": {
|
|
"$ref": "#/components/schemas/AuthUser"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Update user"
|
|
}
|
|
},
|
|
"/api/auth/users/{user_id}/tokens": {
|
|
"get": {
|
|
"description": "Available only when application authentication is enabled. Admins can list any user tokens; regular users can list their own tokens. Token secrets are never returned.",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean"
|
|
},
|
|
"tokens": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ApiToken"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Token list"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
},
|
|
{
|
|
"apiKeyAuth": []
|
|
},
|
|
{
|
|
"bearerApiToken": []
|
|
}
|
|
],
|
|
"summary": "List API tokens for a user"
|
|
},
|
|
"post": {
|
|
"description": "Available only when application authentication is enabled. The returned token is shown once and must be copied immediately.",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"name": {
|
|
"example": "automation",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean"
|
|
},
|
|
"token": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiToken"
|
|
},
|
|
{
|
|
"properties": {
|
|
"token": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Generated token"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
},
|
|
{
|
|
"apiKeyAuth": []
|
|
},
|
|
{
|
|
"bearerApiToken": []
|
|
}
|
|
],
|
|
"summary": "Generate API token for a user"
|
|
}
|
|
},
|
|
"/api/auth/users/{user_id}/tokens/{token_id}": {
|
|
"delete": {
|
|
"description": "Available only when application authentication is enabled. Revoked tokens stop working immediately.",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "user_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "token_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean"
|
|
},
|
|
"tokens": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ApiToken"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Updated token list"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
},
|
|
{
|
|
"apiKeyAuth": []
|
|
},
|
|
{
|
|
"bearerApiToken": []
|
|
}
|
|
],
|
|
"summary": "Revoke API token"
|
|
}
|
|
},
|
|
"/api/automations": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AutomationListResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"500": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "List automation rules and history"
|
|
},
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AutomationRule"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AutomationListResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Create or update automation rule"
|
|
}
|
|
},
|
|
"/api/automations/check": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AutomationRunResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
},
|
|
"500": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Run automation check immediately"
|
|
}
|
|
},
|
|
"/api/automations/export": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AutomationExportResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Export automation rules"
|
|
}
|
|
},
|
|
"/api/automations/history": {
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"cleanup": {
|
|
"$ref": "#/components/schemas/CleanupSummary"
|
|
},
|
|
"deleted": {
|
|
"type": "integer"
|
|
},
|
|
"history": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
},
|
|
"500": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Clear automation execution history"
|
|
}
|
|
},
|
|
"/api/automations/import": {
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "replace",
|
|
"schema": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AutomationImportResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Import automation rules"
|
|
}
|
|
},
|
|
"/api/automations/{rule_id}": {
|
|
"delete": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "rule_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AutomationListResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Delete automation rule"
|
|
}
|
|
},
|
|
"/api/automations/{rule_id}/run": {
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "rule_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AutomationRunResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
},
|
|
"500": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Run one automation rule immediately"
|
|
}
|
|
},
|
|
"/api/backup": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BackupListResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "List backups"
|
|
},
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BackupCreateInput"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"backup": {
|
|
"$ref": "#/components/schemas/Backup"
|
|
},
|
|
"backups": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/Backup"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Create backup"
|
|
}
|
|
},
|
|
"/api/backup/settings": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AutoBackupSettingsResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Get automatic backup settings"
|
|
},
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AutoBackupSettingsRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AutoBackupSettingsResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Save automatic backup settings"
|
|
}
|
|
},
|
|
"/api/backup/{backup_id}": {
|
|
"delete": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "backup_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"result": {
|
|
"properties": {
|
|
"deleted": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Delete backup"
|
|
}
|
|
},
|
|
"/api/backup/{backup_id}/download": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "backup_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Backup JSON"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Download backup"
|
|
}
|
|
},
|
|
"/api/backup/{backup_id}/preview": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "backup_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BackupPreviewResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Preview backup"
|
|
}
|
|
},
|
|
"/api/backup/{backup_id}/restore": {
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "backup_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"result": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Restore backup"
|
|
}
|
|
},
|
|
"/api/cleanup/all": {
|
|
"post": {
|
|
"description": "Clears finished job logs, Smart Queue history, active-profile operation logs, Planner action history and automation history. Pending/running jobs, saved rules, settings and torrents are preserved.",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CleanupResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Cleanup result"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Clear all cleanup-supported history"
|
|
}
|
|
},
|
|
"/api/cleanup/automations": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CleanupResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Cleanup result"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Clear automation execution history"
|
|
}
|
|
},
|
|
"/api/cleanup/cache": {
|
|
"post": {
|
|
"description": "Clears active profile runtime and database-backed caches without deleting torrents, settings, rules or logs.",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CleanupResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Cleanup result"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "No active profile"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Clear active profile cache"
|
|
}
|
|
},
|
|
"/api/cleanup/jobs": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CleanupResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Cleanup result"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Clear finished job history"
|
|
}
|
|
},
|
|
"/api/cleanup/operation-logs": {
|
|
"post": {
|
|
"description": "Clears active-profile operation logs. Torrents, jobs, settings and rules are preserved.",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CleanupResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Cleanup result"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Clear operation logs"
|
|
}
|
|
},
|
|
"/api/cleanup/planner": {
|
|
"post": {
|
|
"description": "Deletes Download Planner action history for the active profile. Saved Planner settings are preserved.",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CleanupResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Cleanup result"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "No active profile"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Clear Planner action history"
|
|
}
|
|
},
|
|
"/api/cleanup/smart-queue": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CleanupResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Cleanup result"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Clear Smart Queue history"
|
|
}
|
|
},
|
|
"/api/cleanup/summary": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CleanupResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Cleanup summary"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Cleanup summary"
|
|
}
|
|
},
|
|
"/api/download-planner": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Manage download planner settings"
|
|
},
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Manage download planner settings"
|
|
}
|
|
},
|
|
"/api/download-planner/check": {
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Run download planner check"
|
|
}
|
|
},
|
|
"/api/download-planner/history": {
|
|
"delete": {
|
|
"description": "Deletes Download Planner action history for the active profile. Saved Planner settings are preserved.",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"deleted": {
|
|
"type": "integer"
|
|
},
|
|
"history": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/PlannerHistoryEntry"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"history_total": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "History cleared"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "No active profile"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Clear Planner action history"
|
|
}
|
|
},
|
|
"/api/download-planner/override": {
|
|
"post": {
|
|
"description": "Set a temporary manual planner override.",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"down_limit": {
|
|
"type": "integer"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"minutes": {
|
|
"type": "integer"
|
|
},
|
|
"up_limit": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Set download planner override"
|
|
}
|
|
},
|
|
"/api/download-planner/preview": {
|
|
"get": {
|
|
"description": "Preview matching planner rule and next action.",
|
|
"parameters": [
|
|
{
|
|
"description": "Number of Planner history rows to return.",
|
|
"in": "query",
|
|
"name": "history_limit",
|
|
"required": false,
|
|
"schema": {
|
|
"maximum": 200,
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PlannerPreviewResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Planner preview"
|
|
}
|
|
},
|
|
"summary": "Preview download planner"
|
|
}
|
|
},
|
|
"/api/health": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HealthResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"503": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HealthResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Unhealthy"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Application health check"
|
|
}
|
|
},
|
|
"/api/health/nagios": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Plain-text OK"
|
|
},
|
|
"503": {
|
|
"description": "Plain-text CRITICAL"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Nagios-compatible health check"
|
|
}
|
|
},
|
|
"/api/jobs": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"schema": {
|
|
"default": 50,
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "offset",
|
|
"schema": {
|
|
"default": 0,
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"jobs": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/Job"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "List job queue history"
|
|
}
|
|
},
|
|
"/api/jobs/clear": {
|
|
"post": {
|
|
"description": "Deletes jobs that are not pending or running.",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"deleted": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Clear finished job history"
|
|
}
|
|
},
|
|
"/api/jobs/{job_id}/cancel": {
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "job_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
},
|
|
"403": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Cancel pending or failed job"
|
|
}
|
|
},
|
|
"/api/jobs/{job_id}/force": {
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "job_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
},
|
|
"403": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Force pending job to run next"
|
|
}
|
|
},
|
|
"/api/jobs/{job_id}/retry": {
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "job_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
},
|
|
"403": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Retry failed or cancelled job"
|
|
}
|
|
},
|
|
"/api/labels": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"labels": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/Label"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "List labels"
|
|
},
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Label"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"labels": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/Label"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Create or update label"
|
|
}
|
|
},
|
|
"/api/labels/{label_id}": {
|
|
"delete": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "label_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"labels": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/Label"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Delete label"
|
|
}
|
|
},
|
|
"/api/openapi.json": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OpenApiResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OpenAPI document"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "OpenAPI schema"
|
|
}
|
|
},
|
|
"/api/operation-logs": {
|
|
"get": {
|
|
"description": "Lists active-profile operation logs with filters, retention settings and statistics.",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false,
|
|
"schema": {
|
|
"maximum": 1000,
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "offset",
|
|
"required": false,
|
|
"schema": {
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "type",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "q",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OperationLogsResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Operation logs"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "List operation logs"
|
|
}
|
|
},
|
|
"/api/operation-logs/apply-retention": {
|
|
"post": {
|
|
"description": "Runs retention cleanup for active-profile operation logs.",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/OperationLogRetentionResult"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "Retention result"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Apply operation log retention"
|
|
}
|
|
},
|
|
"/api/operation-logs/clear": {
|
|
"post": {
|
|
"description": "Clears active-profile operation logs, optionally limited to one event type.",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OperationLogClearRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DeletedResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Deleted count"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Clear operation logs"
|
|
}
|
|
},
|
|
"/api/operation-logs/settings": {
|
|
"post": {
|
|
"description": "Saves active-profile operation log retention and applies it immediately.",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OperationLogSettingsRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OperationLogSettingsResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Saved settings"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Save operation log retention settings"
|
|
}
|
|
},
|
|
"/api/path/browse": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "path",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PathBrowseResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Browse server directories"
|
|
}
|
|
},
|
|
"/api/path/default": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PathDefaultResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Get active default download path"
|
|
}
|
|
},
|
|
"/api/poller/settings": {
|
|
"get": {
|
|
"description": "Get poller settings",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Get poller settings"
|
|
}
|
|
},
|
|
"summary": "Get poller settings"
|
|
},
|
|
"post": {
|
|
"description": "Save poller settings",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Save poller settings"
|
|
}
|
|
},
|
|
"summary": "Save poller settings"
|
|
}
|
|
},
|
|
"/api/port-check": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PortCheckStatus"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Read cached incoming port check status"
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PortCheckStatus"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Run incoming port check immediately, bypassing cache"
|
|
}
|
|
},
|
|
"/api/preferences": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"preferences": {
|
|
"$ref": "#/components/schemas/Preferences"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Get preferences"
|
|
},
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Preferences"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"preferences": {
|
|
"$ref": "#/components/schemas/Preferences"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Save preferences"
|
|
}
|
|
},
|
|
"/api/preferences/table-columns/recommended": {
|
|
"post": {
|
|
"description": "Applies the backend-owned recommended torrent table layout, including desktop visibility, mobile visibility, smart mobile filters and column widths.",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": false,
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"preferences": {
|
|
"$ref": "#/components/schemas/Preferences"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Apply recommended table columns"
|
|
}
|
|
},
|
|
"/api/profiles": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"active_profile": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"profiles": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "List rTorrent profiles"
|
|
},
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProfileInput"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"profile": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"profiles": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Create rTorrent profile"
|
|
}
|
|
},
|
|
"/api/profiles/diagnostics": {
|
|
"get": {
|
|
"description": "Run diagnostics for the active rTorrent profile.",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Diagnostics result"
|
|
}
|
|
},
|
|
"summary": "Active profile diagnostics"
|
|
}
|
|
},
|
|
"/api/profiles/export": {
|
|
"get": {
|
|
"description": "Export rTorrent profiles.",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Profiles export"
|
|
}
|
|
},
|
|
"summary": "Export profiles"
|
|
}
|
|
},
|
|
"/api/profiles/import": {
|
|
"post": {
|
|
"description": "Import rTorrent profiles from exported JSON.",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"profiles": {
|
|
"items": {
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Import profiles"
|
|
}
|
|
},
|
|
"/api/profiles/test": {
|
|
"post": {
|
|
"description": "Test a submitted SCGI profile payload without saving it.",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"is_remote": {
|
|
"type": "boolean"
|
|
},
|
|
"max_parallel_jobs": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"scgi_url": {
|
|
"type": "string"
|
|
},
|
|
"timeout_seconds": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Test rTorrent profile"
|
|
}
|
|
},
|
|
"/api/profiles/{profile_id}": {
|
|
"delete": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "profile_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"profiles": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Delete rTorrent profile"
|
|
},
|
|
"put": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "profile_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProfileInput"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"profile": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"profiles": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Update rTorrent profile"
|
|
}
|
|
},
|
|
"/api/profiles/{profile_id}/activate": {
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "profile_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"active_profile": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"profiles": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Activate profile"
|
|
}
|
|
},
|
|
"/api/profiles/{profile_id}/diagnostics": {
|
|
"get": {
|
|
"description": "Run diagnostics for a saved rTorrent profile.",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Diagnostics result"
|
|
}
|
|
},
|
|
"summary": "Profile diagnostics"
|
|
}
|
|
},
|
|
"/api/ratio-groups": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"groups": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RatioGroup"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "List ratio groups"
|
|
},
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RatioGroup"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"groups": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RatioGroup"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Create or update ratio group"
|
|
}
|
|
},
|
|
"/api/ratio-groups/check": {
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Run ratio groups check"
|
|
}
|
|
},
|
|
"/api/rss": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RssConfigResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "List RSS feeds and rules"
|
|
}
|
|
},
|
|
"/api/rss/check": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"job_ids": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"matches": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"500": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Manually check RSS feeds"
|
|
}
|
|
},
|
|
"/api/rss/feeds": {
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RssConfigResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Add or update RSS feed"
|
|
}
|
|
},
|
|
"/api/rss/feeds/{feed_id}": {
|
|
"delete": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "feed_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Delete RSS feed"
|
|
}
|
|
},
|
|
"/api/rss/rules": {
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RssConfigResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Add or update RSS rule"
|
|
}
|
|
},
|
|
"/api/rss/rules/test": {
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Test RSS rule"
|
|
}
|
|
},
|
|
"/api/rss/rules/{rule_id}": {
|
|
"delete": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "rule_id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Delete RSS rule"
|
|
}
|
|
},
|
|
"/api/rtorrent-config": {
|
|
"get": {
|
|
"description": "Get startup rTorrent config",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Get startup rTorrent config"
|
|
}
|
|
},
|
|
"summary": "Get startup rTorrent config"
|
|
},
|
|
"post": {
|
|
"description": "Save startup rTorrent config",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Save startup rTorrent config"
|
|
}
|
|
},
|
|
"summary": "Save startup rTorrent config"
|
|
}
|
|
},
|
|
"/api/rtorrent-config/generate": {
|
|
"post": {
|
|
"description": "Generate startup rTorrent config",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Generate startup rTorrent config"
|
|
}
|
|
},
|
|
"summary": "Generate startup rTorrent config"
|
|
}
|
|
},
|
|
"/api/rtorrent-config/reset": {
|
|
"post": {
|
|
"description": "Clear pyTorrent-saved rTorrent config overrides and reload live rTorrent values.",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RtorrentConfigResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Reset startup rTorrent config overrides"
|
|
}
|
|
},
|
|
"/api/smart-queue": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "history_limit",
|
|
"schema": {
|
|
"default": 10,
|
|
"maximum": 100,
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmartQueueResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Get Smart Queue settings, exceptions and history"
|
|
},
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmartQueueSettings"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmartQueueResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"500": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Save Smart Queue settings"
|
|
}
|
|
},
|
|
"/api/smart-queue/check": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmartQueueCheckResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"500": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Run Smart Queue check immediately"
|
|
}
|
|
},
|
|
"/api/smart-queue/exclusion": {
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"excluded": {
|
|
"type": "boolean"
|
|
},
|
|
"hash": {
|
|
"type": "string"
|
|
},
|
|
"reason": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"hash"
|
|
],
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"exclusions": {
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Set Smart Queue exclusion"
|
|
}
|
|
},
|
|
"/api/smart-queue/history": {
|
|
"delete": {
|
|
"description": "Deletes Smart Queue audit history for the active profile only. Settings, exclusions and queue state are preserved.",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"history": {
|
|
"items": {
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"history_total": {
|
|
"type": "integer"
|
|
},
|
|
"removed": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "History cleared"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "No active profile"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Clear Smart Queue history for active profile"
|
|
}
|
|
},
|
|
"/api/speed/limits": {
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SpeedLimitRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/JobQueuedResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Job queued"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Queue global speed limit change"
|
|
}
|
|
},
|
|
"/api/system/disk": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SystemDiskResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
},
|
|
"500": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Disk usage for monitored paths"
|
|
}
|
|
},
|
|
"/api/system/status": {
|
|
"get": {
|
|
"description": "For remote profiles CPU/RAM host usage is not returned and usage_available is false.",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SystemStatusResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
},
|
|
"500": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "rTorrent/system status"
|
|
}
|
|
},
|
|
"/api/torrent-stats": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "force",
|
|
"schema": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ApiOk"
|
|
},
|
|
{
|
|
"properties": {
|
|
"stats": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"500": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Get torrent statistics"
|
|
}
|
|
},
|
|
"/api/torrents": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TorrentListResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Torrent list with cached filter summary"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Get cached torrent snapshot"
|
|
}
|
|
},
|
|
"/api/torrents/add": {
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"directory": {
|
|
"type": "string"
|
|
},
|
|
"label": {
|
|
"type": "string"
|
|
},
|
|
"start": {
|
|
"type": "boolean"
|
|
},
|
|
"uris": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"properties": {
|
|
"directory": {
|
|
"type": "string"
|
|
},
|
|
"files": {
|
|
"items": {
|
|
"format": "binary",
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"label": {
|
|
"type": "string"
|
|
},
|
|
"start": {
|
|
"type": "boolean"
|
|
},
|
|
"uris": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/JobQueuedResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Jobs queued"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Add magnet links or torrent files"
|
|
}
|
|
},
|
|
"/api/torrents/create": {
|
|
"post": {
|
|
"description": "Create a .torrent file from a source path on the active rTorrent host and optionally add/share it.",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"properties": {
|
|
"comment": {
|
|
"type": "string"
|
|
},
|
|
"label": {
|
|
"type": "string"
|
|
},
|
|
"piece_size_kib": {
|
|
"type": "integer"
|
|
},
|
|
"private": {
|
|
"enum": [
|
|
"0",
|
|
"1"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"share": {
|
|
"enum": [
|
|
"0",
|
|
"1"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"source": {
|
|
"type": "string"
|
|
},
|
|
"source_path": {
|
|
"type": "string"
|
|
},
|
|
"trackers": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/x-bittorrent": {
|
|
"schema": {
|
|
"format": "binary",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Created torrent file"
|
|
}
|
|
},
|
|
"summary": "Create torrent file"
|
|
}
|
|
},
|
|
"/api/torrents/preview": {
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Preview torrent files"
|
|
}
|
|
},
|
|
"/api/torrents/torrent-files.zip": {
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Export selected torrent files as ZIP"
|
|
}
|
|
},
|
|
"/api/torrents/{action_name}": {
|
|
"post": {
|
|
"description": "For move, path is the target directory; move_data=true physically moves data on the rTorrent host using a detached shell move with status polling. Large move/remove selections are split into ordered bulk parts of up to 100 hashes.",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "action_name",
|
|
"required": true,
|
|
"schema": {
|
|
"enum": [
|
|
"start",
|
|
"pause",
|
|
"unpause",
|
|
"stop",
|
|
"resume",
|
|
"recheck",
|
|
"reannounce",
|
|
"remove",
|
|
"move",
|
|
"set_label",
|
|
"set_ratio_group"
|
|
],
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"hashes": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"label": {
|
|
"type": "string"
|
|
},
|
|
"move_data": {
|
|
"type": "boolean"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"ratio_group": {
|
|
"type": "string"
|
|
},
|
|
"recheck": {
|
|
"type": "boolean"
|
|
},
|
|
"remove_data": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/JobQueuedResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Job queued"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Queue torrent action"
|
|
}
|
|
},
|
|
"/api/torrents/{torrent_hash}/chunks": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "torrent_hash",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "max_cells",
|
|
"required": false,
|
|
"schema": {
|
|
"default": 2048,
|
|
"maximum": 10000,
|
|
"minimum": 64,
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TorrentChunksResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Torrent chunks"
|
|
}
|
|
},
|
|
"/api/torrents/{torrent_hash}/chunks/{action_name}": {
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "torrent_hash",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "action_name",
|
|
"required": true,
|
|
"schema": {
|
|
"enum": [
|
|
"recheck",
|
|
"prioritize_files"
|
|
],
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TorrentChunkActionRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TorrentChunkActionResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Run torrent chunk action"
|
|
}
|
|
},
|
|
"/api/torrents/{torrent_hash}/files": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "torrent_hash",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TorrentFilesResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Torrent files"
|
|
}
|
|
},
|
|
"/api/torrents/{torrent_hash}/files/download.zip": {
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "torrent_hash",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Download selected files as ZIP"
|
|
}
|
|
},
|
|
"/api/torrents/{torrent_hash}/files/folder-priority": {
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "torrent_hash",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Set folder file priority"
|
|
}
|
|
},
|
|
"/api/torrents/{torrent_hash}/files/priority": {
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "torrent_hash",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FilePriorityRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FilePriorityResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"207": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FilePriorityResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Partial success"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Set torrent file priorities"
|
|
}
|
|
},
|
|
"/api/torrents/{torrent_hash}/files/tree": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "torrent_hash",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Get torrent file tree"
|
|
}
|
|
},
|
|
"/api/torrents/{torrent_hash}/files/{file_index}/download": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "torrent_hash",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "file_index",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Download torrent file"
|
|
}
|
|
},
|
|
"/api/torrents/{torrent_hash}/peers": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "torrent_hash",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TorrentPeersResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Torrent peers with GeoIP and optional reverse DNS"
|
|
}
|
|
},
|
|
"/api/torrents/{torrent_hash}/torrent-file": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "torrent_hash",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"summary": "Export torrent file"
|
|
}
|
|
},
|
|
"/api/torrents/{torrent_hash}/trackers": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "torrent_hash",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TorrentTrackersResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Torrent trackers"
|
|
}
|
|
},
|
|
"/api/torrents/{torrent_hash}/trackers/{action_name}": {
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "torrent_hash",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "action_name",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": false
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TrackerActionResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Tracker action result"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Run tracker action"
|
|
}
|
|
},
|
|
"/api/tracker-favicon/{domain}": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "domain",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "refresh",
|
|
"schema": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"302": {
|
|
"description": "Redirect to cached favicon"
|
|
},
|
|
"404": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Favicon not found"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Backward-compatible tracker favicon alias"
|
|
}
|
|
},
|
|
"/api/trackers/favicon": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"description": "Tracker domain or URL",
|
|
"in": "query",
|
|
"name": "domain",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "refresh",
|
|
"schema": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"302": {
|
|
"description": "Redirect to cached favicon"
|
|
},
|
|
"400": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Missing domain"
|
|
},
|
|
"404": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Favicon not found"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Resolve and cache tracker favicon by query parameter"
|
|
}
|
|
},
|
|
"/api/trackers/favicon/{domain}": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "domain",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "refresh",
|
|
"schema": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"302": {
|
|
"description": "Redirect to cached favicon"
|
|
},
|
|
"404": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Favicon not found"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Resolve and cache tracker favicon by path"
|
|
}
|
|
},
|
|
"/api/trackers/summary": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "scan_limit",
|
|
"schema": {
|
|
"maximum": 250,
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "bg_limit",
|
|
"schema": {
|
|
"maximum": 250,
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "warm",
|
|
"schema": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TrackerSummaryResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"sessionCookie": []
|
|
}
|
|
],
|
|
"summary": "Get tracker summary for cached torrents"
|
|
}
|
|
},
|
|
"/api/traffic/history": {
|
|
"get": {
|
|
"description": "Traffic history",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Traffic history"
|
|
}
|
|
},
|
|
"summary": "Traffic history"
|
|
}
|
|
},
|
|
"/preview/pdf/{token}": {
|
|
"get": {
|
|
"summary": "Open temporary PDF preview",
|
|
"description": "Streams a PDF through an in-app temporary preview URL created by the API. The browser-visible URL does not expose the stable /api download route.",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "token",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "PDF stream",
|
|
"content": {
|
|
"application/pdf": {
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/download/{token}": {
|
|
"get": {
|
|
"summary": "Open temporary download link",
|
|
"description": "Resolves a short-lived in-app download token created by an API endpoint and streams the requested file or ZIP.",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "token",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "File stream",
|
|
"content": {
|
|
"application/octet-stream": {
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
},
|
|
"application/zip": {
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
},
|
|
"application/x-bittorrent": {
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/torrents/{torrent_hash}/files/{file_index}/download-link": {
|
|
"post": {
|
|
"summary": "Create temporary torrent file download link",
|
|
"description": "Validates the selected torrent file through the API and returns a short-lived /download URL for the UI.",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "torrent_hash",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "file_index",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TemporaryLinkResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/torrents/{torrent_hash}/files/download-link": {
|
|
"post": {
|
|
"summary": "Create temporary torrent file download link from body",
|
|
"description": "Body-based alias that validates a selected torrent file and returns a short-lived /download URL.",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "torrent_hash",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"file_index": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"file_index"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TemporaryLinkResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/torrents/{torrent_hash}/files/download.zip/link": {
|
|
"post": {
|
|
"summary": "Create temporary torrent files ZIP download link",
|
|
"description": "Validates selected torrent files and returns a short-lived /download URL for a ZIP archive. If indexes is omitted or null, all files are included.",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "torrent_hash",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": false,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"indexes": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"nullable": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TemporaryLinkResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/torrents/{torrent_hash}/torrent-file/link": {
|
|
"get": {
|
|
"summary": "Create temporary .torrent export download link",
|
|
"description": "Validates .torrent export availability and returns a short-lived /download URL for the UI.",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "torrent_hash",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TemporaryLinkResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/torrents/torrent-files.zip/link": {
|
|
"post": {
|
|
"summary": "Create temporary .torrent files ZIP download link",
|
|
"description": "Validates selected torrents and returns a short-lived /download URL for a ZIP of exported .torrent files.",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"hashes": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"hashes"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TemporaryLinkResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|