Sample APIs
This section covers the details of the sample APIs to handle binary content in microservices. The following table has the operation ID and the implementation class mapped with the operationId.
|
OperationId |
Method |
Implementation |
|---|---|---|
|
FileUpload |
POST |
com.temenos.microservice.payments.function.FileUploadImpl |
|
FileDownload |
GET |
com.temenos.microservice.payments.function.FileDownloadImpl |
Understanding FileUpload Operation ID
It is used to upload the binary content along with payload JSON. The binary content stored in the specific folder defined in the yml file. Binary content type and filename are stored in the ms_file_upload table. Payload content is stored in the documentdetails table.
|
Content-Type |
multipart/form-data |
|
documentDetails |
{"documentId": "string","documentName": "string"}
|
|
documentFile |
Choose file |
|
URI |
/payments/upload |
|
Sample-Response |
{
|
Understanding FileDownload Operation ID
It is used to get the binary content from the specified folder defined in the yml file.
|
Path-Param |
fileName |
|
URI |
/payments/download/{fileName} |
|
Response |
File downloaded |
In this topic