The Data Exporter has a single configuration End Point which is used to hold SFTP details. These details are picked from the scheduling form so that configuration can be held in a single place, and passwords don't need to be entered into the form.
If you are not planning on exporting data via SFTP, this configuration can be left blank.
Namespace
The Configuration End Points article explains the principles of holding product configuration in End Points.
You should create configuration for each of your environments at
Example
There's an example configuration End Point at
Details
function(params, credentials) {
return {
sftpDetails: [{
"key": "first_sftp",
"display": "First SFTP",
"path": "transfer/myFolder",
"password": "password2",
"port": 22,
"host": "127.0.0.1",
"createFolder": "",
"user": "test"
},
{
"key": "second_sftp",
"display": "Second SFTP",
"path": "transfer/myFolder",
"password": "password2",
"port": 22,
"host": "127.0.0.1",
"createFolder": "",
"user": "test"
}
]
};
}
Each object in this array provides an option in the scheduling form drop-down:
They are:
Property | Description |
---|---|
key | A unique identifier for this configuration |
display | The display text for the drop-down field |
path | The path you enter should already exist on the SFTP host |
password | The SFTP password |
port | The port |
host | The host |
createFolder | If you enter a name here a new directory will be created with that name |
user | The SFTP username |