2022
...
There are various only few API Methods list which that are exposed for in this release , we . We will be adding more methods in the upcoming releases.
The SalesForceToFileSystem Api Code method method is the actual API call used to invoke the Api API Method so that the file from passed previous Salesforce objects gets downloaded to to the assigned file path of the FTP server. In order for This will enable an unregistered user to access this API method.
Click on SFToFTP url to try out the method
Title | SalesForceToFileSystem API |
---|---|
URL | The URL |
structure (path only, no root url) is v1/sftofilesystem.
|
| |
Method | The |
---|
request type is POST. | |
URL Params | N/A |
---|---|
Data Params | As the SalesForceToFileSystem is a post request, |
the body payload should be in |
the following format: { |
|
{ |
"username": |
"string", |
"password": |
"string", |
"securityToken": |
"string", |
"sessionId": |
"string", |
"endpointURL": |
"string" |
}, |
"targets": |
[ |
{ |
"host": |
"string", |
"port": |
"string", |
"filesystemType": |
"string", |
"username": |
"string", |
"password": |
"string", |
"folder": |
"string", |
"bucket": |
"string", |
"targetFileName": |
"string", |
"region": |
"string" |
|
], |
|
"string" |
Example As the SalesForceToFileSystem is a post request, The body payload should be in format below |
: { |
|
{ |
"username": |
"john@avankia.com", |
"password": |
"123456", |
"securityToken": |
" |
fbEw74CxeC8kcxLK2zUnAlcp3", |
"sessionId": |
"", |
"endpointURL": |
}, |
"targets": |
[ |
{ |
"host": |
" |
account.avankia.com", |
"port": |
"21", |
"filesystemType": |
"ftp", |
"username": |
"anil.b@avankia.com", |
"password": |
"123456", |
"folder": |
" |
testFiles", |
"bucket": |
"string", |
"targetFileName": |
"" |
"region": |
"" |
|
], |
|
"select |
Name,Body |
from |
attachment |
where |
id |
= |
'00P2800000lT3mq'" |
| |
Success Response | The status code on |
---|
success response should be 200. Example Code : 200 Response Body : [ |
Sampledata.txt", |
Sampledata.txt", |
Error Response |
---|
Endpoint may fail in many ways |
. Below are some of the known error |
response code and response body. Code 401 : |
Unauthorized access Code 403 : Forbidden error Example Code : |
401 Response Body : |
<!DOCTYPE html><html><head><title>Apache Tomcat/8.0.41 -
Error report</title><style type="text/css">H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}
A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;
}
</style> </head><body><h1>HTTP Status 403 - Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-CSRF-TOKEN'.</h1><div class="line"></div><p><b>type</b> Status report</p><p><b>message</b> <u>Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-CSRF-TOKEN'.</u></p><p><b>description</b> <u>Access to the specified resource has been forbidden.</u></p><hr class="line"><h3>Apache Tomcat/8.0.41</h3></body></html>
[ | |
Sample Call | Below is a sample call from the endpoint. This would make the API call more predictable to the reader. curl -X POST --header 'Content-Type: application/json' --header 'Accept: text/html' -d ' {
|
---|
"username":" |
john@avankia. |
com", |
@test123", |
account. |
avankia. |
com","port":"21", |
anil.b@avankia.com", |
123456", |
Name,Body |
from |
attachment |
where |
id |
= '00P2800000lT3mq"
|