FTP Server
To allow our servers to download files directly from an FTP server, the following parameters to send the request are available:
Field | Description | Required | Default |
---|---|---|---|
input.type | Specifies the type of the input. For cloud storage always use cloud. | Yes | N/A |
input.source | Tells our servers which cloud storage provider must be contacted, in this case ftp. | Yes | N/A |
input.parameters.host | The URL or IP of the FTP server. | Yes | N/A |
input.parameters.file | Complete path to the file to download, e.g. `folder-ion-ftp/image.jpeg | Yes | N/A |
input.parameters.port | The port used to connect to the FTP server. | No | 21 |
input.credentials.username | The username of the FTP server account. | Yes | N/A |
input.credentials.password | The password of the FTP server account. | Yes | N/A |
POST /v2/jobs HTTP/1.1
Host: api.api2convert.com
x-oc-api-key: <your API key here>
Content-Type: application/json
Cache-Control: no-cache
{
"conversion": [{
"target": "png"
}],
"input": [{
"type": "cloud",
"source": "ftp",
"parameters": {
"host": "host of your FTP server",
"file": "the complete path to the file"
},
"credentials": {
"username": "username",
"password": "password"
}
}]
}
curl -X POST \
https://api.api2convert.com/v2/jobs \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'x-oc-api-key: <your API key here>' \
-d '{
"conversion": [{
"target": "png"
}],
"input": [{
"type": "cloud",
"source": "ftp",
"parameters": {
"host": "host of your FTP server",
"file": "the complete path to the file"
},
"credentials": {
"username": "username",
"password": "password"
}
}]
}'
User suggested filenames
Filenames can be specified as described in the section for remote inputs