2022
Panel |
---|
What is REST API? |
The ApiCode distribution REST API provide programmatic access to read and write replication 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 by API management platform.
...
There are various API methods list which are exposed for this release , we will be adding more methods in the upcoming releases .
The ApiCpdeApicode-Distribution distribution is an API which is used to deploy ApiCode Apicode based rest services from a git repository to the underlying ApiServerApi management server.
The below tables explains the various model schema and attributes which form the model class
...
...
...
Parameter | Description DataType | Data Type | ||
---|---|---|---|---|
sfConfig apiCodeServerUsername(Optionaloptional) | The salesforce credentials which are required to connect to the salesforce instance | Salesforce | fsConfig username of the ApiCode server instance | string |
apiCodeServerPassword(optional) | The FTP server credentials which are required to connect to FTP server for downloading a file | FTP | queryToTheAttachment password of the ApiCode server instance | string |
environment(optional) | The salesfoce object to specify a file to be downloaded | String |
...
User has the flexibility to define his/her environment in which he wishes to deploy his code base | string |
...
...
Parameter | Description DataType | Data Type |
---|---|---|
username url(Requiredoptional) | The username git repository url of the salesforce instance user from which the user wishes to retrieve information from where the file to be downloaded he would like to deploy the code base | string |
password branch(Requiredoptional) | 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 branch inside of a repository from which the user wishes to deploy the code base | string |
username(optional) | Valid user name of the git repository | string |
password(optional) | Valid password of the git repository | string |
...
...
Below table gives the attribute list of the response class
Parameter | Description | Data type Status | ||
ServiceURL(optional) | The possible values are True and False which sends out the response value | String SubmitTime | ||
docURL(optional) | The API submitted time | Date CompletionTime | ||
SwaggerURL(optional) | The API Completion Time | Date ProcessID | ||
status(optional) | The process id which is sent by the API to identify the process | String | ||
callbackURL | <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="23c6dab7-e805-435e-b02b-dd79aadedd34"><ac:plain-text-body><![CDATA[ | errorMessage(optional) | The url is passed from the API | Array[string] |
...
...
]]></ac:plain-text-body></ac:structured-macro> |
...
...
Code Block |
---|
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"sfConfigappCodeServerUsername":{"username":""anil.b@mydbsync.com","passwordappCodeServerPassword":"dbsync2015","securityTokenenvironment":"dev","sessionIdurl":"","endpointURL":""}, "fsConfig":{"host":"","port":"","filesystemType":"","username":"https://sureshullagaddi@bitbucket.org/dbsync/amazons3.git","branch":"dev","username":"suresh.u@avankia.com","password":"suresh@12345","folder":""},"queryToTheAttachment":""}' 'https://apistaging.mydbsync.com:443/api/appcode/v1/sftofilesystemappcode-distribution/upsertFilegitCompile' |
...
...
Code Block |
---|
https://apistaging.mydbsync.com:443/api/appcode/v1/sftofilesystemappcode-distribution/upsertFilegitCompile |
Code Block |
---|
{ "error": "AppCode:sftofilesystemappcode-distribution does not exist, Please check your URL" } |
Code Block |
---|
200 |
Code Block |
---|
{ "access-control-allow-origin": "*","date": "MonFri, 2024 Feb 2017 1813:4423:54 GMT", "server": "Apache/2.4.25 (Amazon) OpenSSL/1.0.1k-fips", "connection": "Keep-Alive", "keep-alive": "timeout=5150, max=10092", "content-length": "7278", "content-type": "application/json" } |