GET /v1/spaces/:space_id/documents/:id/download
HTTP Verb: GET
Available statuses: 302 Found, 404 Not Found
Object: Document
Location: n/a
Formats: XML, JSON
Get the file for a document
Note: If the library that you are using for HTTP requests does not automatically follow redirects, you will have to make one more request to the URL from Location header; otherwise, the library will perform this request automatically.
Params
No params available
Examples
Request JSON, using cURL utility:
curl -i -H "Authorization: Bearer _token" https://api.assembla.com/v1/spaces/_space_id/documents/_id/download.json
Response
HTTP/1.1 302 Found
Date: Tue, 16 Dec 2014 13:40:33 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-cache
Location: https://prod-eu-west-1-assemblafiles.s3.amazonaws.com:443/0fe86c/b6nRoCPC0r2Oq0aaeP0Qfc/a--yXkzC0r5iRcacwqEsg8_1?response-content-disposition=inline%3B%20filename%3D%22Portfolio_SpacePermissionSort2.png%22%3B%20filename%2A%3DUTF-8%27%27Portfolio_SpacePermissionSort2.png
Status: 302 Found
Server: cloudflare-nginx
...
Request XML, using cURL utility:
curl -i -H "Authorization: Bearer _token" https://api.assembla.com/v1/spaces/_space_id/documents/_id/download.xml
Response
HTTP/1.1 302 Found
Date: Tue, 16 Dec 2014 13:40:33 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-cache
Location: https://prod-eu-west-1-assemblafiles.s3.amazonaws.com:443/0fe86c/b6nRoCPC0r2Oq0aaeP0Qfc/a--yXkzC0r5iRcacwqEsg8_1?response-content-disposition=inline%3B%20filename%3D%22Portfolio_SpacePermissionSort2.png%22%3B%20filename%2A%3DUTF-8%27%27Portfolio_SpacePermissionSort2.png
Status: 302 Found
Server: cloudflare-nginx
...
Make a request to the URL from Location header in order to download the file. Note: The link expires after a minute, so if you didn’t attempt to download the file within one minute after the request, please send another request to this endpoint.