2022
Panel |
---|
What is REST API ? |
The REST API provide programmatic access to read and write application data. The REST API identifies the application and its users using OAUTH ; responses are available in json. We have used SWAGGER editor for the end users to make the API calls so that they can try out APIs exposed API management platform.
Click Here for accessing the CW-API management platform for unregistered user.
Checklist Before Getting Started
...
There are only few API Methods that are exposed in this release. 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.
The below tables explains the various model schema and attributes which form the model class
...
Parameter
...
Description
...
DataType
...
sfConfig (Optional)
...
The salesforce credentials which are required to connect to the salesforce instance
...
Salesforce
...
fsConfig (optional)
...
The FTP server credentials which are required to connect to FTP server for downloading a file
...
FTP
...
queryToTheAttachment (optional)
...
The salesfoce object to specify a file to be downloaded
...
String
...
Parameter
...
Description
...
DataType
...
username(Required)
...
The username of the salesforce instance from which the user wishes to retrieve information from where the file to be downloaded
...
string
...
password(Required)
...
The password of the salesforce instance
...
string
...
securityToken(Required)
...
A security Token is a case sensitive alpha numeric code that you append to the password or enter in a separate field in client application
...
string
...
sessionID(optional)
...
An Identifier for current user in the current context
...
string
...
endpointURL(Required)
...
The url to access the salesforce application
...
string
Parameter | Description | DataType |
---|---|---|
host(Required) | Hostname of ftp server | string |
port(Required) | port number of ftp server | string |
filesystemType | The possible supported FTP are Sftp, FTPS and plain FTP | string |
username(Required) | ftp server username | string |
password(Required) | ftp server password | string |
folder(Required) | path within ftp server to place the file | string |
Below table gives the attribute list of the response class
...
Parameter
...
Description
...
Data type
...
Status
...
The possible values are True and False which sends out the response value
...
String
...
SubmitTime
...
The API submitted time
...
Date
...
CompletionTime
...
The API Completion Time
...
Date
...
ProcessID
...
The process id which is sent by the API to identify the process
...
String
...
callbackURL
...
The url is passed from the API
...
string
...
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", { "host": "string", ], Example As the SalesForceToFileSystem is a post request, The body payload should be in format below: { |
Success Response | The status code on success response should be 200. Example Code : 200 Response Body : [ |
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 : [ |
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 ' {
|
...
|
...
targets":[{
|
...
...
Code Block |
---|
https://api.mydbsync.com:443/api/appcode/v1/sftofilesystem/upsertFile
|
Code Block |
---|
{
"error": "AppCode:sftofilesystem does not exist, Please check your URL"
}
|
Code Block |
---|
200
|
Code Block |
---|
{
"date": "Mon, 20 Feb 2017 18:44:54 GMT",
"server": "Apache/2.4.25 (Amazon) OpenSSL/1.0.1k-fips",
"connection": "Keep-Alive",
"keep-alive": "timeout=5, max=100",
"content-length": "72",
"content-type": "application/json"
}
|