Community articleRetrieving a media resource
Added by IBM contributorIBM on March 20, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

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 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. 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.

Input

None.

Output

An Atom entry document containing the requested file or the media link entry containing metadata about the file.

Input
Method URI Description
GET /blogs/{communityUuid}/api/media/{fileName} 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.
GET /blogs/{communityUuid}/api/media/{fileName} 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.
Name Type Optional Description
communityUuid
string No The UUID of the community that contains the blog..
fileName
string No Name of file you wish to retrieve data about
Output
Content Type: application/atom+xml
Code Description
200
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.
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
404
Not Found.