page-assets resource endpoint

URL: /blogs/<id>/page-assets.<format>

Supported Methods

POST Add a new page to a blog
GET Get a list of pages associated with the selected blog.

Query String Arguments

start-index
Index of the first item to return. The first item in the list has index 1.
max-results
Maximum number of items to return in the list response.

Resource Type

This endpoint returns an object of type List<Page>.

entries (array<Page>)
The items within the selected range.
totalResults (integer)
The total number of items in the whole list of which this object is a chunk.

POST Request Object Type

This endpoint expects POST requests to contain objects of type Page.

author (User)
(Read Only) The user who created the selected asset.
commentCount (integer)
(Read Only) The number of comments that have been posted in reply to this asset. This number includes comments that have been posted in response to other comments.
container (ContainerRef)
(Read Only) An object describing the group or blog to which this asset belongs.
content (string)
The raw asset content. The textFormat property describes how to format this data. Use this property to set the asset content in write operations. An asset posted in a group may have a content value up to 10,000 bytes long, while a Post asset in a blog may have up to 65,000 bytes of content.
crosspostAccounts (set<string>)
(Write Only) A set of identifiers for Account objects to which to crosspost this asset when it's posted. This property is omitted when retrieving existing assets.
description (string)
The description of the page.
embeddedImageLinks (array<ImageLink>)
(Read Only) A list of links to the images that are embedded within the content of this page.
excerpt (string)
(Read Only) A short, plain-text excerpt of the entry content. This is currently available only for Post assets.
favoriteCount (integer)
(Read Only) The number of distinct users who have added this asset as a favorite.
feedbackStatus (FeedbackStatus)
An object describing the comment and trackback behavior for this page.
filename (string)
The base name of the page, used to create the permalinkUrl.
groups (array<string>)
(Read Only) (Deprecated) An array of strings containing the id URI of the Group object that this asset is mapped into, if any. This property has been superseded by the container property.
hasExtendedContent (boolean)
(Read Only) true if this asset has the extended content. This is currently supported only for Post assets that are posted within a blog.
id (string)
(Read Only) A URI that serves as a globally unique identifier for the user.
isFavoriteForCurrentUser (boolean)
(Read Only) true if this asset is a favorite for the currently authenticated user, or false otherwise. This property is omitted from responses to anonymous requests.
negativeVoteCount (integer)
(Read Only) The total number of negative votes this asset has received via the /assets/<id>/cast-negative-vote endpoint.
objectType (string)
(Read Only) The keyword identifying the type of asset this is.
objectTypes (set<string>)
(Read Only) (Deprecated) An array of object type identifier URIs identifying the type of this asset. Only the one object type URI for the particular type of asset this asset is will be present.
permalinkUrl (string)
(Read Only) The URL that is this asset's permalink. This will be omitted if the asset does not have a permalink of its own (for example, if it's embedded in another asset) or if TypePad does not know its permalink.
positiveVoteCount (integer)
(Read Only) The total number of positive votes this asset has received via the /assets/<id>/cast-positive-vote endpoint.
publicationStatus (PublicationStatus)
An object describing the draft status and publication date for this page.
published (datetime)
(Read Only) The time at which the asset was created, as a W3CDTF timestamp.
reblogOf (AssetRef)
(Read Only) (Deprecated) If this asset was created by 'reblogging' another asset, this property describes the original asset.
reblogOfUrl (string)
(Read Only) (Deprecated) If this asset was created by 'reblogging' another asset or some other arbitrary web page, this property contains the URL of the item that was reblogged.
renderedContent (string)
(Read Only) The content of this asset rendered to HTML. This is currently available only for Post and Page assets.
shortUrl (string)
(Read Only) The short version of the URL that is this asset's permalink. This is currently available only for Post assetes.
source (AssetSource)
(Read Only) An object describing the site from which this asset was retrieved, if the asset was obtained from an external source.
suppressEvents (boolean)
(Write Only) An optional, write-only flag indicating that asset creation should not trigger notification events such as emails or dashboard entries. Not available to all applications.
textFormat (string)
A keyword that indicates what formatting mode to use for the content of this page. This can be html for assets the content of which is HTML, html_convert_linebreaks for assets the content of which is HTML but where paragraph tags should be added automatically, or markdown for assets the content of which is Markdown source. Other formatting modes may be added in future. Applications that present assets for editing should use this property to present an appropriate editor.
title (string)
The title of the page.
urlId (string)
(Read Only) A string containing the canonical identifier that can be used to identify this object in URLs. This can be used to recognise where the same user is returned in response to different requests, and as a mapping key for an application's local data store.

Client Library Methods for PHP

Get a list of pages associated with the selected blog.
$tp->blogs->getPageAssets(array(

    # Required Parameters
    "id" => $id,

    # Optional Parameters
    "limit" => $limit,
    "offset" => $offset,

))
Add a new page to a blog
$tp->blogs->postToPageAssets(array(

    # Required Parameters
    "id" => $id,
    "payload" => $payload,

))

Example Request

GET /blogs/6a012877b13de7970c012877b13df1970c/page-assets.json?max-results=4 HTTP/1.1
Host: api.typepad.com

HTTP/1.0 200 OK
Content-type: application/json
Content-length: 2181

{
   "entries": [
      {
         "excerpt": "Information in this blog should not be construed as legal advice.",
         "content": "<p>Information in this blog should not be construed as legal advice.</p>",
         "favoriteCount": 0,
         "author": {
            "urlId": "6p012877b13de7970c",
            "location": null,
            "interests": [],
            "objectTypes": [
               "tag:api.typepad.com,2009:User"
            ],
            "profilePageUrl": "http://profile.typepad.com/loblawatlaw",
            "aboutMe": null,
            "objectType": "User",
            "preferredUsername": "loblawatlaw",
            "id": "tag:api.typepad.com,2009:6p012877b13de7970c",
            "avatarLink": {
               "width": 250,
               "urlTemplate": "http://static.typepad.com/.shared:vc80f5ff:typepad:en_us/default-userpics/11-{spec}.gif",
               "url": "http://static.typepad.com/.shared:vc80f5ff:typepad:en_us/default-userpics/11-250si.gif",
               "height": 250
            },
            "displayName": "Bob Loblaw"
         },
         "renderedContent": "<p>Information in this blog should not be construed as legal advice.</p>",
         "hasExtendedContent": false,
         "objectType": "Page",
         "groups": [],
         "id": "tag:api.typepad.com,2009:6a012877b13de7970c012877b1463d970c",
         "urlId": "6a012877b13de7970c012877b1463d970c",
         "objectTypes": [
            "tag:api.typepad.com,2009:Page"
         ],
         "container": {
            "urlId": "6a012877b13de7970c012877b13df1970c",
            "objectType": "Blog",
            "id": "tag:api.typepad.com,2009:6a012877b13de7970c012877b13df1970c",
            "homeUrl": "http://bobloblaw.typepad.com/blog/",
            "displayName": "Bob Loblaw Law Blog"
         },
         "description": null,
         "commentCount": 0,
         "published": "2010-02-18T00:06:02Z",
         "textFormat": "html",
         "filename": "welcome-",
         "permalinkUrl": "http://bobloblaw.typepad.com/blog/welcome-.html",
         "title": "Welcome to my Blog"
      }
   ],
   "totalResults": 1
}