Files, FTP and permissions
31 operations. Open one for its parameters, request body, responses and examples.
| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/tenants/{tid}/sites/{id}/files | List a directory; links are shown and never followed |
| POST | /api/v1/tenants/{tid}/sites/{id}/files/access | Set what the site's code may do in a folder - read, write, or nothing (ADR 0034) |
| POST | /api/v1/tenants/{tid}/sites/{id}/files/compress | Zip entries of one folder; never replaces an existing file |
| GET | /api/v1/tenants/{tid}/sites/{id}/files/content | Download a file; always sent as an attachment |
| PUT | /api/v1/tenants/{tid}/sites/{id}/files/content | Upload a file; it appears complete or not at all |
| POST | /api/v1/tenants/{tid}/sites/{id}/files/copy | Copy a file or folder inside the site; nothing is replaced |
| POST | /api/v1/tenants/{tid}/sites/{id}/files/delete | Delete a file or folder; a link is removed, its target is not |
| POST | /api/v1/tenants/{tid}/sites/{id}/files/extract | Unpack a zip, all or nothing; never replaces existing entries |
| POST | /api/v1/tenants/{tid}/sites/{id}/files/mkdir | Create a folder |
| POST | /api/v1/tenants/{tid}/sites/{id}/files/rename | Move an entry; never replaces an existing one |
| GET | /api/v1/tenants/{tid}/sites/{id}/files/search | Find entries by name below a folder |
| GET | /api/v1/tenants/{tid}/sites/{id}/files/trash | Deleted items, kept for 30 days |
| DELETE | /api/v1/tenants/{tid}/sites/{id}/files/trash/{item} | Remove an item for good |
| POST | /api/v1/tenants/{tid}/sites/{id}/files/trash/{item}/restore | Put an item back; never replaces what is there now |
| POST | /api/v1/tenants/{tid}/sites/{id}/files/writable | Let the site's own code change a folder, or stop it |
| GET | /api/v1/tenants/{tid}/sites/{id}/ftp | The site's FTPS/SFTP accounts and how to connect (ADR 0040) |
| POST | /api/v1/tenants/{tid}/sites/{id}/ftp | Add an FTP account; the password is hashed and never returned |
| PUT | /api/v1/tenants/{tid}/sites/{id}/ftp/{fid} | Change an FTP account's folder, access, state or password (empty keeps it) |
| DELETE | /api/v1/tenants/{tid}/sites/{id}/ftp/{fid} | Remove an FTP account |
| GET | /api/v1/tenants/{tid}/sites/{id}/permissions | Scan the site's own access levels and offer permission presets (ADR 0108) |
| POST | /api/v1/tenants/{tid}/sites/{id}/permissions/apply | Apply the previewed plan (409 PRESET_STALE if the site changed since) |
| POST | /api/v1/tenants/{tid}/sites/{id}/permissions/preview | Exactly what a preset would change now |
| POST | /api/v1/tenants/{tid}/sites/{id}/permissions/undo | Put back what the latest preset changed, where not changed again since |
| GET | /api/v1/tenants/{tid}/sites/{id}/protected-dirs | Password-protected folders of a site (ADR 0109) |
| POST | /api/v1/tenants/{tid}/sites/{id}/protected-dirs | Protect a folder; the server applies it before it is saved |
| DELETE | /api/v1/tenants/{tid}/sites/{id}/protected-dirs/{dir} | Stop protecting a folder |
| POST | /api/v1/tenants/{tid}/sites/{id}/protected-dirs/{dir}/users | Add a user (the password is hashed by the panel and never kept) |
| PUT | /api/v1/tenants/{tid}/sites/{id}/protected-dirs/{dir}/users/{user} | Change a user's password |
| DELETE | /api/v1/tenants/{tid}/sites/{id}/protected-dirs/{dir}/users/{user} | Remove a user |
| PUT | /api/v1/tenants/{tid}/sites/{id}/webdeploy | Turn Web Deploy publishing on (again, with a new password) or off for the site (ADR 0089) |
| GET | /api/v1/tenants/{tid}/sites/{id}/webdeploy/publishsettings | The site's .publishsettings file for Visual Studio; it holds the password, so it needs site.write |