🚀Getting started
Getting started is straightforward:
Create an account on https://sftpoverhttp.com
Click "Connections" in the top navigation
Click "+ Connection"
Enter the Connection information for the target SFTP server
Create the Connection (a test operation will be performed to verify the connection information is correct)
A dialog will appear prompting you to create an API Key
Create an API Key and store it securely, it will not be displayed again
With a valid Connection in place and the provided API Key SFTP operation can be performed by making HTTP requests to your connection's endpoint.
fetch("http://api.sftpoverhttp.com/<connection_slug>/write", {
method: "POST",
type: "application/json",
body: "{ "path": "sample.txt", "file": { "text": "Content..." }}",
headers: {
authorization: "Bearer <api_key>"
}
}API Conventions
SFTP over HTTP follows common http api conventions. An OpenAPI specification is published at: https://secure.sftpoverhttp.com/swagger.json
Endpoint paths use the following pattern:
http://api.sftpoverhttp.com/<connection_slug>/<command_name>/Successful responses return with a 200 status code. The response body will be structured like:
{ "<command_name>": <response> }If an error occurs while executing an SFTP command, the response will still include a 200 status code, but will also include an error key in the response body with details about the problem.
If an error occurs parsing the request or connecting to the SFTP server a 400 or 500 status code will be appropriately returned.
File handling
Last updated