Home
Retrieving a media resource
You can retrieve a copy of the file itself or you can retrieve the file's metadata. To retrieve a copy of the file, use the edit-media link found in each entry in the media resource link entries feed. To retrieve file metadata, use the edit link found in each entry in the blog's media link entries feed.
You can use this operation to obtain information about a file that you want to preserve prior to updating the file. See Updating media resources for more information. You cannot update a media link entry. This method returns the Atom entry of a single media resource as opposed to a feed of all the resources. If you want to retrieve a feed, see Retrieving the media link entries of a blog.
See Authenticating requests for information about how to authenticate the request.
Atom API request details
Method Resource URI Output representation GET media resource Value of the href attribute of the <link> element that has a rel="edit-media" attribute value for each entry in the media link entries feed. file GET media link resource Value of the href attribute of the <link> element that has a rel="edit" attribute value for each entry in the media link entries feed. media link
Input
None.
Output
An Atom entry document containing the requested file or the media link entry containing metadata about the file. Returned HTTP Headers
- HTTP/1.1 200 OK
- Indicates that the file or media link entry was successfully found and returned. If an error occurs, this header will contain one of the error codes below.
- Content-Type: application/atom+xml
- Only returned when you are retrieving a media link entry. Indicates that the document returned contains data in Atom format.
Error codes
- HTTP/1.1 401 Unauthorized
- HTTP/1.1 404 Not Found
Related reference
Get a feed of the media link entries of a blog