Updating a blog
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

To update a blog, send a replacement definition entry in Atom format to the blog's edit web address.
An Atom entry document containing the blog definition is returned.


Retrieve the blog definition resource of the blog that you want to update.

1. Retrieve the blog definition resource of the blog that you want to update.
2. Update the blog definition Atom document.
3. Send the updated blog definition Atom entry document to the edit URL of the My Blogs feed.
Input
Method URI Description
PUT /blogs/{homepage}/api/blogs/{blogId} Value of the href attribute of the <link rel="edit"> element of each entry in the My Blogs feed.
web address returned in the HTTP location header when the blog was created.
Content Type: application/atom+xml
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.
blogId
string No The ID of the blog you wish to update.
Output
Content Type: application/atom+xml
Code Description
200
Indicates that the blog was successfully updated. If an error occurs, this header contains one of the error codes.
403
Forbidden. Authorization failed.
404
Not Found.
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
Examples
PUT /blogs/homepage/api/blogs/0c0fc393-2e36-4d0e-9c9f-d4cfd10bfa70 HTTP/1.1

	Authorization: Basic ...

	Host: blogs.enterprise.example.com

	Content-type: application/atom+xml

	<?xml version='1.0' encoding='UTF-8'?>

	<entry xmlns:snx='http://www.ibm.com/xmlns/prod/sn'

	xmlns='http://www.w3.org/2005/Atom'>

	<title type='text'>New Title</title>

	<category term="new-tag"/>

	<category term="existing-tag"/>

	<snx:timezone>America/New_York</snx:timezone>

	<snx:handle>atomicbilltest</snx:handle>

	<author>

	<name>Bill User501</name>

	<email>buser501@example.com</email>

	<snx:userid>937965j0-4f0c-1028-5a06-db07163b51b2</snx:userid>

	</author>

	</entry>


Response returned by the server
HTTP/1.1 200 OK

	Content-Type: application/atom+xml; type=entry

	Last-Modified: Tue, 20 May 2008 14:10:06 GMT

	Content-Language: en-US

	

	<?xml version='1.0'?>

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

	<id>urn:lsid:ibm.com:blogs:blog-0c0fc393-2e36-4d0e-9c9f-d4cfd10bfa70</id>

	<link

	href='https://blogs.enterprise.example.com/blogs/atomicbilltest'

	rel='alternate'

	type='text/html'/>

	<link

	href='https://blogs.enterprise.example.com/blogs/homepage/api/blogs/

	0c0fc393-2e36-4d0e-9c9f-d4cfd10bfa70'

	rel='edit'

	type='application/atom+xml'/>

	<title type='text'>New Title</title>

	<summary type='text'/>

	<updated>2008-05-20T14:10:06.625Z</updated>

	<app:edited

	xmlns:app='http://www.w3.org/2007/app'>2008-05-20T14:10:06.625Z</app:edited>

	<published>2008-05-20T14:10:06.625Z</published>

	<snx:timezone

	xmlns:snx='http://www.ibm.com/xmlns/prod/sn'>America/New_York</snx:timezone>

	<snx:locale xmlns:snx='http://www.ibm.com/xmlns/prod/sn'>en_US</snx:locale>

	<snx:handle

	xmlns:snx='http://www.ibm.com/xmlns/prod/sn'>atomicbilltest</snx:handle>

	<author>

	<name>Bill User501</name>

	<email>buser501@example.com</email>

	<snx:userid>937965j0-4f0c-1028-5a06-db07163b51b2</snx:userid>

	</author>

	<category term='existing-tag'/>

	<category term='new-tag'/>

	</entry>