Operation Summary:
Retrieve a list of blogs available on a network by URL, network identifier or user id.
Resource URL:
https://api.compendiumblog.com/app/blogs
Response Representations:
JSON (application/json)
HTML (text/html)
Required Parameters:
Note that only one of the required parameters must be specified. It is up to the caller to determine which parameter to use based on appropriateness to their use case.
- NetworkId
- The ID of the network to list blogs for expressed as a UUID.
- NetworkUrl
- The URL of a network, e.g. blog.example.com
- UserId
- The ID of a user to retrieve blog data for expressed as a UUID.
Optional Parameters:
- Count
- Limit result set to this count (default: all)
- Page
- Page number requested (default: 1)
- SearchCriteria
- An key/value list specifying filtering criteria to be used on results. The list is expressed as a JSON object. Recognized keys are
StartsWith, Contains and BlogType. One or more criteria may be specified in a single request.
Response Values:
- Success
- Blog list successfully retrieved.
- Error
- An error occurred listing blogs given the specified parameters.
Response Structure:
JSON
Success
Upon success an array of objects will be returned containing appropriate information about each of the blogs. An example is below:
{
Success:
[
{
BlogId: string,
CategoryId: string,
Title: string,
Description: string,
Type: enum,
UrlToken: string,
PostCount: int,
Url: string,
Attributes: object
},
...
]
}
Success details:
- Attributes
- An object containing one of two keys, depending on the type of blog. If the blog is a user blog then a UserId key will be present and will contain as a value the ID of the user that is the author for that blog. If the blog is a compended blog, a Tags key will be present and will contain as a value an array of all tags associated with that particular compended blog.
- BlogId
- The ID of the blog expressed as a UUID.
- CategoryId
- The category of the blog expressed as a UUID.
- Description
- The description for the blog. May be empty for compended blogs.
- PostCount
- The number of posts in the particular blog.
- Title
- The title of the blog.
- Type
- The blog type, one of: norm, comp, uber or hidden.
- Url
- The absolute URL to the particular blog.
- UrlToken
- The URI for the particular blog minus the /blog/ token. If the blog URL was http://blog.example.com/blog/blog-name this would have a value of blog-name.
Error
The Error result will be a flat array of objects, which have keys for the message name and explanatory text.
{
'Error' : [
{ 'Name' : string, 'Message' : string },
{ 'Name' : string, 'Message' : string },
...
]
}
Error Types:
- List
- There was an error retrieving the blog list. This request may be retried.
- NetworkId
- NetworkId failed validation. Must be a valid UUID for a network that exists. This request should not be retried without modification.
- NetworkUrl
- NetworkUrl failed validation. Must be a valid URL in the system. This request should not be retried without modification.
- UserId
- UserId failed validation. Must be a valid UUID for a user that exists. This request should not be retried without modification.
- SearchCriteria
- The specified search criteria were not expressed as a valid JSON object.
Command Line Example
curl --insecure \
-H "Accept: application/vnd.compendium.blog;version=2,application/json" \
--user someUser:someKey \
https://test.api.compendiumblog.com/app/blogs?NetworkUrl=blogging.compen...