Vollständige Schnittstelle für Server-Skripte, Drittanwendungen, Backups und externe Tools.
Senden Sie Ihren API-Token als Bearer-Token im Authorization-Header oder als Parameter ?api_token=...
Listet Ordnerinhalte mit Metadaten (Größe, Typ, mtime, Rechte) auf.
| Feld | Typ | Status | Beschreibung |
|---|---|---|---|
| path | string | Optional | Relativer Verzeichnispfad (Standard: Stammverzeichnis) |
| show_hidden | bool | Optional | Versteckte Dotfiles (.env, .git) anzeigen |
curl -H "Authorization: Bearer fm_live_..." "https://fm.docotec.de/api.php?action=list&path=src"
Erstellt eine neue leere Datei oder einen neuen Ordner.
| Feld | Typ | Status | Beschreibung |
|---|---|---|---|
| target_dir | string | Optional | Zielordner |
| name | string | Pflicht | Name des Elements |
| type | string | Pflicht | 'file' oder 'folder' |
curl -X POST -H "Authorization: Bearer fm_live_..." -H "Content-Type: application/json" -d '{"target_dir":"","name":"neu.txt","type":"file"}' "https://fm.docotec.de/api.php?action=create"
Liest den Dateiinhalt einer Code- oder Textdatei aus.
| Feld | Typ | Status | Beschreibung |
|---|---|---|---|
| path | string | Pflicht | Relativer Dateipfad |
curl -H "Authorization: Bearer fm_live_..." "https://fm.docotec.de/api.php?action=read_content&path=config.php"
Speichert Dateiinhalt und erzeugt automatisch einen SQLite-Versionssnapshot.
| Feld | Typ | Status | Beschreibung |
|---|---|---|---|
| path | string | Pflicht | Relativer Dateipfad |
| content | string | Pflicht | Neuer Dateiinhalt |
| summary | string | Optional | Beschreibung der Änderung |
curl -X POST -H "Authorization: Bearer fm_live_..." -H "Content-Type: application/json" -d '{"path":"script.js","content":"console.log('v2');","summary":"Update via API"}' "https://fm.docotec.de/api.php?action=write_content"
Gibt alle gespeicherten Snapshots einer Datei chronologisch zurück.
| Feld | Typ | Status | Beschreibung |
|---|---|---|---|
| path | string | Pflicht | Dateipfad |
curl -H "Authorization: Bearer fm_live_..." "https://fm.docotec.de/api.php?action=history_list&path=script.js"
Setzt eine Datei auf einen früheren Snapshot-Stand zurück.
| Feld | Typ | Status | Beschreibung |
|---|---|---|---|
| snapshot_id | integer | Pflicht | ID des Ziel-Snapshots |
curl -X POST -H "Authorization: Bearer fm_live_..." -H "Content-Type: application/json" -d '{"snapshot_id":42}' "https://fm.docotec.de/api.php?action=history_rollback"
Startet den direkten Download einer Web-URL auf den Server.
| Feld | Typ | Status | Beschreibung |
|---|---|---|---|
| url | string | Pflicht | Web-URL (HTTP/HTTPS) |
| target_dir | string | Optional | Zielordner |
| filename | string | Optional | Optionaler Wunsch-Dateiname |
curl -X POST -H "Authorization: Bearer fm_live_..." -H "Content-Type: application/json" -d '{"url":"https://example.com/file.zip","target_dir":""}' "https://fm.docotec.de/api.php?action=remote_download"
Rekursive Volltext-Inhaltssuche in Text- und Code-Dateien mit Regex.
| Feld | Typ | Status | Beschreibung |
|---|---|---|---|
| query | string | Pflicht | Suchbegriff oder Regex |
| path | string | Optional | Startverzeichnis |
| is_regex | bool | Optional | Als regulären Ausdruck ausführen |
| case_sensitive | bool | Optional | Groß-/Kleinschreibung beachten |
curl -X POST -H "Authorization: Bearer fm_live_..." -H "Content-Type: application/json" -d '{"query":"function Database","path":""}' "https://fm.docotec.de/api.php?action=search_content"
Gibt Server-Metriken, installierte CLI-Tools (ffmpeg, yt-dlp, 7z) und PHP-Limits zurück.
curl -H "Authorization: Bearer fm_live_..." "https://fm.docotec.de/api.php?action=system_info"
Prüft, ob die Web-Terminal-Sitzung entsperrt ist, und liefert Prompt und Arbeitsverzeichnis.
curl "https://fm.docotec.de/api.php?action=terminal_status"
Authentifiziert die Web-Terminal-Sitzung mit dem Admin-Passwort.
| Feld | Typ | Status | Beschreibung |
|---|---|---|---|
| password | string | Pflicht | Admin-Passwort |
curl -X POST -H "Content-Type: application/json" -d '{"password":"..."}' "https://fm.docotec.de/api.php?action=terminal_login"
Führt einen Shell-Befehl (z.B. git, composer, ls) in der authentifizierten Terminal-Sitzung aus.
| Feld | Typ | Status | Beschreibung |
|---|---|---|---|
| command | string | Pflicht | Shell-Befehl |
curl -X POST -H "Content-Type: application/json" -d '{"command":"ls -la"}' "https://fm.docotec.de/api.php?action=terminal_exec"
Beendet und sperrt die aktive Web-Terminal-Sitzung.
curl "https://fm.docotec.de/api.php?action=terminal_logout"