This endpoint allows you to download the files that have been uploaded by you.
In order to use this download endpoint:
- Create a Get request to the method’s /files/[fileId] URI and add the query parameter role=publisher
- Add the HTTP header Accept=application/octet-stream
Example - Download Request
GET https://fileapi.youforce.com/v1.0/files/[fileId]?role=publisher
Example - Download uploaded file. This example shows how to download a file that was uploaded by you using the Sandbox Tenant
GET v1.0/files/d92ffb21-7938-488b-a405-bcbc9e0a9696
?role=publisher
HTTP/1.1
Host: fileapi.youforce.com
Authorization: Bearer xxxxxxxxx
Accept: application/octet-stream
If the request succeeds, the response includes a 200 OK HTTP status code, along with the bytes of the file.
Example - Successful response of Download uploaded File
HTTP/1.1 200
<root>
<company>Visma Raet</company>
<product>File API</product>
<content>Sample File</content>
</root>