A web-based SFTP file browser that makes managing your server files easy!
SFTP Browser is still in development, but you can play with it at sftpbrowser.cybah.me. In addition to the web interface, there's a fully-built SFTP HTTP API that's used for interfacing with the origin server.
This line was written using the text file editor built into SFTP Browser!!
All API endpoints require a set of request headers for connecting to the target server:
sftp-host
: The hostname of the serversftp-port
: The port of the serversftp-username
: The username to log intosftp-password
: The password, if using password authenticationsftp-key
: The private key, if using public key authenticationAll API responses are in JSON format and include a boolean success
property. This is true
if no errors were encountered, or false
otherwise. If an error was encountered, a string error
property is included, which contains an error description.
Successful response example:
{
"success": true,
"...": "..."
}
Failed response example:
{
"success": false,
"error": "[error description]",
"...": "..."
}
Failed responses will always use a 400 or 500 level HTTP status code.
Endpoint: GET /api/sftp/directories/list
path
: The target directory pathdirsOnly
: If true
, only directories will be returnedpath
: The normalized pathlist
: An array of file objects
list[].name
: The name of this filelist[].accessTime
: A timestamp representing the last access time of this filelist[].modifyTime
: A timestamp representing the last modification time of this filelist[].size
: The size, in bytes, of this filelist[].type
: A 1-character string representing the type of this filelist[].group
: The ID of the group this file belongs tolist[].owner
: The ID of the user this file belongs tolist[].rights
: Permissions for this file
list[].rights.user
: Contains some arrangement of r
, w
, and x
, representing the permissions the owner has for this file.list[].rights.group
: Contains some arrangement of r
, w
, and x
, representing the permissions the group has for this file.list[].rights.other
: Contains some arrangement of r
, w
, and x
, representing the permissions everyone else has for this file.list[].longname
: The raw SFTP output representing this fileEndpoint: POST /api/sftp/directories/create
path
: The new directory pathpath
: The normalized pathEndpoint: DELETE /api/sftp/directories/delete
path
: The path of the directory to deletepath
: The normalized pathEndpoint: GET /api/sftp/files/exists
path
: The path to checkpath
: The normalized pathexists
: true
if the path exists, false
otherwisetype
: If the file exists, this is its type character. If it doesn't exist, this is false
.Endpoint: GET /api/sftp/files/stat
path
: The path to statpath
: The normalized pathstats
: The stats for the file
accessTime
: The time the file was last accessedmodifyTime
: The time the file was last modifiedsize
: The size of the fileuid
: The ID of the file's ownergid
: The ID of the file's groupmode
: An integer representing the file's type and permissionsisBlockDevice
: true
if the file is a block device, false
otherwiseisCharacterDevice
: true
if the file is a character, false
otherwiseisDirectory
: true
if the file is a directory, false
otherwiseisFIFO
: true
if the file is a first-in first-out file, false
otherwiseisSocket
: true
if the file is a socket, false
otherwiseisSymbolicLink
: true
if the file is a symlink, false
otherwiseEndpoint: GET /api/sftp/files/get/single
path
: The path of the fileThe raw file data
An error response in JSON
Gets a temporary URL to download a single file without the need for connection headers. These URLs last 24 hours or until the server is restarted.
Endpoint: GET /api/sftp/files/get/single/url
path
: The path of the filepath
: The normalized pathdownload_url
: The resulting download URLGets a temporary URL for downloading a set of files and directories as a zip archive without the need for connection headers.
Endpoint: GET /api/sftp/files/get/multi
paths
: A JSON-formatted array of file or directory pathspath
: The normalized pathdownload_url
: The resulting download URLEndpoint: POST /api/sftp/files/create
path
: The path of the new fileThe raw data to insert into the new file
path
: The normalized pathEndpoint: PUT /api/sftp/files/append
path
: The path of the fileThe raw data to append to the file
path
: The normalized pathEndpoint: PUT /api/sftp/files/move
pathOld
: The current pathpathNew
: The new pathpathOld
: The normalized old pathpathNew
: The normalized new pathDirectories not supported.
Endpoint: PUT /api/sftp/files/copy
pathSrc
: The source pathpathDest
: The destination pathpathSrc
: The normalized source pathpathDest
: The normalized destination pathDirectories are supported, but with no recursion.
Endpoint: PUT /api/sftp/files/chmod
path
: The path of the filemode
: The new mode to apply, in the form of xyz
, where x
, y
, and z
are integers from 0 to 7path
: The normalized pathmode
: The mode that was suppliedEndpoint: DELETE /api/sftp/files/delete
path
: The path of the filepath
: The normalized path