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
UsageRoot 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
UsageContains 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
UsageCollection 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
UsageCollection 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>: 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:
The Media Entries <collection> element
UsageCollection 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>: The jpeg media type is accepted by the collection.
- <accept>image/gif</accept>: The gif media type is accepted by the collection.
- <accept>image/png</accept>: The png media type is accepted by the collection.
- <categories fixed="yes"/>: Indicates that new categories cannot be defined.
The Comments <collection> element
UsageCollection 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>: 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">IBM 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.example.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>
Parent topic
Retrieve the Blogs service documentRelated reference
Retrieve a blog comment
Delete comments
});