Request

Response

    Download File Version Content
    GET

    vaults/{vaultId}/file-versions/{id}/content

    Retrieves 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 a three-legged access token obtained via an Authorization Code flow or a Secure Service Account (SSA) flow.

    The SSA flow is designed for headless server-to-server operations. While it functions like a two-legged flow (no user interaction), it is classified as three-legged because it preserves user context.

    Range
    string
    The byte range to request when only a portion of the file content is needed. Example: bytes=0-999.
    * Required

    Request

    URI Parameters

    vaultId
    string
    The unique identifier of a Knowledge 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 synced to the local site.

    true: File is not on the local site, it will be copied to the local site.

    false: (Default) File is not copied to the local site.

    wmSrcItemVerId
    string
    The item version ID to use as the watermark source. Supply this when the current file is a DWF associated with an Item and you want to download its watermarked version.
    wmSrcFileVerId
    string
    The file version ID (or CAD file version ID) to use as the watermark source. Supply this when the current file is a DWF associated with an Item, either directly or as a CAD file’s visualization attachment, and you want to download its watermarked version.
    contentDisposition
    string
    The Content-Disposition header value to apply to the response.
    • inline: The file is displayed inside the web page.
    • attachment (or null): The file is saved as a download.

    Any other value is passed through as-is, but the resulting browser behavior is not guaranteed.

    Response

    HTTP Status Code Summary

    200
    OK
    The file version binary content was successfully retrieved.
    206
    The requested byte range of the file version content was successfully retrieved.
    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
    The byte range in the Range header cannot be satisfied for this file version. Confirm the file size from content metadata, adjust or remove the Range header, and try again.

    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.