Download file version content
GET
vaults/{vaultId}/file-versions/{id}/content
Retrieve the content of a specific file version. Supports both full file download as well as partial content via range requests.
Resource Information
Method and URI | GET /AutodeskDM/Services/api/vault/v2/vaults/{vaultId}/file-versions/{id}/content |
Authentication Context | user context required |
Required OAuth Scopes | No scopes required |
Data Format | JSON |
Request
Headers
Authorization* string | Must be Bearer <token> , where <token> is obtained via a three-legged OAuth flow. |
Range string | Request only part of the file content, e.g. bytes=0-999 |
* Required
Request
URI Parameters
vaultId string | The unique identifier of a vault. |
id string | The unique identifier of a file version. |
Request
Query String Parameters
allowSync boolean | In a multi-site environment, this field tells if the file should be synched to the local site.
|
wmSrcItemVerId string | When current file is a dwf associated to an Item, to download its watermarked version, supply this Item Version’s id as the watermark source. |
wmSrcFileVerId string | When current file is a dwf associated to an Item, directly or as a CAD file’s visualization attachment, to download its watermarked version, supply this File Version’s id or its CAD File Version’s id as the watermark source. |
contentDisposition string | Specify the content disposition of the response header. Pass in ‘inline’ to allow the file to be displayed inside the web page; ‘attachment’ or null to save the file. Other values would be directly used as it is, but the behavior can’t be guaranteed. |
Response
HTTP Status Code Summary
200 OK | Successful response for full file download |
206 | Successful response for partial content (range request) |
400 Bad Request | The server was unable to process the request. The syntax of the request is malformed or the request is missing a required header. Do not repeat the request without fixing the issue. The response body may indicate what is wrong with the request. |
401 Unauthorized | The supplied authorization header was not valid or the supplied token scope was not acceptable. Verify authentication and try again. |
403 Forbidden | The request was successfully validated but lacking the required permissions. Verify your credentials and permissions before you send this request again. |
404 Not Found | The requested resource was not found. |
416 | Range Not Satisfiable |
Response
Header (200)
Accept-Ranges string | Indicates server support for range requests. Always set to ‘bytes’. |
Content-Type string | Indicates the media type of the resource. |
Content-Length integer | Total size of the resource in bytes. |
Response
Header (206)
Accept-Ranges string | Indicates server support for range requests. Always set to ‘bytes’. |
Content-Type string | Indicates the media type of the resource. |
Content-Length integer | Total size of the resource in bytes. |
Content-Range string | Only used in partial responses. Indicates the range of bytes being sent and the total size of the resource. |
Response
Body Structure (200)
Response for 200 has no body.
Response
Body Structure (206)
Response for 206 has no body.
Example
This example illustrates how to download contents of a file version.
Note: {VaultServerAddress}
is used as a placeholder in the example(s) and could represent one of the following:
- Vault Server IP address or hostname. Ex: http://10.41.110.49.
- Vault Gateway URL if gateway is configured. Ex: https://test.vg.autodesk.com.
Request
curl -v '{VaultServerAddress}/AutodeskDM/Services/api/vault/v2/vaults/117/file-versions/43/content' \
-X 'GET' \
-H 'Accept: */*'\
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a...'
Response
File binary is returned in the response body.