FTS API Specification
An example shell script implementing these API calls can be found in Sample Public File Transfer Script for Planning Apps and Sample Public File Transfer Script for RI and AIF. The sample script will require all of the parameters discussed so far in this chapter to be added to it before it can be used to issue FTS commands. Refer to the table below for a more detailed list of services available in FTS.
Note:
ThebaseUrl in these examples is not the same as the BASE_URL variable passed into
cURL commands. The baseUrl for the API itself is the hostname and tenant, plus the service implementation
path (for example, RetailAppsPlatformServices). The sample scripts provided in the appendix show the full
path used by the API calls.
|
Ping |
Returns the status of the service, and provides an external health-check. |
|
Method |
GET |
|
Endpoint |
|
|
Parameters |
Common headers |
|
Request |
None |
|
Response |
The appStatus code follows HTTP return code standards. |
|
List Prefixes |
Returns a list of the known storage prefixes. These are analogous to directories, and are restricted to predefined choices per service. |
|
Method |
GET |
|
Endpoint |
|
|
Parameters |
Common headers |
|
Request |
None |
|
Response |
A JSON array of strings containing the known prefixes. |
|
List Files |
Returns a list of the file within a given storage prefix. |
|
Method |
GET |
|
Endpoint |
|
|
Parameters |
Common headers |
|
Request |
Query parameters
|
|
Response |
A JSON |
|
Move Files |
Moves one or more files between storage prefixes, while additionally allowing the name to be modified |
|
Method |
GET |
|
Endpoint |
|
|
Parameters |
Common headers |
|
Request |
An array of files containing the current and new storage prefixes and file names, as shown below. |
|
Response |
HTTP 200, request succeeded; HTTP 500, an error was encountered. |
|
Delete Files |
Deletes one more or files |
|
Method |
DELETE |
|
Endpoint |
|
|
Parameters |
Common headers |
|
Request |
A JSON array of files to be deleted. One or more pairs of |
|
Response |
A JSON array of each file deletion attempted and the result. |
|
Request Upload PAR |
Request PAR for uploading one or more files |
|
Method |
POST |
|
Endpoint |
|
|
Parameters |
Common headers |
|
Request |
A JSON array of files to be uploaded. One or more pairs of |
|
Response |
A |
|
Request Download PAR |
Request PARs for downloading one or more files |
|
Method |
POST |
|
Endpoint |
|
|
Parameters |
Common headers |
|
Request |
A JSON array of files to be downloaded. One or more pairs of storagePrefix and filenames can be specified within the array. |
|
Response |
A |