# REST API: FileServices

> The 2 operations of the area FileServices, with parameters, bodies and responses.

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

Generated from the daemon's OpenAPI document. Conventions, sign-in, the CSRF header and the WebSocket are on [API](https://pithyx.org/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.

**Responses**

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

Any failure answers with problem details (`application/problem+json`) and a stable code from the [error reference](https://pithyx.org/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).

**Request body**: `application/json`: [FileServiceSettingsRequest](https://pithyx.org/docs/reference/api/schemas/#fileservicesettingsrequest)

**Responses**

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

Any failure answers with problem details (`application/problem+json`) and a stable code from the [error reference](https://pithyx.org/docs/reference/errors/).
