# REST-API: FileServices

> Die 2 Operationen des Bereichs FileServices, mit Parametern, Bodys und Antworten.

Source: https://pithyx.org/de/docs/reference/api/fileservices/
Markdown: https://pithyx.org/de/docs/reference/api/fileservices.md

Erzeugt aus dem OpenAPI-Dokument des Daemons. Konventionen, Anmeldung, der CSRF-Header und der WebSocket stehen unter [API](https://pithyx.org/de/docs/developers/daemon/api/).

## GET /api/file-services

Administrators only. Whether SMB, SFTP, SSH logins, WebDAV and FTP are switched on, the SMB workgroup, how each service is doing, the FTP port, the FTPS certificate's fingerprint, whether the file services are limited to private networks and whether the firewall is applied here.

**Antworten**

- 200: `application/json`: [FileServiceSettings](https://pithyx.org/de/docs/reference/api/schemas/#fileservicesettings)

Jeder Fehler antwortet mit Problem Details (`application/problem+json`) und einem stabilen Code aus der [Fehlerreferenz](https://pithyx.org/de/docs/reference/errors/).

## PUT /api/file-services

Administrators only. Switches SMB, SFTP or SSH logins on or off and sets the SMB workgroup; the configuration is checked and applied before the answer. SSH logins give users with the SSH login right a shell. Switching SFTP or SSH logins off never stops sshd: it only stops letting Pithyx users in. WebDAV answers at /webdav/, FTP with TLS (FTPS), and without TLS only while plain FTP is allowed, at the users' own risk. The firewall opens only the ports of the switched-on services, optionally only to private networks (RFC 1918, ULA, link-local).

**Anfrage-Body**: `application/json`: [FileServiceSettingsRequest](https://pithyx.org/de/docs/reference/api/schemas/#fileservicesettingsrequest)

**Antworten**

- 200: `application/json`: [FileServiceSettings](https://pithyx.org/de/docs/reference/api/schemas/#fileservicesettings)

Jeder Fehler antwortet mit Problem Details (`application/problem+json`) und einem stabilen Code aus der [Fehlerreferenz](https://pithyx.org/de/docs/reference/errors/).
