Home
Blogs service document content
When working with the Blogs publishing APIs, first obtain the Blogs service document. The service document provides access to all of the Blogs resources that you can update. The resources that you can update from the service document include the following resources:
- Blogs feed ("My Blogs"). This feed lists the blog settings that define the configuration of each blog.
- Postings feed for each blog for which the user is an author ("Weblog Entries").
- Tags document of all blog posting tags for each blog for which the user is an author (updated using the postings feed).
- Media link entries feed for each blog for which the user is an author ("Media Entries").
- Comments feed for each blog for which the user is an author ("Comments").
The following section provides an outline of the elements contained by the service document:
service workspace "Blogs" collection "My Blogs" workspace "(blog title)" (one for each blog) blog collections collection "Weblog Entries" categories (tags document listing tags for all of the posts in the blog) collection "Media Entries" collection "Comments"The following sections describe the elements included in the outline.
The <service> element
- Usage
- Root element of the service document.
- Namespace
- http://www.w3.org/2007/app
- Attributes
- None.
- Children
- generator: Specifies the product version number.
- Blogs workspace: Contains the My Blogs collection.
- <blog_title> workspace: One workspace for each blog for which the user is an author.
The Blogs <workspace> element
- Usage
- Contains the "My Blogs" collection used to create blogs or list existing blogs. This workspace was added in release 2.0.
- Namespace
- http://www.w3.org/2007/app
- Attributes
- None.
- Children
- atom:title: Blogs
- collection: My Blogs.
The My Blogs <collection> element
- Usage
- Collection used to create blogs or list existing blogs.
- Namespace
- http://www.w3.org/2007/app
- Attributes
- href. Web address of the collection. You can send the following HTTP requests to this Web address:
- GET: Obtain a feed of existing blog settings.
- POST: Create a new blog.
- Children
- atom:title: My Blogs.
- <accept>application/atom+xml;type=entry</accept>: Indicates collection accepts Atom entry documents
- <categories fixed="yes"/>: Indicates new categories cannot be defined.
The <blog_title> <workspace> element
There is one workspace element named for each blog for which the user is an author.
- Usage
- Contains entries, comments, and media collections for a single blog.
- Namespace
- http://www.w3.org/2007/app
- Attributes
- None.
- Children
- atom:title: Title of the specific blog that this workspace defines.
- collection: Weblog Entries
- collection: Media Entries
- collection: Comments
The Weblog Entries <collection> element
- Usage
- Collection used to create blog entries or list existing blog entries.
- Namespace
- http://www.w3.org/2007/app
- Attributes
- href: Web address of the collection. You can send the following HTTP requests to this Web address:
- GET: Obtain a feed of existing blog posts.
- POST: Add a new blog posting to a blog.
- Children
- atom:title: Weblog Entries
- <accept>application/atom+xml;type=entry</accept>: Specifies that the collection accepts Atom entry documents.
- <categories fixed="no"/>: Indicates that new categories can be defined. The categories href attribute specifies the Web address of the tags document. You can send the following HTTP request to this address:
- GET: Obtain the tags document listing tags of all the entries in the blog.
The Media Entries <collection> element
- Usage
- Collection used to add media to blog postings or list existing media.
- Namespace
- http://www.w3.org/2007/app
- Attributes
- href: Web address of the collection. You can send the following HTTP requests to this Web address:
- GET: Obtain a feed of existing blog media link entries.
- POST: Upload a file and create a new associated media link entry.
- Children
- atom:title: Media Entries
- <accept>image/jpeg</accept>: Specifies that the jpeg media type is accepted by the collection.
- <accept>image/gif</accept>: Specifies that the gif media type is accepted by the collection.
- <accept>image/png</accept>: Specifies that the png media type is accepted by the collection.
- <categories fixed="yes"/>: Indicates that new categories cannot be defined.
The Comments <collection> element
- Usage
- Collection used to create blog posting comments or list existing comments.
- Namespace
- http://www.w3.org/2007/app
- Attributes
- href: Web address of the collection. You can send the following HTTP requests to this Web address:
- GET. Obtain a feed of existing comments added to a blog.
- Children
- atom:title: Comments
- <accept>application/atom+xml;type=entry</accept>: Specifies that the collection accepts Atom entry documents.
Example
<?xml version="1.0"?> <service xmlns="http://www.w3.org/2007/app"> <generator version="2.0" uri="http://www.ibm.com/xmlns/prod/sn" xmlns="http://www.w3.org/2005/Atom">Lotus Connections - Blogs</generator> <workspace> <title type="text" xmlns="http://www.w3.org/2005/Atom">Blogs</title> <collection href="https://blogs.enterprise.acme/blogs/homepage/api/blogs"> <title type="text" xmlns="http://www.w3.org/2005/Atom">My Blogs</title> <accept>application/atom+xml;type=entry</accept> <categories fixed="yes"> </categories> </collection> </workspace> <workspace> <title type="text" xmlns="http://www.w3.org/2005/Atom">Sports Signup </title> <collection href="https://blogs.enterprise.acme/blogs/sporty/api/entries"> <title type="text" xmlns="http://www.w3.org/2005/Atom">Weblog Entries</title> <accept>application/atom+xml;type=entry</accept> <categories fixed="no" href="https://blogs.enterprise.acme/blogs/sporty/api/tags"> </categories> </collection> <collection href="https://blogs.enterprise.acme.com/blogs/sporty/api/media"> <title type="text" xmlns="http://www.w3.org/2005/Atom">Media Entries</title> <accept>image/jpeg</accept> <accept>image/gif</accept> <accept>image/png</accept> <categories fixed="yes"> </categories> </collection> <collection href="https://blogs.enterprise.acme/blogs/sporty/api/comments"> <title type="text" xmlns="http://www.w3.org/2005/Atom">Comments</title> <accept>application/atom+xml;type=entry</accept> <categories fixed="yes"> </categories> </collection> </workspace> </service>
Retrieving the Blogs service document