Retrieving the user's blogs (My Blogs)
Added by IBM contributorIBM | Edited by IBM contributorPaul Bastide on December 21, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Retrieve the user's blogs (My Blogs) using a GET request.

Complete the following steps:

1. Retrieve the Blogs service document. See Retrieving the Blogs service document.
2. In the service document, find the URI specified in the collection element of "My Blogs".
3. Send a GET request to the web address defined in the href attribute.

An Atom entry document containing the blog definition is returned.

Input
Method URI Description
GET /blogs/{homepage}/api/blogs Value of the href attribute of "My Blogs" collection element.
Name Type Optional Description
homepage
string No {homepage} represents the blog handle of the blog configured to be the home page of the Blogs application. The handle is defined when the home page blog is created by the administrator.
The handle can be the Community Uuid.
Output
Content Type: application/atom+xml
Code Description
200
Indicates that the blog definition was successfully found and returned.
401
Unauthorized.
404
Not Found.
Examples
GET /blogs/homepage/api/blogs/1ba146de-8cbc-47a1-b6e9-4a46aaf0be23 HTTP/1.1

Host: blogs.enterprise.example.com


Response HTTP headers:

	HTTP/1.1 200 OK

Content-Type: application/atomsvc+xml

Response returned by the server
	<?xml version="1.0"?>

<entry xmlns="http://www.w3.org/2005/Atom">

    <id>urn:lsid:ibm.com:blogs:blog-1ba146de-8cbc-47a1-b6e9-4a46aaf0be23

    </id>

    <link

        href="https://example.com/blogs/W29542eac4d88_472b_8bd9_36c2fef3ce14"

        rel="alternate" type="text/html"></link>

    <link

        href="https://example.com/blogs/homepage/api/blogs/1ba146de-8cbc-47a1-b6e9-4a46aaf0be23"

        rel="edit" type="application/atom+xml"></link>

    <link

        href="http://example.com/communities/service/atom/community/instance?communityUuid=779466a7-f064-4f92-8371-6e263ae3cbb5"

        rel="http://www.ibm.com/xmlns/prod/sn/container" type="application/atom+xml"></link>

    <snx:containertype xmlns:snx="http://www.ibm.com/xmlns/prod/sn">0</snx:containertype>

    <snx:containerid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">779466a7-f064-4f92-8371-6e263ae3cbb5

    </snx:containerid>

    <snx:communityUuid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">779466a7-f064-4f92-8371-6e263ae3cbb5

    </snx:communityUuid>

    <snx:maprole membership="member" xmlns:snx="http://www.ibm.com/xmlns/prod/sn">author

    </snx:maprole>

    <category term="public" scheme="http://www.ibm.com/xmlns/prod/sn/flags"

        label="public"></category>

    <author>

        <name>Amy Jones3</name>

        <email>ajones3@janet.iris.com</email>

        <snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">f0c927c0-0101-102e-8fed-f46a2e89c178

        </snx:userid>

        <snx:userState xmlns:snx="http://www.ibm.com/xmlns/prod/sn">active</snx:userState>

    </author>

    <snx:AllowCoedit enabled="no"

        xmlns:snx="http://www.ibm.com/xmlns/prod/sn"></snx:AllowCoedit>

    <title type="text">test ideation blog</title>

    <summary type="text">test</summary>

    <updated>2011-07-25T02:25:25.014Z</updated>

    <app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-25T02:25:25.014Z</app:edited>

    <published>2011-07-25T02:25:25.014Z</published>

    <snx:timezone xmlns:snx="http://www.ibm.com/xmlns/prod/sn">Asia/Hong_Kong</snx:timezone>

    <snx:locale xmlns:snx="http://www.ibm.com/xmlns/prod/sn">zh_CN</snx:locale>

    <snx:handle xmlns:snx="http://www.ibm.com/xmlns/prod/sn">W29542eac4d88_472b_8bd9_36c2fef3ce14

    </snx:handle>

    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/votes-available"

        xmlns:snx="http://www.ibm.com/xmlns/prod/sn">-1</snx:rank>

    <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/recommendations"

        xmlns:snx="http://www.ibm.com/xmlns/prod/sn">0</snx:rank>

    <app:control xmlns:app="http://www.w3.org/2007/app">

        <snx:comments enabled="yes" days="0"

            xmlns:snx="http://www.ibm.com/xmlns/prod/sn"></snx:comments>

        <snx:emailcomments enabled="disabled"

            xmlns:snx="http://www.ibm.com/xmlns/prod/sn"></snx:emailcomments>

        <snx:commentmoderated enabled="no"

            xmlns:snx="http://www.ibm.com/xmlns/prod/sn"></snx:commentmoderated>

        <snx:AllowCoedit enabled="no"

            xmlns:snx="http://www.ibm.com/xmlns/prod/sn"></snx:AllowCoedit>

        <snx:voteLimit enabled="false"

            xmlns:snx="http://www.ibm.com/xmlns/prod/sn"></snx:voteLimit>

    </app:control>

    <category term="communityideationblog" scheme="http://www.ibm.com/xmlns/prod/sn/type"></category>

    <category term="open" scheme="http://www.ibm.com/xmlns/prod/sn/flags"

        label="Users can contribute new ideas or comment on or vote for existing ideas in this Ideation Blog."></category>

</entry>