SAP Knowledge Base Article - Public

3567599 - How to Retrieve PreSigned URL by using Document Service API

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

  1. Upload a document into V2 using the Document Service API.
  2. Attempt to view the uploaded document using the "GET" method.
  3. Observe that this returns "MetaData" from the API response.
  4. 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

Document Service API

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

Product

SAP Sales Cloud and SAP Service Cloud Version 2 all versions