update openapi

This commit is contained in:
Mateusz Gruszczyński
2026-05-20 11:15:33 +02:00
parent 559ccd77f3
commit 07c23a8d25

View File

@@ -138,6 +138,71 @@
},
"type": "object"
},
"AutoBackupSettings": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"interval_hours": {
"type": "integer",
"minimum": 1
},
"retention_days": {
"type": "integer",
"minimum": 1
},
"last_run_at": {
"type": "string",
"nullable": true
}
},
"required": [
"enabled",
"interval_hours",
"retention_days"
],
"additionalProperties": true
},
"AutoBackupSettingsRequest": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"interval_hours": {
"type": "integer",
"minimum": 1
},
"retention_days": {
"type": "integer",
"minimum": 1
},
"last_run_at": {
"type": "string",
"nullable": true
}
},
"additionalProperties": true
},
"AutoBackupSettingsResponse": {
"allOf": [
{
"$ref": "#/components/schemas/ApiOk"
},
{
"type": "object",
"properties": {
"settings": {
"$ref": "#/components/schemas/AutoBackupSettings"
}
},
"required": [
"settings"
]
}
]
},
"AutomationExportResponse": {
"allOf": [
{
@@ -287,6 +352,81 @@
}
]
},
"BackupPreview": {
"type": "object",
"properties": {
"version": {
"type": "integer",
"nullable": true
},
"created_at": {
"type": "string",
"nullable": true
},
"automatic": {
"type": "boolean"
},
"tables": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BackupPreviewTable"
}
}
},
"required": [
"automatic",
"tables"
],
"additionalProperties": true
},
"BackupPreviewResponse": {
"allOf": [
{
"$ref": "#/components/schemas/ApiOk"
},
{
"type": "object",
"properties": {
"preview": {
"$ref": "#/components/schemas/BackupPreview"
}
},
"required": [
"preview"
]
}
]
},
"BackupPreviewTable": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"rows": {
"type": "integer"
},
"columns": {
"type": "array",
"items": {
"type": "string"
}
},
"sample": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
}
},
"required": [
"name",
"rows",
"columns",
"sample"
]
},
"CleanupCacheSummary": {
"properties": {
"profile_id": {
@@ -1401,6 +1541,191 @@
},
"type": "object"
},
"TorrentChunkActionRequest": {
"type": "object",
"properties": {
"first_chunk": {
"type": "integer",
"minimum": 0
},
"last_chunk": {
"type": "integer",
"minimum": 0
},
"priority": {
"type": "integer",
"minimum": 0,
"maximum": 3
}
},
"additionalProperties": true
},
"TorrentChunkActionResponse": {
"allOf": [
{
"$ref": "#/components/schemas/ApiOk"
},
{
"type": "object",
"properties": {
"result": {
"type": "object",
"additionalProperties": true
},
"message": {
"type": "string"
}
},
"required": [
"result",
"message"
]
}
]
},
"TorrentChunkCell": {
"type": "object",
"properties": {
"index": {
"type": "integer"
},
"first_chunk": {
"type": "integer"
},
"last_chunk": {
"type": "integer"
},
"completed": {
"type": "integer"
},
"total": {
"type": "integer"
},
"percent": {
"type": "number",
"format": "float"
},
"seen": {
"type": "boolean"
},
"status": {
"type": "string",
"enum": [
"complete",
"partial",
"missing",
"seen"
]
},
"grouped": {
"type": "boolean"
},
"unit_count": {
"type": "integer"
}
},
"required": [
"index",
"first_chunk",
"last_chunk",
"completed",
"total",
"percent",
"seen",
"status",
"grouped",
"unit_count"
]
},
"TorrentChunks": {
"type": "object",
"properties": {
"hash": {
"type": "string"
},
"chunk_size": {
"type": "integer"
},
"chunk_size_h": {
"type": "string"
},
"size_chunks": {
"type": "integer"
},
"completed_chunks": {
"type": "integer"
},
"chunks_hashed": {
"type": "integer"
},
"bitfield_units": {
"type": "integer"
},
"visual_cells": {
"type": "integer"
},
"grouped": {
"type": "boolean"
},
"cells": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TorrentChunkCell"
}
},
"summary": {
"type": "object",
"properties": {
"complete": {
"type": "integer"
},
"partial": {
"type": "integer"
},
"missing": {
"type": "integer"
},
"seen": {
"type": "integer"
}
},
"additionalProperties": {
"type": "integer"
}
}
},
"required": [
"hash",
"chunk_size",
"chunk_size_h",
"size_chunks",
"completed_chunks",
"chunks_hashed",
"bitfield_units",
"visual_cells",
"grouped",
"cells",
"summary"
]
},
"TorrentChunksResponse": {
"allOf": [
{
"$ref": "#/components/schemas/ApiOk"
},
{
"type": "object",
"properties": {
"chunks": {
"$ref": "#/components/schemas/TorrentChunks"
}
},
"required": [
"chunks"
]
}
]
},
"TorrentFilesResponse": {
"allOf": [
{
@@ -2755,6 +3080,68 @@
"summary": "Create backup"
}
},
"/api/backup/settings": {
"get": {
"summary": "Get automatic backup settings",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AutoBackupSettingsResponse"
}
}
}
}
},
"security": [
{
"sessionCookie": []
}
]
},
"post": {
"summary": "Save automatic backup settings",
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AutoBackupSettingsRequest"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AutoBackupSettingsResponse"
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"security": [
{
"sessionCookie": []
}
]
}
},
"/api/backup/{backup_id}": {
"delete": {
"parameters": [
@@ -2857,6 +3244,48 @@
"summary": "Download backup"
}
},
"/api/backup/{backup_id}/preview": {
"get": {
"summary": "Preview backup",
"parameters": [
{
"in": "path",
"name": "backup_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BackupPreviewResponse"
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"security": [
{
"sessionCookie": []
}
]
}
},
"/api/backup/{backup_id}/restore": {
"post": {
"parameters": [
@@ -5092,6 +5521,39 @@
"summary": "Generate startup rTorrent config"
}
},
"/api/rtorrent-config/reset": {
"post": {
"summary": "Reset startup rTorrent config overrides",
"description": "Clear pyTorrent-saved rTorrent config overrides and reload live rTorrent values.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RtorrentConfigResponse"
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"security": [
{
"sessionCookie": []
}
]
}
},
"/api/smart-queue": {
"get": {
"parameters": [
@@ -5827,6 +6289,123 @@
"summary": "Queue torrent action"
}
},
"/api/torrents/{torrent_hash}/chunks": {
"get": {
"summary": "Torrent chunks",
"parameters": [
{
"in": "path",
"name": "torrent_hash",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "max_cells",
"required": false,
"schema": {
"type": "integer",
"minimum": 64,
"maximum": 10000,
"default": 2048
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TorrentChunksResponse"
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"security": [
{
"sessionCookie": []
}
]
}
},
"/api/torrents/{torrent_hash}/chunks/{action_name}": {
"post": {
"summary": "Run torrent chunk action",
"parameters": [
{
"in": "path",
"name": "torrent_hash",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "action_name",
"required": true,
"schema": {
"type": "string",
"enum": [
"recheck",
"prioritize_files"
]
}
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TorrentChunkActionRequest"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TorrentChunkActionResponse"
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"security": [
{
"sessionCookie": []
}
]
}
},
"/api/torrents/{torrent_hash}/files": {
"get": {
"parameters": [