edoc content services Guide
Breadcrumbs

Download a file

Method and endpoint

GET /Documents/{documentId}/download

You can use the method and the endpoint GET /Documents/{documentId}/download to download the file of a document from the destination system. The file is delivered as a FileStream. The file name (Filename), the content type (Content-Type) and the length of the content (Content-Length) are returned in the header of the response.

Example of a request

GET /Documents/762f8698-f605-4de5-89fb-6f5fff3435fd/download
Accept: application/octet-stream
ModuleId: sharepoint
ConnectionString: targetHost=https://test.sharepoint.com;User=MyUserName;Password=MyPassword;ListId=MyListId;

Example of a response (header)

content-disposition: attachment; filename=2022-01-06-15-48-12-060804_MyFile.txt; filename*=UTF-8''2022-01-06-15-48-12-060804_MyFile.txt
content-type: application/octet-stream
content-length: 101