Home
Create a blog
To create a blog, send an Atom entry document containing the blog definition to the URI specified in the collection element of the service document.
You must provide authentication credentials for the user who will be the owner of the blog on the request. See Authenticating requests for information about how to authenticate the request.
Atom API request details
Method Resource URI Input representation POST User's My Blogs feed Value of the href attribute of the <collection> element that has the title My Blogs within the workspace that has the title Blogs in the user's service document. blog definition
Input
Provide an Atom entry document that contains the blog's definition entry as the post data. The content type must be "application/atom+xml".
Output
None. Returned HTTP Headers
- HTTP/1.1 201 Created
- Indicates that the blog was successfully created. If an error occurs, this header will contain one of the error codes below.
Error codes
- HTTP/1.1 400 Bad Request
- HTTP/1.1 401 Unauthorized
Example
InputPOST /blogs/homepage/api/blogs 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'>Original Title</title> <category term='existing-tag'/> <snx:timezone>America/New_York</snx:timezone> <snx:handle>atomicbilltest</snx:handle> </entry>Response
HTTP/1.1 201 Created Content-Type: application/atom+xml; type=entry Location: https://blogs.enterprise.acme.com/blogs/homepage/api/blogs/ 0c0fc393-2e36-4d0e-9c9f-d4cfd10bfa70 <?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'>Original Title</title> <summary type='text'/> <updated>2008-05-20T14:09:32.296Z</updated> <app:edited xmlns:app='http://www.w3.org/2007/app'>2008-05-20T14:09:32.296Z</app:edited> <published>2008-05-20T14:09:32.296Z</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'/> </entry>
Related reference