Home

 

Navigating Blogs publishing API resources

Describes how to navigate from one Blogs resource to another using the resources made available through the API. To retrieve information from Blogs, your application can use the feeds provided by Blogs. Those resources allow you to directly query any blog for the information you are interested in. See Navigating Blogs subscription API resources for more information. If your application is going to create or update information in a blog, it must instead start by retrieving the user's service document, and then it must follow the links from the service document to the user's blogs, comments, and media link collections, and then it must use the links in the Atom entries to update, delete, or comment on individual blog entries, comments, media links or media resources.

The following diagram illustrates how to navigate from the service document to all the available Blogs resources. Identifies the order in which to access the resources. Begins with the Service document. Within the service document, you can find the following workspaces: a Blogs workspace and one <blog_title> workspace for each blog. From the Blogs workspace, you can access the My <a href=blogs feed, from which you can access a Blog definition for each blog. From each <blog_title> workspace, you can access one of the following resources: Blog postings comments, Blog postings, Media links, or a tags category document. From the Blog postings comments resource, you can access a posting comment. From Blog postings, you can access either a blog posting or a tags category document. From the blog posting, you can access either posting comments or the Recommendations feed. From the posting comments resource, you can access a single posting comment, and you can access a recommendation made for the comment. From the Recommendations feed, you can access a recommendation entry. From the Media links resource, you can access either a media link or a media resource."/>The following tables describe the available Blogs resources.


Directly accessible publishing resources

Resource URI Method | Representation Description
Service document /api GET | service document As defined in the Atompub specification. Access a user's service document to do the following:

  • Retrieve links to a list of workspaces, one for each blog that the user owns or authors.

  • Create a blog.

The Blogs Service document contains a number of workspace elements. One workspace is always present, and is titled Blogs. It provides access to the collection of blogs that the user owns or contributes to as an author. Additional workspaces may be present, one for each blog the user owns or authors. The title of the workspace is taken from the title of the blog that the workspace provides access to. These workspaces provide access to the resource collections available for each blog. They are referred to as the "service document workspace for each blog" in the table below.


Resources that are accessible from the service document

Resource To access the resource Method | Representation Description
Blog post comments From the service document, for each entry in the Comments feed, find the href attribute of the <link> element that has the rel="edit" attribute value.

  • GET | comment entry

  • DELETE

Represents a comment associated with a blog posting. Use this resource to retrieve or delete a comment.
Blog posts From the service document, in each blog workspace, find the value of the href attribute of the <collection> elements with the title Weblog Entries.

  • GET | blog postings feed

  • POST | blog posting

Collection of recent posts to a blog. Use this resource to retrieve a feed that lists all of the blog posts from the blogs for which the authenticated user is an author, and to create a blog post.
Blog post tags category document From the service document, each workspace contains a collection titled Weblog Entries. Find the href attribute of the <app:categories> element for the collection. Alternately, you can use the following URIs:

  • For all blogs:

    {homepage}/feed/tags/atom

  • For a specific blog:

    {handle}/feed/tags/atom

GET | tag category document Lists the tags assigned to all of the posts in all of the blogs or in a single blog.
Media links From the service document, find the href attribute of the <collection> element with the title Media Entries.

  • GET | media link entries feed

  • POST | media resource

Collection of media links. Use this resource to retrieve a feed that lists blog media link entries for all of the blogs for which the authenticated user is an author, and to create a media link.
My blogs From the service document, in the workspace that has the title Blogsfind the href attribute of the <collection> that has the title My Blogs.

  • GET | blogs feed

  • POST | blog definition

Collection of blog definitions that represent the blogs that the user owns or contributes to as an author. Use this resource to retrieve a feed of all of your blogs and to create a blog.

{handle} represents the handle of the blog. A handle is a keyword that identifies a blog. It is specified when a blog is first created and is used in the construction of Web addresses used to query the entries in a blog. {homepage} represents the blog handle of the blog configured to be the home page of the Blogs feature. The handle is defined when the home page blog is created by the administrator. See Specify site-wide settings for Blogs in the Administering Blogs section of the information center and Configure Blogs in the Installing section of the information center for more details.


Indirectly accessible resources

Resource To access the resource Method | Representation Description
Blog definition From the service document, for each entry in the My Blogs feed, find the value of the href attribute of the <link> element that has a rel="edit" attribute value.

  • GET | blog definition

  • POST | blog definition

  • DELETE

Represents the settings for a particular blog. Use this resource to update definitions for a blog, or to delete it.
Blog post From the service document, for each entry in the Weblog Entries feed, find the href attribute of the <link> element that has a rel="edit" attribute value.

  • GET | blog post

  • PUT | blog post

  • DELETE

Represents a blog post.
Media link From the service document, for each entry in the Media Link Entries feed, find the href attribute of the <link> element that has a rel="edit" attribute value.

  • GET | media resource

  • PUT | media resource

  • DELETE

Used by blog owners to update or delete a media file and the associated media link Atom entry.
Media resource From the service document, for each entry in the Media Link Entries feed, get the href attribute of the <link> element that has a rel="edit" attribute value to retrieve the Media link entries feed. Find the src attribute from the media link entries. GET | media resource Represents a media file added to a blog. See Media link content.
Post comments feed

  • For a single blog post, find the href of the replies link of a blog entry Atom document.

  • Use: {handle}/feed/comments/atom

GET | comment entries feed Use this resource to retrieve a feed that lists the comments added to a specific blog of which the authenticated user is the owner or author. See Getting a feed of the comments added to a blog.
Post comments collection

  • For all blogs, from the service document, find the href attribute of the <collection> element that has the title element with the value Comments.

  • Use: {homepage}/feed/comments/atom

  • GET | comment entries feed

  • POST | comment entry

Collection of comments. Use this resource to retrieve a feed that lists the comments added to all of the blogs for which the authenticated user is an author. See Creating comments.
Recommendations collection

  • For a single blog post, find the href of the Recommendations collection of the blog entry Atom document.

  • Use: {homepage}/feed/recommended/atom

  • GET | recommendations feed

  • POST | empty request to the href of the recommendations collection

Use this resource to retrieve a feed that lists the recommendations associated with a blog posting.
Report entry From the reports link in the a blog post entry or blog comment entry POST | issue report Flags inappropriate content in an entry or comment. See Flagging blog content as inappropriate.


Using the publishing APIs

 

Related reference


Media link content

Flagging blog content as inappropriate

Create comments

Get a feed of the comments added to a blog

Navigating Blogs subscription API resources


+

Search Tips   |   Advanced Search