This endpoint directly downloads the contents of a file (under 4 MB).
This endpoint can be used to directly download a file under 4 MB.
Note: This does not support downloading objects of type folder or link.
The request to download a file can look like this:
curl --request GET https://api-beta.copilot.com/v1/files/12345/download \ --header 'X-API-KEY: 456XYZ123' \ --header 'accept: application/json' \ -o 'filename.txt'
The file will be downloaded and named
filename.txt in your working directory.
In order to download files larger than 4 MB, you can get a downloadable URL by using the Retrieve Download URL of a File endpoint.