Home
Updating a blog
To update a blog, send a replacement definition entry in Atom format to the blog's edit Web address.
See Authenticating requests for information about how to authenticate the request. To update a blog...
- Retrieve the blog definition resource of the blog that you want to update.
Atom API request details
Method Resource URI Output representation GET blog definition
- 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.
blog definition An Atom entry document containing the blog definition is returned. One of the following headers is displayed:
- HTTP/1.1 200 OK
- Indicates that the blog definition was successfully found and returned. If an error occurs, the header will contain one of the following error codes:
- HTTP/1.1 401 Unauthorized
- HTTP/1.1 404 Not Found
- Content-Type: application/atom+xml
- Indicates that the document returned contains data in Atom format.
- Update the blog definition Atom document.
- Send the updated blog definition Atom entry document to the edit URL of the My Blogs feed.
The content type of the Atom entry document must be application/atom+xml.
Atom API request details
Method Resource URI Input representation PUT blog definition
- 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.
blog definition
Output
None. Returned HTTP Headers
- HTTP/1.1 200 OK
- Indicates that the blog was successfully updated. If an error occurs, this header will contain one of the error codes below.
Error codes
- HTTP/1.1 403 Forbidden: Authorization failed.
- HTTP/1.1 404 Not Found
Example
InputPUT /blogs/homepage/api/blogs/0c0fc393-2e36-4d0e-9c9f-d4cfd10bfa70 HTTP/1.1 Authorization: Basic ... Host: blogs.enterprise.acme.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@acme.com</email> <snx:userid>937965j0-4f0c-1028-5a06-db07163b51b2</snx:userid> </author> </entry>Response
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.acme.com/blogs/atomicbilltest' rel='alternate' type='text/html'/> <link href='https://blogs.enterprise.acme.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@acme.com</email> <snx:userid>937965j0-4f0c-1028-5a06-db07163b51b2</snx:userid> </author> <category term='existing-tag'/> <category term='new-tag'/> </entry>
Related reference