Document Storage
| Name | Description | Introduced In |
|---|---|---|
| searchDocument | Searches for a document stored in the Document Management System (DMS) based on the referenceId, userId, documentName, fileInfo, version, or category provided by the user. | 2021.01 |
| uploadDocument | Uploads and stores the document in the Data Management System. | 2021.01 |
| downloadDocument | Downloads the document from the Data Management System. | 2021.01 |
| deleteDocument | Deletes the document stored in the Data Management System. | 2021.01 |
| Description: | Searches for a document stored in the Document Management System (DMS) based on the referenceId, userId, documentName, fileInfo, version, or category provided by the user. | |||||
| Method: | POST | |||||
| Security Level: | Public | |||||
| URL: | {BASE_URL}/services/data/v1/DocumentStorageObjects/operations/DocumentStorage/searchDocument | |||||
| Header Request: |
X-Kony-Authorization X-Kony-ReportingParams |
|||||
| Body Request: |
Parameters refernceId Specifies the reference ID against which the document has been uploaded. documentName Specifies the name of the document. userId Specifies the unique ID of the user who uploaded the document. version Specifies the document version. category Specifies the category to which the document belongs. fileInfo Specifies a JSON object that contains details about the file.
{
"refernceId":"12088",
"documentName":"three.pdf",
"userId":"8689120907",
"version":"1.0",
"category":"payment",
"fileInfo":"{'size': '1911Bytes','type': 'pdf'}"
}
|
|||||
| Response: |
Parameters\ /documentsList Specifies an array of document details in a JSON object. {
"documentsList": "[{\"documentName\":\"three.pdf\",\"documentId\":\"a6d7618b-5d89-4fff-875f-dbe6a16487a2\",\"fileInfo\":\"{'size':'1911Bytes','type':'pdf'}\"}]",
"opstatus": 0,
"httpStatusCode": 200
}
Error Response {
"opstatus": -1,
"httpStatusCode": 500,
"errmsg": "Internal Error"
}
|
|||||
| Service Flow: |
|
| Description: | Uploads and stores the document in the Data Management System. | |||||
| Method: | POST | |||||
| Security Level: | Public | |||||
| URL: | {BASE_URL}/services/data/v1/DocumentStorageObjects/operations/DocumentStorage/uploadDocument | |||||
| Header Request: |
X-Kony-Authorization X-Kony-ReportingParams |
|||||
| Body Request: |
Parameters content Specifies the valid Base64 encoded document content. documentName Specifies the name of the document. userId Specifies the unique ID of the user who uploaded the document. version Specifies the document version. refernceId Specifies the reference ID against which the document has been uploaded. category Specifies the category to which the document belongs. {
"content":" JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nK0aTYssN+7ev6LOgem15I……",
"documentName": "yoyoyo.pdf",
"userId": "8689120907",
"version": "1.0",
"referenceId": "26544",
"category": "payment"
}
|
|||||
| Response: |
Parameters\ /documentsId Specifies the unique ID of the uploaded document. /message Specifies the status message for the uploaded document. {
"opstatus": 0,
"documentId": "97c5a2a5-692d-4c28-b945-4ce4383728aa",
"message": "Document uploaded successfully",
"httpStatusCode": 200
}
Error Response {
"opstatus": -1,
"message": "Document upload failed",
"httpStatusCode": 500
}
|
|||||
| Service Flow: |
|
| Description: | Downloads the document from the Data Management System. | |||||
| Method: | POST | |||||
| Security Level: | Public | |||||
| URL: | {BASE_URL}/services/data/v1/DocumentStorageObjects/operations/DocumentStorage/downloadDocument | |||||
| Header Request: |
X-Kony-Authorization X-Kony-ReportingParams |
|||||
| Body Request: |
Parameters documentId Specifies the unique ID of the document that is to be downloaded. This ID gets generated when the document is uploaded to the DMS. {
"documentId":"97c5a2a5-692d-4c28-b945-4ce4383728aa
}
|
|||||
| Response: |
Parameters\ /documentName Specifies the name of the document. /documentContent Specifies the valid Base64 encoded document content that is downloaded. {
"documentName": "three.pdf",
"documentContent":"JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgM
CBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nK0aTYssN+7ev6LOgem15I……",
"opstatus": 0,
"httpStatusCode": 200
}
Error Response {
"opstatus": -1,
"httpStatusCode": 500
}
|
|||||
| Service Flow: |
|
| Description: | Deletes the document stored in the Data Management System. | |||||
| Method: | DELETE | |||||
| Security Level: | Public | |||||
| URL: | {BASE_URL}/services/data/v1/DocumentStorageObjects/operations/DocumentStorage/deleteDocument | |||||
| Header Request: |
X-Kony-Authorization X-Kony-ReportingParams |
|||||
| Body Request: |
Parameters documentId Specifies the unique ID of the document that must be deleted. This ID gets generated when the document is uploaded to the DMS. {
"documentId":"97c5a2a5-692d-4c28-b945-4ce4383728aa
}
|
|||||
| Response: |
Parameters\ /documentId Specifies the unique ID of the document is deleted deleted. {
"documentName": "three.pdf",
"documentContent":"JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgM
CBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nK0aTYssN+7ev6LOgem15I……",
"opstatus": 0,
"httpStatusCode": 200
}
Error Response {
"opstatus": -1,
"httpStatusCode": 500
}
|
|||||
| Service Flow: |
|
In this topic