CommunityServer 2008.5 Blogs API reference

Some details about the blog API in CommunityServer 2008.

Blogs

GET /api/blogs.ashx/blogs/

Returns a paged list of all blogs visible to the current user.

Response

Status: 200 OK
 <bloglist>
  <blog>...</blog> 
  ...
</bloglist>

Parameters

PageSizeIntegerNumber of blogs per pageOptional
PageIndexIntegerPage numberOptional

GET /api/blogs.ashx/blogs/{blogId}

Returns data about a specific blog.

Response

Status: 200 OK
  <blog>...</blog> 

GET /api/blogs.ashx/blogs/{blogKey}

Returns data about a specific blog.

Response

Status: 200 OK
  <blog>...</blog>

GET /api/blogs.ashx/blogs/{blogQuery}

Returns a paged list of blogs matching the query parameter(s) visible to the current user.

Response

Status: 200 OK
 <bloglist>
  <blog>...</blog> 
  ...
</bloglist>

Parameters

NameStringName or part of the name of the blog. Wildcard character is “%”.Optional
IsActiveBooleanWhether the blog is activeOptional
AccessLevelEnum“View”, “Post”Optional
IdsInteger[]Comma-separated list of blog IDs.Optional
KeysString[]Comma-separated list of blog keys.Optional
GroupIDsInteger[]Comma-separated list of blog group IDsOptional
SortByStringCan be set to “Name”, “LastPost”, “Post”, “SortOrder” or “Thread”Optional
OrderStringThe sort order for the “SortBy” parameter. Can be set to “Ascending” or “Descending”.Optional
PageSizeIntegerNumber of blogs per pageOptional
PageIndexIntegerPage numberOptional

GET /api/blogs.ashx/blogs/{blogId}/members

Returns a list of members of the specified blog.

Response

Status: 200 OK
 <membershiplist>
  <member>...</member>
  ...
</membershiplist>

GET /api/blogs.ashx/blogs/{blogId}/members/{userId}

Returns the specified member of the specified blog.

Response

Status: 200 OK
  <member>...</member>

GET /api/blogs.ashx/blogs/{blogId}/posts

Returns a paged list of posts in the specified blog.

Response

Status: 200 OK
 <blogpostlist>
  <blogpost>...</blogpost> 
  ...
</blogpostlist>

Parameters

PageSizeIntegerNumber of posts per pageOptional
PageIndexIntegerPage numberOptional

GET /api/blogs.ashx/blogs/{blogId}/posts/{blogPostId}

Returns the specified post in the specified blog.

Response

Status: 200 OK
  <blogpost>...</blogpost> 

GET /api/blogs.ashx/blogs/{blogId}/posts/{blogPostId}/comments

Returns a paged list of comments for the specified post in the specified blog.

Response

Status: 200 OK
 <commentlist>
  <comment>...</comment> 
  ...
</commentlist>

Parameters

PageSizeIntegerNumber of comments per pageOptional
PageIndexIntegerPage numberOptional

GET /api/blogs.ashx/blogs/{blogId}/posts/{blogPostId}/comments/{blogPostCommentId}

Returns the specified comment for the specified post in the specified blog.

Response

Status: 200 OK
  <comment>...</comment> 

GET /api/blogs.ashx/blogs/{blogId}/posts/{blogPostId}/trackbacks

Returns a paged list of trackbacks for the specified post in the specified blog.

Response

Status: 200 OK
 <trackbacklist>
  <trackback>...</trackback> 
  ...
</trackbacklist>

Parameters

PageSizeIntegerNumber of trackbacks per pageOptional
PageIndexIntegerPage numberOptional

GET /api/blogs.ashx/blogs/{blogId}/posts/{blogPostId}/trackbacks/{trackbackId}

Returns the specified trackback for the specified post in the specified blog.

Response

Status: 200 OK
  <trackback>...</trackback>

GET /api/blogs.ashx/blogs/{blogId}/posts/{blogPostId}/ratings

Returns a list of ratings for the specified post in the specified blog.

Response

Status: 200 OK
 <ratinglist sum="X" average="Y">
  <rating>...</rating>
  ...
