Downloading a file 

Download a file from your library programmatically.

See Authenticating requests for information about how to authenticate the request.

Table 1. Atom API request details

Method Resource address Output representation Description
GET Construct the URI using the following syntax: /basic/anonymous/api/document/{document-id}/media binary media Returns a public file from your library without authenticating the request.
GET Determine the resource address in either of the following ways:

  • Value of the href attribute of the <link rel="edit-media"> element in the file's Document Atom entries.

  • Construct the address using the following URL:/basic/api/myuserlibrary/document/{document-id}/ where {document-id} is the <td:uuid> or <td:label> element of the document entry.

binary media Returns a file from your library. This request requires authentication.

Note: Use this URI to retrieve the binary data if you plan to update and return it using a PUT request.

You can use one or more of these headers.

Table 2. Input headers

Parameter Description
If-Modified-Since Used to validate the local cache of the feed and entry documents retrieved previously. If the feed or entry has not been modified since the specified date, HTTP response code 304 (Not Modified) is returned.
If-None-Match Contains an ETag response header sent by the server in a previous request to the same URL. If the ETag is still valid for the specified resource, HTTP response code 304 (Not Modified) is returned.

You can use one or more of these input parameters. Separate multiple parameters with an ampersand (&).

Table 3. Input parameters

Parameter Description
identifier String. Indicates the identifier used in the document segment of the web address. Options are uuid or label. Uses the UUID as the identifier by default.
inline Specifies whether the documents contents should be included inline in the content element. Options are true or false.
logDownload Specifies whether to log this file download. Options are true or false. By default, it does log the download.




Binary content of the file. If active content filtering is enabled, and the file is an HTML file, it is filtered.

Returned HTTP headers

HTTP/1.1 200 OK

Error codes

Parent topic

Work with files

Related tasks

Displaying files inline

Related reference
File content

June 23, 2011


Jun 23, 2011 3:35:23 PM Removed myuserlibrary from the /basic/anonymous/api/document/{document... 1