Downloading Resource Information of the Document Type
Function
This interface is invoked to download the resource information of the document type based on the file ID.
Interface Prototype
|
Method |
POST |
|
|---|---|---|
|
URL |
https://{IP address}:{Port number}/service-cloud/rest/webadapter/v1/webadapterfacade/downloadDocument |
{IP address}:{Port number} indicates the IP address and port number of the NSLB exposed externally. |
|
Parameter |
Mandatory or Not |
Type |
Default Value |
Description |
|---|---|---|---|---|
|
Content-Type |
Yes |
String |
None |
The value is fixed at application/json; charset=UTF-8. |
|
Cookie |
Yes |
String |
None |
During page integration, the CC-Messaging writes the value of ccmessaging-token to browser cookies through the request response. When invoking this interface independently, ensure that the cookie in the request header contains ccmessaging-token=xxx, where xxx indicates the value of ccmessaging-token. |
Request Parameters
|
Parameter |
Mandatory or Not |
Type |
Description |
|---|---|---|---|
|
messageCode |
Yes |
String |
Message code corresponding to the document message. |
|
fileSuffix |
Yes |
String |
File name extension (file type), which can be pdf, doc, docx, zip, or gif. |
Response Parameters
|
Parameter |
Mandatory or Not |
Type |
Description |
|---|---|---|---|
|
resultCode |
Yes |
String |
Return code. The value 0 indicates success, the value 2 indicates invalid input parameters, and the value 13 indicates download failure. |
|
resultDesc |
No |
String |
Error description when the interface returns a failure response. |
|
fileStream |
No |
String |
Binary stream of the multimedia resource of the document type when the interface returns a success response. |
Example
- Request
POST /service-cloud/rest/webadapter/v1/webadapterfacade/downloadDocument host: 10.10.10.2:18446 connection: Keep-Alive x-forwarded-for: 10.10.10.3, 10.10.10.4 x-real-ip: 10.10.10.5 content-length: 401 remote-host: 10.10.10.6 user-agent: java/socket content-type: application/json; charset=utf-8 cookie: JSESSION*****#*#*****3 ccmessaging-token: ******** accept: */* { "messageCode": "b1060006-15c6-4a15-aea1-b310198e3e89", "fileSuffix": "zip" } - Response
{ "resultCode": "0", "fileStream": "XXXXXXXX" }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot