API referenceSections

Files, FTP and permissions

31 operations. Open one for its parameters, request body, responses and examples.

MethodPathSummary
GET/api/v1/tenants/{tid}/sites/{id}/filesList a directory; links are shown and never followed
POST/api/v1/tenants/{tid}/sites/{id}/files/accessSet what the site's code may do in a folder - read, write, or nothing (ADR 0034)
POST/api/v1/tenants/{tid}/sites/{id}/files/compressZip entries of one folder; never replaces an existing file
GET/api/v1/tenants/{tid}/sites/{id}/files/contentDownload a file; always sent as an attachment
PUT/api/v1/tenants/{tid}/sites/{id}/files/contentUpload a file; it appears complete or not at all
POST/api/v1/tenants/{tid}/sites/{id}/files/copyCopy a file or folder inside the site; nothing is replaced
POST/api/v1/tenants/{tid}/sites/{id}/files/deleteDelete a file or folder; a link is removed, its target is not
POST/api/v1/tenants/{tid}/sites/{id}/files/extractUnpack a zip, all or nothing; never replaces existing entries
POST/api/v1/tenants/{tid}/sites/{id}/files/mkdirCreate a folder
POST/api/v1/tenants/{tid}/sites/{id}/files/renameMove an entry; never replaces an existing one
GET/api/v1/tenants/{tid}/sites/{id}/files/searchFind entries by name below a folder
GET/api/v1/tenants/{tid}/sites/{id}/files/trashDeleted 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}/restorePut an item back; never replaces what is there now
POST/api/v1/tenants/{tid}/sites/{id}/files/writableLet the site's own code change a folder, or stop it
GET/api/v1/tenants/{tid}/sites/{id}/ftpThe site's FTPS/SFTP accounts and how to connect (ADR 0040)
POST/api/v1/tenants/{tid}/sites/{id}/ftpAdd 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}/permissionsScan the site's own access levels and offer permission presets (ADR 0108)
POST/api/v1/tenants/{tid}/sites/{id}/permissions/applyApply the previewed plan (409 PRESET_STALE if the site changed since)
POST/api/v1/tenants/{tid}/sites/{id}/permissions/previewExactly what a preset would change now
POST/api/v1/tenants/{tid}/sites/{id}/permissions/undoPut back what the latest preset changed, where not changed again since
GET/api/v1/tenants/{tid}/sites/{id}/protected-dirsPassword-protected folders of a site (ADR 0109)
POST/api/v1/tenants/{tid}/sites/{id}/protected-dirsProtect 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}/usersAdd 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}/webdeployTurn Web Deploy publishing on (again, with a new password) or off for the site (ADR 0089)
GET/api/v1/tenants/{tid}/sites/{id}/webdeploy/publishsettingsThe site's .publishsettings file for Visual Studio; it holds the password, so it needs site.write