GET/dumpdata

Dump data

Exports all SFTPGo data (users, folders, admins, etc.) as a provider-independent JSON backup. The backup can either be saved to a file on the server (to avoid exposing sensitive data over the network) or returned directly in the response body. The output can be imported via the loaddata API

4 parameters
output-filestringoptional
Path for the file to write the JSON serialized data to. This path is relative to the configured "backups_path". If this file already exists it will be overwritten. To return the backup as response body set `output_data` to true instead.
output-dataintegeroptional
output data: * `0` or any other value != 1, the backup will be saved to a file on the server, `output_file` is required * `1` the backup will be returned as response body
Allowed:01
indentintegeroptional
indent: * `0` no indentation. This is the default * `1` format the output JSON
Allowed:01
scopesarray<string>optional
You can limit the dump contents to the specified scopes. Empty or missing means any supported scope. Scopes must be specified comma separated

6 status codes
200successful operation
errorstringoptional
error description if any
messagestringoptional
message, can be empty
400Bad Request
errorstringoptional
error description if any
messagestringoptional
message, can be empty
401Unauthorized
errorstringoptional
error description if any
messagestringoptional
message, can be empty
403Forbidden
errorstringoptional
error description if any
messagestringoptional
message, can be empty
500Internal Server Error
errorstringoptional
error description if any
messagestringoptional
message, can be empty
defaultUnexpected Error
errorstringoptional
error description if any
messagestringoptional
message, can be empty

Error handling

A 400 is returned: Bad Request. A 401 is returned: Unauthorized. A 403 is returned: Forbidden. A 500 is returned: Internal Server Error. Any other status is an error: Unexpected Error.