Symptom
After uploading the attachment using the Document Service API, how to use the Document Service API to retrieve the PreSigned URL?
Environment
SAP Sales and Service Cloud Version 2
Reproducing the Issue
- Upload a document into V2 using the Document Service API.
- Attempt to view the uploaded document using the "GET" method.
- Observe that this returns "MetaData" from the API response.
- Attempt to use "/content" or "/$value" and observe that neither the content nor the 'Presigned URL' is returned.
Resolution
To access the contents of the uploaded document. Using the download API call provided by document-service.
Make a request to the following endpoint:
<tenant-url>/sap/c4c/api/v1/document-service/documents/<document-id>/download
The S3 URL will be received in response, which can be used to view or download the attachment.
See Also
Keywords
Document Service; Document Service API; SAP Sales Cloud V2; SAP Service Cloud V2; Attachment; API; , KBA , CEC-CRM-DOS , Document Service for SAP Sales/Service Cloud , How To