</ratinglist>

GET /api/blogs.ashx/blogs/{blogId}/posts/{blogPostId}/ratings/{username}

Returns rating by user with {username} for the specified post in the specified blog.

If the user doesn’t exist or didn’t rate the post, the whole list of ratings for the specified post is returned!

Response

Status: 200 OK
 <int>
  X
</int>

Blog Posts

GET /api/blogs.ashx/posts/{blogPostId}

Returns the specified post.

Response

Status: 200 OK
  <blogpost>...</blogpost>

GET /api/blogs.ashx/posts/{blogPostQuery}

Returns a paged list of posts matching the query parameter(s) visible to the current user.

Response

Status: 200 OK
 <blogpostlist>
  <blogpost>...</blogpost> 
  ...
</blogpostlist>

Parameters

IsActiveBooleanWhether the post is activeOptional
BlogIdsInteger[]Comma-separated list of blog IDs.Optional
KeywordsString[]Comma-separated list of keywords. All keywords must be matched.Optional
SortByStringCan be set to “MostComments”, “MostRecent” or “MostViewed”Optional
OrderStringThe sort order for the “SortBy” parameter. Can be set to “Ascending” or “Descending”.Optional
PageSizeIntegerNumber of posts per pageOptional
PageIndexIntegerPage numberOptional

GET /api/blogs.ashx/posts/{blogPostId}/comments

Returns a paged list of comments for the specified post.

Response

Status: 200 OK
 <commentlist>
  <comment>...</comment> 
  ...
</commentlist>

Parameters

PageSizeIntegerNumber of comments per pageOptional
PageIndexIntegerPage numberOptional

GET /api/blogs.ashx/posts/{blogPostId}/trackbacks

Returns a paged list of trackbacks for the specified post.

Response

Status: 200 OK
 <trackbacklist>
  <trackback>...</trackback> 
  ...
</trackbacklist>

Parameters

PageSizeIntegerNumber of trackbacks per pageOptional
PageIndexIntegerPage numberOptional

Blog Comments

GET /api/blogs.ashx/comments/{blogPostCommentId}

Returns the specified comment.

Response

Status: 200 OK
  <comment>...</comment>

####

PUT /api/blogs.ashx/comments/

Creates the sent comment.

Request

<comment>...</comment>

GET /api/blogs.ashx/comments/{blogPostCommentQuery}

Returns a paged list of comments matching the query parameter(s) visible to the current user.

Response

Status: 200 OK
 <commentlist>
  <comment>...</comment> 
  ...
</commentlist>

Parameters

IsActiveBooleanWhether the comment is activeOptional
PostIdIntegerID of a blog post. If specified, only comments for that post are shown.Optional
KeywordsString[]Comma-separated list of keywords. All keywords must be matched.Optional
PageSizeIntegerNumber of comments per pageOptional
PageIndexIntegerPage numberOptional

Blog Trackbacks

GET /api/blogs.ashx/trackbacks/{trackbackId}

Returns the specified trackback.

Response

Status: 200 OK
  <trackback>...</trackback>

GET /api/blogs.ashx/trackbacks/{trackbackQuery}

Returns a paged list of trackbacks matching the query parameter(s) visible to the current user.

Response

Status: 200 OK
 <trackbacklist>
  <trackback>...</trackback> 
  ...
</trackbacklist>

Parameters

PostIdIntegerID of a blog post. If specified, only trackbacks for that post are shown.Optional
KeywordsString[]Comma-separated list of keywords. All keywords must be matched.Optional
PageSizeIntegerNumber of trackbacks per pageOptional
PageIndexIntegerPage numberOptional

Blog Groups

GET /api/blogs.ashx/bloggroups/

Returns a list of all blog groups visible to the current user.

Response

Status: 200 OK
 <bloggrouplist>
  <bloggroup>...</bloggroup> 
  ...
</bloggrouplist>

GET /api/blogs.ashx/bloggroups/{blogGroupId}

Returns data about the specified blog group.

Response

Status: 200 OK
  <bloggroup>...</bloggroup> 

Comments