Skip to content

Data api resource entries

Yuji Takayama edited this page Jul 10, 2013 · 1 revision

Entries resource

Property Name Type Data Type Database Column Private Read Only Description
author Object - Y The author of this entry.
author.id value unsigned integer mt_author.author_id Y Y The ID of this entry creator.
author.displayName value string mt_author.nickame Y The display name of this entry creator.
author.userpicUrl value string Y The URL of this entry creator's userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string.
blog Object - Y The blog of this entry.
blog.id value unsigned int mt_blog.blog_id Y The ID of the blog that contains this entry.
categories ARRAY string Y A list of categories associated with the entry.
The first element of the array is the primary category. OTHER categories are sorted by label category.
id value unsigned integer mt_entry.entry_id Y The ID of this entry.
class value string mt_entry.entry_class Y The object class for this entry.
status value string The publishing status text of this entry.
Draft
This entry is saved as draft.
entry_status is 1.
Publish
This entry is published.
entry_status is 2.
Review
This entry is waiting for approval.
entry_status is 3.
Future
This entry is scheduled for future publishing.
entry_status is 4.
Spam
This entry is marked as Spam.
entry_status is 5.
allowComments value boolean mt_entry.entry_allow_comments
false
This entry does not accepts comments. In the database, this value is 0.
true
This entry accepts comments. In the database, this value is 1.
allowTrackbacks value boolean mt_entry.entry_allow_pings
false
This entry does not accepts trackbacks. In the database, this value is 0.
true
This entry accepts trackbacks. In the database, this value is 1.
title value string mt_entry.entry_title The title of this entry.
body value string mt_entry.entry_text The contents for this entry.
more value string mt_entry.entry_text_more The extended contents for this entry.
excerpt value string mt_entry.entry_excerpt The excerpt text for this entry.
keywords value string mt_entry.entry_keywords The keywords text for this entry.
basename value string mt_entry.entry_basename The basename for this entry.
permalink value string Y The parmalink URL for this entry.
pingsSentUrl ARRAY string Y The list of TrackBack pings sent from this entry.
date value iso 8601 datetime mt_entry.entry_authored_on The published time for this entry.
createdDate value iso 8601 datetime mt_entry.entry_created_on Y The created time for this entry.
modifiedDate value iso 8601 datetime mt_entry.entry_modified_on Y The last modified time for this entry.
commentCount value unsigned integer mt_entry.entry_comment_count Y The number of comments for this entry.
trackbackCount value unsigned integer mt_entry.entry_comment_count Y The number of received trackbacks for this entry.
comments ARRAY Comments Y The list of comments for this entry. The list is sorted by ID of the comment and The parent ID of the comment.
trackbacks ARRAY Trackbacks Y The list of received trackbacks for this entry. The list is sorted by the ID of trackback.
assets ARRAY Assets Y The list of related assets for this entry.
updatable value boolean
true
The user who accessed can update this entry.
false
The user who accessed cannot update this entry.
customFields ARRAY - Y The list of customfields data for this entry.
customFields.basename value string mt_field.field_basename The basename of this customfield.
customFields.value value string The value of this customfield.
tags ARRAY string The list of entry tags for this entry.

Example


{
  "author" : {
    "id" : 1,
    "displayName" : "Yuji Takayama",
    "userpicUrl" : "http://host.domain/mt-static/support/assets_c/userpics/userpic-1-32x32.png"
  },
  "blog" : {
    "id" : 1
  },
  "categories" : [
    "primary cat",
    "secondary/sub",
    "[include/slash]"
  ],
  "id" : 1,
  "class" : "entry",
  "status" : "Publish",
  "allowComments" : true,
  "allowTrackbacks" : true,
  "title" : "This is an entry.",
  "body" : "Foo bar",
  "more" : "blah blah blah",
  "excerpt" : "Foo",
  "keywords" : "some keywords",
  "basename" : "this_is_an_entry",
  "permalink" : "http://host.domain/blog/2012/01/entry.html",
  "pingsSentUrl" : [
    "http://example.com/blog/foo.html"
  ],
  "date" : "2013-01-11T12:48:12+09:00",
  "createdDate" : "2013-01-11T12:48:12+09:00",
  "modifiedDate" : "2013-01-11T12:48:12+09:00",
  "commentCount" : 2,
  "trackbackCount" : 1,
  "comments" : [
    {
      "status" : "Approved",
      "parent" : 2,
      "link" : "http://host.domain/blog/2012/01/entry.html#comment-1",
      "id" : 1,
      "entry" : {
        "id" : 1
      },
      "date" : "2013-01-11T12:48:12+09:00",
      "customFields" : {
        "items" : [
          {
            "value" : "Test data",
            "basename" : "cf_fields_1"
          },
          {
            "value" : "Test data 2",
            "basename" : "cf_field_2"
          }
        ]
      },
      "body" : "This is a test comment.\nHe he he",
      "blog" : {
        "id" : 1
      },
      "author" : {
        "userpicUrl" : "http://host.domain/mt-static/support/assets_c/userpics/userpic-1-32x32.png",
        "displayName" : "Yuji Takayama",
        "id" : 1
      }
    }
  ],
  "trackbacks" : [
    {
      "blog" : {
        "id" : 1
      },
      "entry" : {
        "id" : 1
      },
      "id" : 1,
      "date" : "2013-01-11T12:48:12+09:00",
      "title" : "Trackback entry",
      "excerpt" : "blah blah blah",
      "blogName" : "Sent from",
      "url" : "http://example.com/blog/trackback.html",
      "ip" : "10.11.12.13"
    }
  ],
  "assets" : [
    {
      "id" : 1,
      "label" : "Sample Image",
      "description" : "My family portrait.",
      "mimeType" : "",
      "tags" : [
        "photo",
        "portrait"
      ],
      "url" : "http://example.com/images/foo.jpg"
    }
  ],
  "updatable": true,
  "customFields" : [
    {
      "basename" : "cf_flag",
      "value" : "any"
    }
  ],
  "tags" : [
    "news",
    "keyword"
  ]
}
Clone this wiki locally