Movable Type Data API v2
The Movable Type Data API is a REST interface to the Movable Type Content Management System. The Data API is available for Movable Type Pro and Movable Type Advanced / Enterprise, Version 6.0 and higher.
Movable Type > 開発者向け ドキュメント > Movable Type Data API ドキュメント
Assets ¶
This is the Assets resource.
Property Name | Type | Data Type | Database Column | Private | Read Only | Description | Version |
---|---|---|---|---|---|---|---|
blog | object | - | The blog of this asset. | v2 | |||
blog.id | value | number | mt_asset.asset_blog_id | Y | The ID of the blog that contains this asset. | v2 | |
class | value | string | mt_asset.asset_class | Y | The type of this asset. This value is similar to ‘type’ attribute but this value is never localized. | v2 | |
createdBy | Object | - | Y | The user who created this asset. | v2 | ||
createdBy.id | value | number | mt_asset.asset_created_by | Y | Y | The ID of user who created asset. | v2 |
createdBy.displayName | value | string | Y | The display name of user who created asset. | v2 | ||
createdBy.userpicUrl | value | string | Y | The URL of creating user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned. | v2 | ||
createdDate | value | iso 8601 datetime | mt_asset.asset_created_on | Y | The created time for this asset. | v2 | |
customFields | ARRAY | - | The list of customfields data for this asset. | v2 | |||
customFields.basename | value | string | mt_field.field_basename | The basename of this customfield. | v2 | ||
customFields.value | value | string | The value of this customfield. | v2 | |||
description | value | string | mt_asset_asset_description | The description of this asset. | v1 | ||
fileExt | value | string | mt_asset.asset_file_ext | Y | The file extension of this asset. Returns the file extension without the leading period. | v2 | |
filename | value | string | mt_asset.asset_filename | Y | The filename of this asset that includes file extension. | v1 | |
id | value | number | mt_asset.asset_id | Y | The ID of this asset. | v1 | |
label | value | string | mt_asset.asset_label | The label of this asset. | v1 | ||
meta | object | - | The meta information of this asset. | v2 | |||
meta.fileSize | value | number | Y | The file size of this asset. If this asset is not file-based asset, will return null. | v2 | ||
meta.height | value | number | Y | The height of this asset. If this asset has no height meta information, will return null. | v2 | ||
meta.width | value | number | Y | The width of this asset. If this asset has no width meta information, will return null. | v2 | ||
mimeType | value | string | mt_asset.asset_mime_type | Y | The MIME Type of this asset. | v1 | |
modifiedBy | Object | - | Y | The user who last modified this asset. | v2 | ||
modifiedBy.displayName | value | string | Y | The display name of user who last modified asset. | v2 | ||
modifiedBy.id | value | number | mt_asset.asset_modified_by | Y | Y | The ID of user who last modified asset. | v2 |
modifiedBy.userpicUrl | value | string | Y | The URL of last modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned. | v2 | ||
modifiedDate | value | iso 8601 datetime | mt_asset.asset_modified_on | Y | The last modified time for this asset. | v2 | |
parent | object | - | The parent asset of this asset. If this asset is not a child of any assets, will return null. | v2 | |||
parent.id | value | number | asset_parent | Y | The ID of parent asset. | v2 | |
tags | ARRAY | string | A list of tags associated with this asset. | v1 | |||
type | value | string | mt_asset.asset_class | Y | The type of this asset. The value returned will be localized value with DefaultLanguage. | v2 | |
updatable | value | boolean | Y |
|
v2 | ||
url | value | string | mt_asset.asset_url | Y | The permalink URL of this asset. | v1 |
{ “createdBy” : { “id” : 1 “userpicUrl” : “/mt-static/support/assets_c/userpics/userpic-1-100x100.png”, “displayName” : “Yuji Takayama” }, “updatable” : false, “meta” : { “width” : “800”, “fileSize” : 194272, “height” : “600” }, “url” : "http://example.com/images/1ab89ee2.jpg", “id” : “5”, “modifiedDate” : “2014-11-05T12:59:36+09:00”, “modifiedBy” : { “id” : 1 “userpicUrl” : “/mt-static/support/assets_c/userpics/userpic-1-100x100.png”, “displayName” : “Yuji Takayama” }, “parent” : null, “blog” : { “id” : “22” }, “description” : “Cat photo”, “tags” : [ “black”, “cat”, “white” ], “filename” : “1ab89ee2.jpg”, “type” : “Images”, “mimeType” : “image/jpeg”, “label” : “Cat One”, “createdDate” : “2014-11-05T12:58:52+09:00”, “class” : “image”, “customFields” : [], “fileExtension” : “jpg” },
uploadAssetForSite ¶
Upload a file to specific site.POST/sites/{site_id}/assets/upload
- This endpoint is marked as deprecated in v2.0.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to upload file. |
404 | Not Found | Site not found. |
409 | Conflict | Uploaded file already exists. |
413 | Request Entity Too Large | Upload file size is larger than CGIMaxUpload. |
Permissions
- upload
Request Body Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
path | string | Yes | The upload destination. You can specify the path to be under the site path. | |
file | file | Yes | Actual file data | |
autoRenameIfExists | boolean | false | If this value is true and a file with the same filename exists, the uploaded file is automatically renamed to a random generated name. | |
normalizeOrientation | boolean | true | If this value is true and the uploaded file has orientation information in Exif data, this file’s orientation is automatically normalized. |
Example URI
- site_id
number
(required)The site ID.
Assets resource
Headers
Content-Type: multipart/form-data
Body
path=/images&file=filedata&autoRenameIfExists=true&normalizeOrientation=false
200
Headers
Content-Type: application/json
Body
{
"id": 1,
"label": "The Bridge",
"mimeType": "image/jpeg",
"url": "http://example.com/images/the-bridge.jpg",
"filename": "the-bridge",
"description": "Taken from over the bridge.",
"tags": [
"boston",
"bridge",
"light"
],
"blog": {
"id": 1
},
"updatable": true,
"modifiedBy": {
"id": 1,
"displayName": "Yuji Takayama",
"userpicUrl": null
},
"modifiedDate": "2014-10-10T13:13:01+09:00",
"createdBy": {
"id": 1,
"displayName": "Yuji Takayama",
"userpicUrl": null
},
"cratedDate": "2014-10-10T13:13:01+09:00",
"type": "Image",
"class": "image",
"fileExt": "jpg",
"parent": {
"id": null
},
"meta": {
"height": 768,
"width": 1024,
"fileSize": 339773
}
}
uploadAsset ¶
New in v2.0: Upload a file.POST/assets/upload{?overwrite_once}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to upload file. |
404 | Not Found | Site not found. |
409 | Conflict | Uploaded file already exists. |
413 | Request Entity Too Large | Upload file size is larger than CGIMaxUpload. |
Permissions
- upload
Request Body Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
site_id | number | Yes | The site ID. | |
path | string | Yes | The upload destination. You can specify the path to be under the site path. | |
file | file | Yes | Actual file data | |
autoRenameIfExists | boolean | false | If this value is true and a file with the same filename exists, the uploaded file is automatically renamed to a random generated name. | |
normalizeOrientation | boolean | true | If this value is true and the uploaded file has orientation information in Exif data, this file’s orientation is automatically normalized. |
Example URI
- overwrite_once
number
(optional)If specify “1”, the API always overwrites an existing file with the uploaded file. This parameter is available in Movable Type 6.1.2
Assets resource
Headers
Content-Type: multipart/form-data
Body
site_id=1&path=/images&file=filedata&autoRenameIfExists=true&normalizeOrientation=false
200
Headers
Content-Type: application/json
Body
{
"id": 1,
"label": "The Bridge",
"mimeType": "image/jpeg",
"url": "http://example.com/images/the-bridge.jpg",
"filename": "the-bridge",
"description": "Taken from over the bridge.",
"tags": [
"boston",
"bridge",
"light"
],
"blog": {
"id": 1
},
"updatable": true,
"modifiedBy": {
"id": 1,
"displayName": "Yuji Takayama",
"userpicUrl": null
},
"modifiedDate": "2014-10-10T13:13:01+09:00",
"createdBy": {
"id": 1,
"displayName": "Yuji Takayama",
"userpicUrl": null
},
"cratedDate": "2014-10-10T13:13:01+09:00",
"type": "Image",
"class": "image",
"fileExt": "jpg",
"parent": {
"id": null
},
"meta": {
"height": 768,
"width": 1024,
"fileSize": 339773
}
}
listAssets ¶
New in v2.0: Retrieve assets in the specified site.GET/sites/{site_id}/assets{?search,searchFields,limit,offset,class,sortBy,sortOrder,fields,relatedAssets}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of assets. |
404 | Not Found | Site not found. |
Example URI
- site_id
number
(required)The site ID. If 0 specified, will retrieve system-level assets.
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: labelThe comma separated list of field names to search.
- limit
number
(optional) Default: 10Maximum number of assets to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- class
string
(optional)The target asset class to retrieve. Supported values are 'image’, 'audio’, 'video’, 'file’, and any values added by plugins. If you want to retrieve multiple classes, specify the values separated by commas.
- sortBy
string
(optional) Default: created_on- file_name
- Sort by the filename of each asset.
- created_by
- Sort by the ID of user who created each asset.
- created_on
- (default) Sort by the created time of each asset.
- sortOrder
string
(optional) Default: descend- descend
- (default) Return assets in descending order. For sorting by date, it means from newest to oldest.
- ascend
- Return assets in ascending order. For sorting by date, it means from oldest to newest.
- fields
string
(optional)The field list to retrieve as part of the Assets resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
- relatedAssets
boolean
(optional)If you want to retrieve related assets (e.g. thumbnail, popup html) that generated by original asset, you should specify this parameter as true.
200
Headers
Content-Type: application/json
Body
{
"totalResults" : 1,
"items" : [
{
"id" : 1,
"label" : "The Bridge",
"mimeType" : "image/jpeg",
"url" : "http://example.com/images/the-bridge.jpg",
"filename" : "the-bridge",
"description" : "Taken from over the bridge.",
"tags" : [
"boston",
"bridge",
"light"
],
"blog" : {
"id" : 1
},
"updatable" : true,
"modifiedBy" : {
"id" : 1,
"displayName" : "Yuji Takayama",
"userpicUrl" : null
},
"modifiedDate" : "2014-10-10T13:13:01+09:00",
"createdBy" : {
"id" : 1,
"displayName" : "Yuji Takayama",
"userpicUrl" : null
},
"cratedDate" : "2014-10-10T13:13:01+09:00",
"type" : "Image",
"class" : "image",
"fileExt" : "jpg",
"parent" : {
"id" : null
},
"meta" : {
"height" : 768,
"width" : 1024,
"fileSize" : 339773
}
]
}
listAssetsForEntry ¶
New in v2.0: Retrieve assets that related with specified entry.GET/sites/{site_id}/entries/{entry_id}/assets{?limit,offset,class,sortBy,sortOrder,fields}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of assets. |
404 | Not Found | Site or entry not found. |
Example URI
- site_id
number
(required)The site ID.
- entry_id
number
(required)The entry ID.
- limit
number
(optional) Default: 10Maximum number of assets to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- class
string
(optional)The target asset class to retrieve. Supported values are image, audio, video, file and any values added by plugins. If you want to retrieve multiple classes, specify the values separated by commas.
- sortBy
string
(optional) Default: created_on- file_name
- Sort by the filename of each asset.
- created_by
- Sort by the ID of user who created each asset.
- created_on
- (default) Sort by the created time of each asset.
- sortOrder
string
(optional) Default: descend- descend
- (default) Return assets in descending order. For sorting by date, it means from newest to oldest.
- ascend
- Return assets in ascending order. For sorting by date, it means from oldest to newest.
- fields
string
(optional)The field list to retrieve as part of the Assets resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
200
Headers
Content-Type: application/json
Body
{
"totalResults" : 1,
"items" : [
{
"id" : 1,
"label" : "The Bridge",
"mimeType" : "image/jpeg",
"url" : "http://example.com/images/the-bridge.jpg",
"filename" : "the-bridge",
"description" : "Taken from over the bridge.",
"tags" : [
"boston",
"bridge",
"light"
],
"blog" : {
"id" : 1
},
"updatable" : true,
"modifiedBy" : {
"id" : 1,
"displayName" : "Yuji Takayama",
"userpicUrl" : null
},
"modifiedDate" : "2014-10-10T13:13:01+09:00",
"createdBy" : {
"id" : 1,
"displayName" : "Yuji Takayama",
"userpicUrl" : null
},
"cratedDate" : "2014-10-10T13:13:01+09:00",
"type" : "Image",
"class" : "image",
"fileExt" : "jpg",
"parent" : {
"id" : null
},
"meta" : {
"height" : 768,
"width" : 1024,
"fileSize" : 339773
}
]
}
listAssetsForPage ¶
New in v2.0: Retrieve assets that related with specified page.GET/sites/{site_id}/pages/{page_id}/assets{?limit,offset,class,sortBy,sortOrder,fields}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of assets. |
404 | Not Found | Site or page not found. |
Example URI
- site_id
number
(required)The site ID.
- page_id
number
(required)The page ID.
- limit
number
(optional) Default: 10Maximum number of assets to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- class
string
(optional)The target asset class to retrieve. Supported values are image, audio, video, file and any values added by plugins. If you want to retrieve multiple classes, specify the values separated by commas.
- sortBy
string
(optional) Default: created_on- file_name
- Sort by the filename of each asset.
- created_by
- Sort by the ID of user who created each asset.
- created_on
- (default) Sort by the created time of each asset.
- sortOrder
string
(optional) Default: descend- descend
- (default) Return assets in descending order. For sorting by date, it means from newest to oldest.
- ascend
- Return assets in ascending order. For sorting by date, it means from oldest to newest.
- fields
string
(optional)The field list to retrieve as part of the Assets resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
200
Headers
Content-Type: application/json
Body
{
"totalResults" : 1,
"items" : [
{
"id" : 1,
"label" : "The Bridge",
"mimeType" : "image/jpeg",
"url" : "http://example.com/images/the-bridge.jpg",
"filename" : "the-bridge",
"description" : "Taken from over the bridge.",
"tags" : [
"boston",
"bridge",
"light"
],
"blog" : {
"id" : 1
},
"updatable" : true,
"modifiedBy" : {
"id" : 1,
"displayName" : "Yuji Takayama",
"userpicUrl" : null
},
"modifiedDate" : "2014-10-10T13:13:01+09:00",
"createdBy" : {
"id" : 1,
"displayName" : "Yuji Takayama",
"userpicUrl" : null
},
"cratedDate" : "2014-10-10T13:13:01+09:00",
"type" : "Image",
"class" : "image",
"fileExt" : "jpg",
"parent" : {
"id" : null
},
"meta" : {
"height" : 768,
"width" : 1024,
"fileSize" : 339773
}
]
}
listAssetsForSiteAndTag ¶
New in v2.0: Retrieve assets that related with specified tag.GET/sites/{site_id}/tags/{tag_id}/assets{?limit,offset,class,sortBy,sortOrder,fields}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of assets. |
404 | Not Found | Site or tag not found. |
Example URI
- site_id
number
(required)The site ID.
- tag_id
number
(required)The tag ID.
- limit
number
(optional) Default: 10Maximum number of assets to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- class
string
(optional)The target asset class to retrieve. Supported values are image, audio, video, file and any values added by plugins. If you want to retrieve multiple classes, specify the values separated by commas.
- sortBy
string
(optional) Default: created_on- file_name
- Sort by the filename of each asset.
- created_by
- Sort by the ID of user who created each asset.
- created_on
- (default) Sort by the created time of each asset.
- sortOrder
string
(optional) Default: descend- descend
- (default) Return assets in descending order. For sorting by date, it means from newest to oldest.
- ascend
- Return assets in ascending order. For sorting by date, it means from oldest to newest.
- fields
string
(optional)The field list to retrieve as part of the Assets resource. The list of fields should be separated by commas. If this parameter is not specified, all fields will be returned.
200
Headers
Content-Type: application/json
Body
{
"totalResults" : 1,
"items" : [
{
"id" : 1,
"label" : "The Bridge",
"mimeType" : "image/jpeg",
"url" : "http://example.com/images/the-bridge.jpg",
"filename" : "the-bridge",
"description" : "Taken from over the bridge.",
"tags" : [
"boston",
"bridge",
"light"
],
"blog" : {
"id" : 1
},
"updatable" : true,
"modifiedBy" : {
"id" : 1,
"displayName" : "Yuji Takayama",
"userpicUrl" : null
},
"modifiedDate" : "2014-10-10T13:13:01+09:00",
"createdBy" : {
"id" : 1,
"displayName" : "Yuji Takayama",
"userpicUrl" : null
},
"cratedDate" : "2014-10-10T13:13:01+09:00",
"type" : "Image",
"class" : "image",
"fileExt" : "jpg",
"parent" : {
"id" : null
},
"meta" : {
"height" : 768,
"width" : 1024,
"fileSize" : 339773
}
]
}
getAsset ¶
New in v2.0: Retrieve single asset by its ID.GET/sites/{site_id}/assets/{asset_id}{?fields}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve an asset. |
404 | Not Found | Asset (or site) not found. |
Example URI
- site_id
number
(required)The site ID.
- asset_id
number
(required)The asset ID.
- fields
string
(optional)The field list to retrieve as part of the Assets resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
200
Headers
Content-Type: application/json
Body
{
"id": 1,
"label": "The Bridge",
"mimeType": "image/jpeg",
"url": "http://example.com/images/the-bridge.jpg",
"filename": "the-bridge",
"description": "Taken from over the bridge.",
"tags": [
"boston",
"bridge",
"light"
],
"blog": {
"id": 1
},
"updatable": true,
"modifiedBy": {
"id": 1,
"displayName": "Yuji Takayama",
"userpicUrl": null
},
"modifiedDate": "2014-10-10T13:13:01+09:00",
"createdBy": {
"id": 1,
"displayName": "Yuji Takayama",
"userpicUrl": null
},
"cratedDate": "2014-10-10T13:13:01+09:00",
"type": "Image",
"class": "image",
"fileExt": "jpg",
"parent": {
"id": null
},
"meta": {
"height": 768,
"width": 1024,
"fileSize": 339773
}
}
updateAsset ¶
New in v2.0: Update an asset.PUT/sites/{site_id}/assets/{asset_id}
-
Authorization is required.
-
This method accepts PUT and POST with __method=PUT.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
401 | Unauthorized | Authentication required |
403 | Forbidden | Do not have permission to update an asset. |
404 | Not Found | Asset (or site) not found. |
405 | Method Not Allowed | Request method is not ‘PUT’ or ‘POST’ with ‘__method=PUT’ |
Permissions
- Manage Assets
Example URI
- site_id
number
(required)The site ID.
- asset_id
number
(required)The asset ID.
Assets resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
asset={
"url" : "http://localhost/blog/20140917-2/images/0cf61aae.jpg",
"id" : "1",
"parent" : null,
"blog" : {
"id" : "1"
},
"description" : "Over the rainbow.",
"tags" : [
"boston",
"bridge",
"light",
"night"
],
"label" : "Night Bridge",
}
200
Headers
Content-Type: application/json
Body
{
"id": 1,
"label": "Night Bridge",
"mimeType": "image/jpeg",
"url": "http://example.com/images/the-bridge.jpg",
"filename": "the-bridge",
"description": "Over the rainbow.",
"tags": [
"boston",
"bridge",
"light",
"night"
],
"blog": {
"id": 1
},
"updatable": true,
"modifiedBy": {
"id": 1,
"displayName": "Yuji Takayama",
"userpicUrl": null
},
"modifiedDate": "2014-10-10T14:13:01+09:00",
"createdBy": {
"id": 1,
"displayName": "Yuji Takayama",
"userpicUrl": null
},
"cratedDate": "2014-10-10T13:13:01+09:00",
"type": "Image",
"class": "image",
"fileExt": "jpg",
"parent": {
"id": null
},
"meta": {
"height": 768,
"width": 1024,
"fileSize": 339773
}
}
deleteAsset ¶
New in v2.0: Delete an asset.DELETE/sites/{site_id}/assets/{asset_id}
-
Authorization is required.
-
This method accepts DELETE and POST with __method=DELETE.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
401 | Unauthorized | Authentication required |
403 | Forbidden | Do not have permission to delete an asset. |
404 | Not Found | Asset (or site) not found. |
405 | Method Not Allowed | Request method is not ‘DELETE’ or ‘POST’ with ‘__method=DELETE’ |
Permissions
- Manage Assets
Example URI
- site_id
number
(required)The site ID.
- asset_id
number
(required)The asset ID.
200
Headers
Content-Type: application/json
Body
{
"id": 1,
"label": "The Bridge",
"mimeType": "image/jpeg",
"url": "http://example.com/images/the-bridge.jpg",
"filename": "the-bridge",
"description": "Taken from over the bridge.",
"tags": [
"boston",
"bridge",
"light"
],
"blog": {
"id": 1
},
"updatable": false,
"modifiedBy": {
"id": 1,
"displayName": "Yuji Takayama",
"userpicUrl": null
},
"modifiedDate": "2014-10-10T13:13:01+09:00",
"createdBy": {
"id": 1,
"displayName": "Yuji Takayama",
"userpicUrl": null
},
"cratedDate": "2014-10-10T13:13:01+09:00",
"type": "Image",
"class": "image",
"fileExt": "jpg",
"parent": {
"id": null
},
"meta": {
"height": 768,
"width": 1024,
"fileSize": 339773
}
}
getThubmbnail ¶
New in v2.0: Get thumbnail of an asset.GET/sites/{site_id}/assets/{asset_id}/thumbnail{?width,height,scale,square}
This endpoint requires one of parameter ‘width’ or ‘height’ or ‘scale’ Also, cannot use these parameters at same time.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
400 | Bad Request | An asset does not support to generate thumbnail file. |
403 | Forbidden | Do not have permission to update an asset. |
404 | Not Found | Asset (or site) not found. |
Permissions
Example URI
- site_id
number
(required)The site ID.
- asset_id
number
(required)The asset ID.
- width
number
(optional)The width of the thumbnail to generate. If this is the only parameter specified then the thumbnail’s width will be scaled proportionally to the height. When a value longer than the original image is specified, it will be ignored.
- height
number
(optional)The height of the thumbnail to generate. If this is the only parameter specified then the thumbnail’s height will be scaled proportionally to the width. When both of height and width are specified, the longer side of the original image will be processed, and the lesser side will be scaled proportionally.
- scale
string
(optional)The percentage by which to reduce or increase the size of the current asset.
- square
boolean
(optional)If set to true then the thumbnail generated will be square, where the length of each side of the square will be equal to the shortest side of the image.
200
Headers
Content-Type: application/json
Body
{
"height": 200,
"width": 200,
"url": "http://example.com/assets_c/2014/10/the-bridge-200x200-1.jpg"
}
Authentication ¶
authentication ¶
Create new session and access token. This is like sign-in.POST/authentication
Example URI
Headers
Content-Type: application/x-www-form-urlencoded
Body
username=<Your Sign-in Name>&password=<Your sign-in Password>&clientId=<Your Client ID>
200
Headers
Content-Type: application/json
Body
{
"accessToken": "EowKdyeBcEUNbiFEXlp0bdQz5RJgdkJYLbBDRJ4m",
"sessionId": "8VtaTLTLp8V9OR5Dz40hO7by8wf0wbCsCkBue0Xv",
"expiresIn": 3600,
"remember": true
}
401
Headers
Content-Type: application/json
Body
{
"error": {
"code": 401,
"message": "Invalid login"
}
}
revokeAuthentication ¶
Invalidate current session. This is like logout.DELETE/authentication
-
Invalidate current session. This is like logout. All access tokens related to that session are invalidated too.
-
This method accepts DELETE and POST with __method=DELETE.
Example URI
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth sessionId=<SessionId>
200
Headers
Content-Type: application/json
Body
{
"status": "success"
}
token ¶
Create new access token related to current session.POST/token
Example URI
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth sessionId=<SessionId>
200
Headers
Content-Type: application/json
Body
{
"accessToken" : "EowKdyeBcEUNbiFEXlp0bdQz5RJgdkJYLbBDRJ4m",
"expiresIn" : 3600,
}
401
Headers
Content-Type: application/json
Body
{
"error": {
"code": 401,
"message": "Unauthorized"
}
}
RevokeToken ¶
Invalidate current access token. This is not logout.DELETE/token
-
Invalidate current access token. This is not logout. If the browser has active session id, new access token can be obtained easily.
-
This method accepts DELETE and POST with __method=DELETE.
Example URI
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<AccessToken>
200
Headers
Content-Type: application/json
Body
{
"status": "success"
}
Categories ¶
This is the Categories resource.
Property Name | Type | Data Type | Database Column | Private | Read Only | Description | Version |
---|---|---|---|---|---|---|---|
archiveLink | value | string | Y | The category archive URL of this category. If “Category” archive mapping is not configured, this value will be null. | v2 | ||
basename | value | string | mt_category_category_basename | The basename of this category. | v1 | ||
blog | object | - | The blog of this category. | v1 | |||
blog.id | value | number | mt_category.category_blog_id | Y | The ID of the blog that contains this category. | v1 | |
class | value | string | mt_category.category_class | Y | The object class for this category. | v1 | |
createdBy | Object | - | Y | The user who created this category. | v2 | ||
createdBy.displayName | value | string | Y | The display name of the user who created this category. | v2 | ||
createdBy.id | value | number | mt_category.category_created_by | Y | Y | The ID of the user who created this category. | v2 |
createdBy.userpicUrl | value | string | Y | The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned. | v2 | ||
createdDate | value | iso 8601 datetime | mt_ctegory.category_created_on | Y | The created time for this category. | v2 | |
customFields | ARRAY | - | The list of customfields data for this category. | v1 | |||
customFields.basename | value | string | mt_field.field_basename | The basename of this customfield. | v1 | ||
customFields.value | value | string | The value of this customfield. | v1 | |||
description | value | string | mt_category.category_description | Y | The description of this category. | v1 | |
id | value | number | mt_category.category_id | Y | The ID of this category. | v1 | |
label | value | string | mt_category.category_label | Y | The label of this category. | v1 | |
modifiedBy | Object | - | Y | The user who last modified this category. | v2 | ||
modifiedBy.id | value | number | mt_category.category_modified_by | Y | Y | The ID of user who last modified category. | v2 |
modifiedBy.displayName | value | string | Y | The display name of user who last modified category. | v2 | ||
modifiedBy.userpicUrl | value | string | Y | The URL of last modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, empty string will be returned. | v2 | ||
modifiedDate | value | iso 8601 datetime | mt_category.category_modified_on | Y | The last modified time for this category. | v2 | |
parent | value | number | mt_category.cateogry_parent | The ID of the parent category for this category. This field can be updated from v2. | v1 | ||
updatable | value | boolean | Y |
|
v2 |
{ “parent” : “0”, “createdBy” : { “id” : 1 “userpicUrl” : “/mt-static/support/assets_c/userpics/userpic-1-100x100.png”, “displayName” : “Yuji Takayama” }, “updatable” : false, “blog” : { “id” : “22” }, “description” : “This category includes news articles”, “basename” : “news”, “archiveLink” : “http://example.com/news/index.html”, “id” : 23, “class” : “category”, “label” : “News”, “createdDate” : “2014-11-05T12:48:27+09:00”, “modifiedDate” : “2014-11-05T12:52:51+09:00”, “modifiedBy” : { “id” : 1 “userpicUrl” : “/mt-static/support/assets_c/userpics/userpic-1-100x100.png”, “displayName” : “Yuji Takayama” }, “customFields” : [ { “basename” : “bannerimage”, “value” : "<form mt:asset-id=“3” class=“mt-enclosure mt-enclosure-image” style=“display: inline;”><a href=“http://localhost/blog/20141105-1/images/4db95178.png”>4db95178.png" }, { “basename” : “address”, “value” : “” }
listCategories ¶
Retrieve categories in the specified site.GET/sites/{site_id}/categories{?search,searchFields,limit,offset,sortBy,sortOrder,fields,top,includeIds,excludeIds}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of categories. |
404 | Not Found | Site not found. |
Example URI
- site_id
number
(required)The site ID.
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: label,basenameThe comma separated list of field names to search.
- limit
number
(optional) Default: 10Maximum number of categories to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: user_custom- user_custom
- Sort order you specified on the Manage Categories screen.
- created_by
- Sort by the ID of user who created each category.
- id
- Sort by the ID of each category.
- basename
- Sort by the basename of each category.
- label
- Sort by the label of each category.
- sortOrder
string
(optional) Default: descend- descend
- (default) Return categories in descending order.
- ascend
- Return categories in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Categories resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
- top
number
(optional) Default: 0If set to 1, retrieves only top level categories. New in v2
- includeIds
string
(optional)The comma separated list of category IDs to include in result.
- excludeIds
string
(optional)The comma separated list of category IDs to exclude from result.
200
Headers
Content-Type: application/json
Body
{
"totalResults" : "1",
"items" : [
{
"basename" : "news",
"parent" : "0",
"archiveLink" : "http://example.com/news/index.html",
"updatable" : false,
"label" : "News",
"class" : "category",
"id" : 2,
"blog" : {
"id" : "1"
},
"description" : null
]
}
listCategoriesForEntry ¶
New in v2.0: Retrieve categories in the specified entry.GET/sites/{site_id}/entries/{entry_id}/categories{?search,searchFields,limit,offset,sortBy,sortOrder,fields,type,includeIds,excludeIds,top}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of categories. |
404 | Not Found | Site or Entry not found. |
Permissions
- edit_entry
- If want to retrieve the non-published entry’s categories.
Example URI
- site_id
number
(required)The site ID.
- entry_id
number
(required)The entry ID.
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: label,basenameThe comma separated list of field names to search.
- limit
number
(optional) Default: 10Maximum number of categories to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: user_custom- user_custom
- Sort order you specified on the Manage Categories screen.
- created_by
- Sort by the ID of user who created each category.
- id
- Sort by the ID of each category.
- basename
- Sort by the basename of each category.
- label
- Sort by the label of each category.
- sortOrder
string
(optional) Default: descend- descend
- (default) Return categories in descending order.
- ascend
- Return categories in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Categories resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
- top
number
(optional) Default: 0If set to 1, retrieves only top level categories. New in v2
- includeIds
string
(optional)The comma separated list of category IDs to include in result.
- excludeIds
string
(optional)The comma separated list of category IDs to exclude from result.
- type
string
(optional)- primary
- Retrieve primary category only
- secondary
- Retrieve secondary categories only
200
Headers
Content-Type: application/json
Body
{
"totalResults" : "1",
"items" : [
{
"basename" : "news",
"parent" : "0",
"archiveLink" : "http://example.com/news/index.html",
"updatable" : false,
"label" : "News",
"class" : "category",
"id" : 2,
"blog" : {
"id" : "1"
},
"description" : null
]
}
listParentCategories ¶
New in v2.0: Retrieve parent categories from the specified category.GET/sites/{site_id}/categories/{category_id}/parents{?maxDepth,includeCurrent}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of categories. |
404 | Not Found | Site or Category not found. |
Example URI
- site_id
number
(required)The site ID.
- category_id
number
(required)The category ID.
- maxDepth
number
(optional) Default: 0The depth of retrieving parent categories.
- includeCurrent
number
(optional) Default: 0- 1
- The list does not include current category.
- 0
- The list includes current category.
200
Headers
Content-Type: application/json
Body
{
"totalResults" : "1",
"items" : [
{
"basename" : "news",
"parent" : "0",
"archiveLink" : "http://example.com/news/index.html",
"updatable" : false,
"label" : "News",
"class" : "category",
"id" : 2,
"blog" : {
"id" : "1"
},
"description" : null
]
}
listSiblingCategories ¶
New in v2.0: Retrieve siblings categories from the specified category.GET/sites/{site_id}/categories/{category_id}/siblings{?search,searchFields,limit,offset,sortBy,sortOrder,fields,top,includeIds,excludeIds}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of categories. |
404 | Not Found | Site or Category not found. |
Example URI
- site_id
number
(required)The site ID.
- category_id
number
(required)The category ID.
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: label,basenameThe comma separated list of field names to search.
- limit
number
(optional) Default: 10Maximum number of categories to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: user_custom- user_custom
- Sort order you specified on the Manage Categories screen.
- created_by
- Sort by the ID of user who created each category.
- id
- Sort by the ID of each category.
- basename
- Sort by the basename of each category.
- label
- Sort by the label of each category.
- sortOrder
string
(optional) Default: descend- descend
- (default) Return categories in descending order.
- ascend
- Return categories in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Categories resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
- top
number
(optional) Default: 0If set to 1, retrieves only top level categories. New in v2
- includeIds
string
(optional)The comma separated list of category IDs to include in result.
- excludeIds
string
(optional)The comma separated list of category IDs to exclude from result.
200
Headers
Content-Type: application/json
Body
{
"totalResults" : "1",
"items" : [
{
"basename" : "news",
"parent" : "0",
"archiveLink" : "http://example.com/news/index.html",
"updatable" : false,
"label" : "News",
"class" : "category",
"id" : 2,
"blog" : {
"id" : "1"
},
"description" : null
]
}
listChildCategories ¶
New in v2.0: Retrieve child categories from the specified category.GET/sites/{site_id}/categories/{category_id}/children{?maxDepth,includeCurrent}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of categories. |
404 | Not Found | Site or Category not found. |
Example URI
- site_id
number
(required)The site ID.
- category_id
number
(required)The category ID.
- maxDepth
number
(optional) Default: 0The depth of retrieving parent categories.
- includeCurrent
number
(optional) Default: 0- 0
- The list does not include current category.
- 1
- The list includes current category.
200
Headers
Content-Type: application/json
Body
{
"totalResults" : "1",
"items" : [
{
"basename" : "news",
"parent" : "0",
"archiveLink" : "http://example.com/news/index.html",
"updatable" : false,
"label" : "News",
"class" : "category",
"id" : 2,
"blog" : {
"id" : "1"
},
"description" : null
]
}
createCategory ¶
New in v2.0: Create a new category.POST/sites/{site_id}/categories
- Authorization is required.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to create a new category. |
404 | Not Found | Site not found. |
Permission
- Manage Categories
Request Body Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
category | Object | Yes | Single Categories resource |
Example URI
- site_id
number
(required)The site ID.
Assets resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
category={"basename" : "news","parent" : "0","label" : "News","description" : null}
200
Headers
Content-Type: application/json
Body
{
"totalResults" : "1",
"items" : [
{
"basename" : "news",
"parent" : "0",
"archiveLink" : "http://example.com/news/index.html",
"updatable" : false,
"label" : "News",
"class" : "category",
"id" : 2,
"blog" : {
"id" : "1"
},
"description" : null
]
}
getCategory ¶
New in v2.0: Retrieve single category by its ID.GET/sites/{site_id}/categories/{category_id}{?fields}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve an category. |
404 | Not Found | Category or site not found. |
Example URI
- site_id
number
(required)The site ID.
- category_id
number
(required)The category ID.
- fields
string
(optional)The field list to retrieve as part of the Categories resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
200
Headers
Content-Type: application/json
Body
{
"basename": "news",
"parent": "0",
"archiveLink": "http://example.com/news/index.html",
"updatable": false,
"label": "News",
"class": "category",
"id": 2,
"blog": {
"id": "1"
},
"description": null
}
updateCategory ¶
New in v2.0: Update an existing category.PUT/sites/{site_id}/categories/{category_id}
-
Authorization is required.
-
This method accepts PUT and POST with __method=PUT.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to update a category. |
404 | Not Found | Site or Category not found. |
Permission
- Manage Categories
Request Body Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
category | Object | Yes | Single Categories resource |
Example URI
- site_id
number
(required)The site ID.
- category_id
number
(required)The category ID.
Categories resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
category={"basename" : "news","parent" : "0","archiveLink" : "http://example.com/news/index.html","updatable" : false,"label" : "News","class" : "category","id" : "1","blog" : {"id" : "1"},"description" : null,"customFields" : [{"basename" : "bannerImage","value" : "http://example.com/images/banner.jpg"}]}
200
Headers
Content-Type: application/json
Body
{
"basename": "news",
"parent": "0",
"archiveLink": "http://example.com/news/index.html",
"updatable": false,
"label": "News",
"class": "category",
"id": 2,
"blog": {
"id": "1"
},
"description": null
}
deleteCategory ¶
New in v2.0: Delete an existing category.DELETE/sites/{site_id}/categories/{category_id}
-
Authorization is required.
-
This method accepts DELETE and POST with __method=DELETE.
-
This method returns deleted Category resource.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to delete a category. |
404 | Not Found | Site or Category not found. |
Permission
- Manage Categories
Example URI
- site_id
number
(required)The site ID.
- category_id
number
(required)The category ID.
200
Headers
Content-Type: application/json
Body
{
"basename": "news",
"parent": "0",
"archiveLink": "http://example.com/news/index.html",
"updatable": false,
"label": "News",
"class": "category",
"id": 2,
"blog": {
"id": "1"
},
"description": null
}
permutateCategories ¶
New in v2.0: Rearrange existing categories in a new order.POST/sites/{site_id}/categories/permutate
-
Authorization is required.
-
This method returns rearranged Categories resource.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to delete a category. |
404 | Not Found | Site not found. |
Permission
- Manage Categories
Request Body Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
categories | ARRAY | Yes | Array of Categories resource that were rearranged. |
Example URI
- site_id
number
(required)The site ID.
Assets resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
category=[{"basename" : "news","parent" : "0","archiveLink" : "http://example.com/news/index.html","updatable" : false,"label" : "News","class" : "category","id" : "1","blog" : {"id" : "1"},"description" : null,"customFields" : [{"basename" : "bannerImage","value" : "http://example.com/images/banner.jpg"}]}]
200
Headers
Content-Type: application/json
Body
[
{
"basename": "news",
"parent": "0",
"archiveLink": "http://example.com/news/index.html",
"updatable": false,
"label": "News",
"class": "category",
"id": 2,
"blog": {
"id": "1"
},
"description": null
}
]
Entries ¶
This is the Entries resource.
Property Name | Type | Data Type | Database Column | Private | Read Only | Description | Version |
---|---|---|---|---|---|---|---|
allowComments | value | boolean | mt_entry.entry_allow_comments |
|
v1 | ||
allowTrackbacks | value | boolean | mt_entry.entry_allow_pings |
|
v1 | ||
assets | ARRAY | Assets | Y | The list of related assets for this entry. | v1 | ||
author | Object | Y | The author of this entry. | v1 | |||
author.displayName | value | string | mt_author.nickame | Y | The display name of this entry creator. | v1 | |
author.id | value | number | mt_entry.entry_author_id | Y | Y | The ID of this entry creator. | v1 |
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. | v1 | ||
basename | value | string | mt_entry.entry_basename | The basename for this entry. | v1 | ||
blog | Object | Y | The blog of this entry. | v1 | |||
blog.id | value | number | mt_entry.entry_blog_id | Y | The ID of the blog that contains this entry. | v1 | |
body | value | string | mt_entry.entry_text | The contents of this entry that the text format is applied. [update in v2] if you want to get the raw contents, you should sent a “no_text_filter=1” parameter with authenticated request. | v1 | ||
categories | ARRAY | Categories | 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. [Update in v2] The value of this property was changed from “category label” to “Categories object”. | v1 | |||
class | value | string | mt_entry.entry_class | Y | The object class for this entry. | v1 | |
commentCount | value | number | mt_entry.entry_comment_count | Y | The number of comments for this entry. | v1 | |
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. | v1 | ||
createdDate | value | iso 8601 datetime | mt_entry.entry_created_on | Y | The created time for this entry. | v1 | |
customFields | ARRAY | Object | The list of customfields data for this entry. | v1 | |||
customField.basename | value | string | mt_field.field_basename | Y | The basename of this customfield. | v1 | |
customField.value | value | string | The value of this customfield. | v1 | |||
date | value | iso 8601 datetime | mt_entry.entry_authored_on | The published time for this entry. | v1 | ||
excerpt | value | string | mt_entry.entry_excerpt | The excerpt value of this entry if one is specified or, if not, an auto-generated excerpt from the Entry Body field followed by an ellipsis (“…”). If an excerpt is auto-generated also note that any HTML is stripped. The length of the auto-generated output of this tag can be set in the blog’s Entry Settings. | v1 | ||
format | value | string | mt_entry.entry_convert_breaks | Y | The text format of this entry. | v2 | |
id | value | number | mt_entry.entry_id | Y | The ID of this entry. | v1 | |
keywords | value | string | mt_entry.entry_keywords | The keywords text for this entry. | v1 | ||
modifiedDate | value | iso 8601 datetime | mt_entry.entry_modified_on | Y | The last modified time for this entry. | v1 | |
more | value | string | mt_entry.entry_text_more | The extended contents for this entry. [update in v2] if you want to get the raw contents, you should sent a “no_text_filter=1” parameter with authenticated request. | v1 | ||
permalink | value | value | string | Y | The parmalink URL for this entry. | v1 | |
pingsSentUrl | ARRAY | string | Y | The list of TrackBack pings sent from this entry. | v1 | ||
status | value | string |
|
v1 | |||
tags | ARRAY | string | The list of entry tags for this entry. | v1 | |||
title | value | string | mt_entry.entry_title | The title of this entry. | v1 | ||
trackbackCount | value | number | mt_entry.entry_comment_count | The number of received trackbacks for this entry. | v1 | ||
trackbacks | ARRAY | Trackbacks | Y | The list of received trackbacks for this entry. The list is sorted by the ID of trackback. | v1 | ||
updatable | value | boolean | Y |
|
v1 |
{ “excerpt” : “We are excited to announce that Six Apar…”, “status” : “Publish”, “date” : “2014-11-14T13:08:42¥u002b09:00”, “updatable” : false, “author” : { “userpicUrl” : null, “displayName” : “Yuji Takayama” }, “allowComments” : true, “comments” : [], “permalink” : "http://localhost/blog/20141114-1/2014/11/six-apart-acquires-topics-server-to-simplify-site-upgrades.html", “body” : “¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e”, “keywords” : “”, “allowTrackbacks” : false, “id” : 5, “trackbacks” : [], “modifiedDate” : “2014-11-14T13:17:52¥u002b09:00”, “trackbackCount” : “0”, “categories” : [], “blog” : { “id” : “1” }, “commentCount” : “0”, “tags” : [], “basename” : “six_apart_acquires_topics_server_to_simplify_site_upgrades”, “assets” : [], “pingsSentUrl” : [], “title” : “Six Apart Acquires Topics Server to Simplify Site Upgrades”, “class” : “entry”, “createdDate” : “2014-11-14T13:17:52¥u002b09:00”, “more” : “”, “customFields” : [ { “basename” : “place”, “value” : “New York City” }, { “basename” : “agenda”, “value” : “Movable Type¥nTopics” } ] }
listEntries ¶
Retrieve a list of entries in the specified site.GET/sites/{site_id}/entries{?search,searchFields,limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds,status,maxComments,maxTrackbacks,no_text_filter}
- Authorization is required if want to include unpublished entries.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of entries. |
404 | Not Found | Site not found. |
Permissions
- edit_entry
- for retrieve unpublished entry
Example URI
- site_id
number
(required)The site ID.
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: title,body,more,keywords,excerpt,basenameThe comma separated field name list to search.
- limit
number
(optional) Default: 10Maximum number of entries to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: authored_onThe field name for sort. You can specify one of following values
- authored_on
- title
- created_on
- modified_on
- sortOrder
string
(optional) Default: descend- descend
- (default) Return entries in descending order.
- ascend
- Return entries in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Entries resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds
string
(optional)The comma separated ID list of entries to include to result.
- excludeIds
string
(optional)The comma separated ID list of entries to exclude from result.
- status
string
(optional)Filter by container entry’s status.
- Draft
- entry_status is 1.
- Publish
- entry_status is 2.
- Review
- entry_status is 3.
- Future
- entry_status is 4.
- Spam
- entry_status is 5.
- maxComments
number
(optional)This is an optional parameter. Maximum number of comments to retrieve as part of the Entries resource. If this parameter is not supplied, no comments will be returned.
- maxTrackbacks
number
(optional)This is an optional parameter. Maximum number of received trackbacks to retrieve as part of the Entries resource. If this parameter is not supplied, no trackbacks will be returned.
- no_text_filter
number
(optional) Default: 0If you want to fetch the raw text, set to ‘1’. New in v2
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"excerpt": "We are excited to announce that Six Apar...",
"status": "Publish",
"date": "2014-11-14T13:08:42¥u002b09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/blog/20141114-1/2014/11/six-apart-acquires-topics-server-to-simplify-site-upgrades.html",
"body": "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e",
"keywords": "",
"allowTrackbacks": false,
"id": 5,
"trackbacks": [],
"modifiedDate": "2014-11-14T13:17:52¥u002b09:00",
"trackbackCount": "0",
"categories": [],
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "six_apart_acquires_topics_server_to_simplify_site_upgrades",
"assets": [],
"pingsSentUrl": [],
"title": "Six Apart Acquires Topics Server to Simplify Site Upgrades",
"class": "entry",
"createdDate": "2014-11-14T13:17:52¥u002b09:00",
"more": "",
"customFields": [
{
"basename": "place",
"value": "New York City"
},
{
"basename": "agenda",
"value": "Movable Type¥nTopics"
}
]
}
]
}
listEntriesForCategory ¶
New in v2.0: Retrieve a list of entries by specific category.GET/sites/{site_id}/categories/{category_id}/entries{?search,searchFields,limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds,status,maxComments,maxTrackbacks,no_text_filter}
- Authorization is required if want to include unpublished entries.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of entries. |
404 | Not Found | Site or Category not found. |
Permissions
- edit_entry
- for retrieve unpublished entry
Example URI
- site_id
number
(required)The site ID.
- category_id
number
(required)The category ID.
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: title,body,more,keywords,excerpt,basenameThe comma separated field name list to search.
- limit
number
(optional) Default: 10Maximum number of entries to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: authored_onThe field name for sort. You can specify one of following values
- authored_on
- title
- created_on
- modified_on
- sortOrder
string
(optional) Default: descend- descend
- (default) Return entries in descending order.
- ascend
- Return entries in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Entries resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds
string
(optional)The comma separated ID list of entries to include to result.
- excludeIds
string
(optional)The comma separated ID list of entries to exclude from result.
- status
string
(optional)Filter by container entry’s status.
- Draft
- entry_status is 1.
- Publish
- entry_status is 2.
- Review
- entry_status is 3.
- Future
- entry_status is 4.
- Spam
- entry_status is 5.
- maxComments
number
(optional)This is an optional parameter. Maximum number of comments to retrieve as part of the Entries resource. If this parameter is not supplied, no comments will be returned.
- maxTrackbacks
number
(optional)This is an optional parameter. Maximum number of received trackbacks to retrieve as part of the Entries resource. If this parameter is not supplied, no trackbacks will be returned.
- no_text_filter
number
(optional) Default: 0If you want to fetch the raw text, set to ‘1’. New in v2
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"excerpt": "We are excited to announce that Six Apar...",
"status": "Publish",
"date": "2014-11-14T13:08:42¥u002b09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/blog/20141114-1/2014/11/six-apart-acquires-topics-server-to-simplify-site-upgrades.html",
"body": "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e",
"keywords": "",
"allowTrackbacks": false,
"id": 5,
"trackbacks": [],
"modifiedDate": "2014-11-14T13:17:52¥u002b09:00",
"trackbackCount": "0",
"categories": [],
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "six_apart_acquires_topics_server_to_simplify_site_upgrades",
"assets": [],
"pingsSentUrl": [],
"title": "Six Apart Acquires Topics Server to Simplify Site Upgrades",
"class": "entry",
"createdDate": "2014-11-14T13:17:52¥u002b09:00",
"more": "",
"customFields": [
{
"basename": "place",
"value": "New York City"
},
{
"basename": "agenda",
"value": "Movable Type¥nTopics"
}
]
}
]
}
listEntriesForAsset ¶
New in v2.0: Retrieve a list of entries that related with specific asset.GET/sites/{site_id}/assets/{asset_id}/entries{?search,searchFields,limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds,status,maxComments,maxTrackbacks,no_text_filter}
- Authorization is required if want to include unpublished entries.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of entries. |
404 | Not Found | Site or Asset not found. |
Permissions
- edit_entry
- for retrieve unpublished entry
Example URI
- site_id
number
(required)The site ID.
- asset_id
number
(required)The asset ID.
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: title,body,more,keywords,excerpt,basenameThe comma separated field name list to search.
- limit
number
(optional) Default: 10Maximum number of entries to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: authored_onThe field name for sort. You can specify one of following values
- authored_on
- title
- created_on
- modified_on
- sortOrder
string
(optional) Default: descend- descend
- (default) Return entries in descending order.
- ascend
- Return entries in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Entries resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds
string
(optional)The comma separated ID list of entries to include to result.
- excludeIds
string
(optional)The comma separated ID list of entries to exclude from result.
- status
string
(optional)Filter by container entry’s status.
- Draft
- entry_status is 1.
- Publish
- entry_status is 2.
- Review
- entry_status is 3.
- Future
- entry_status is 4.
- Spam
- entry_status is 5.
- maxComments
number
(optional)This is an optional parameter. Maximum number of comments to retrieve as part of the Entries resource. If this parameter is not supplied, no comments will be returned.
- maxTrackbacks
number
(optional)This is an optional parameter. Maximum number of received trackbacks to retrieve as part of the Entries resource. If this parameter is not supplied, no trackbacks will be returned.
- no_text_filter
number
(optional) Default: 0If you want to fetch the raw text, set to ‘1’. New in v2
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"excerpt": "We are excited to announce that Six Apar...",
"status": "Publish",
"date": "2014-11-14T13:08:42¥u002b09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/blog/20141114-1/2014/11/six-apart-acquires-topics-server-to-simplify-site-upgrades.html",
"body": "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e",
"keywords": "",
"allowTrackbacks": false,
"id": 5,
"trackbacks": [],
"modifiedDate": "2014-11-14T13:17:52¥u002b09:00",
"trackbackCount": "0",
"categories": [],
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "six_apart_acquires_topics_server_to_simplify_site_upgrades",
"assets": [],
"pingsSentUrl": [],
"title": "Six Apart Acquires Topics Server to Simplify Site Upgrades",
"class": "entry",
"createdDate": "2014-11-14T13:17:52¥u002b09:00",
"more": "",
"customFields": [
{
"basename": "place",
"value": "New York City"
},
{
"basename": "agenda",
"value": "Movable Type¥nTopics"
}
]
}
]
}
listEntriesForSiteAndTag ¶
New in v2.0: Retrieve a list of entries that related with specific tag.GET/sites/{site_id}/tags/{tag_id}/entries{?search,searchFields,limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds,status,status,maxComments,maxTrackbacks,no_text_filter}
- Authorization is required if want to include unpublished entries.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of entries. |
404 | Not Found | Site or Tag not found. |
Permissions
- edit_entry
- for retrieve unpublished entry
Example URI
- site_id
number
(required)The site ID.
- tag_id
number
(required)The tag ID.
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: title,body,more,keywords,excerpt,basenameThe comma separated field name list to search.
- limit
number
(optional) Default: 10Maximum number of entries to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: authored_onThe field name for sort. You can specify one of following values
- authored_on
- title
- created_on
- modified_on
- sortOrder
string
(optional) Default: descend- descend
- (default) Return entries in descending order.
- ascend
- Return entries in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Entries resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds
string
(optional)The comma separated ID list of entries to include to result.
- excludeIds
string
(optional)The comma separated ID list of entries to exclude from result.
- status
string
(optional)Filter by container entry’s status.
- Draft
- entry_status is 1.
- Publish
- entry_status is 2.
- Review
- entry_status is 3.
- Future
- entry_status is 4.
- Spam
- entry_status is 5.
- maxComments
number
(optional)This is an optional parameter. Maximum number of comments to retrieve as part of the Entries resource. If this parameter is not supplied, no comments will be returned.
- maxTrackbacks
number
(optional)This is an optional parameter. Maximum number of received trackbacks to retrieve as part of the Entries resource. If this parameter is not supplied, no trackbacks will be returned.
- no_text_filter
number
(optional) Default: 0If you want to fetch the raw text, set to ‘1’. New in v2
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"excerpt": "We are excited to announce that Six Apar...",
"status": "Publish",
"date": "2014-11-14T13:08:42¥u002b09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/blog/20141114-1/2014/11/six-apart-acquires-topics-server-to-simplify-site-upgrades.html",
"body": "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e",
"keywords": "",
"allowTrackbacks": false,
"id": 5,
"trackbacks": [],
"modifiedDate": "2014-11-14T13:17:52¥u002b09:00",
"trackbackCount": "0",
"categories": [],
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "six_apart_acquires_topics_server_to_simplify_site_upgrades",
"assets": [],
"pingsSentUrl": [],
"title": "Six Apart Acquires Topics Server to Simplify Site Upgrades",
"class": "entry",
"createdDate": "2014-11-14T13:17:52¥u002b09:00",
"more": "",
"customFields": [
{
"basename": "place",
"value": "New York City"
},
{
"basename": "agenda",
"value": "Movable Type¥nTopics"
}
]
}
]
}
createEntry ¶
Create a new entry.POST/sites/{site_id}/entries
- Authorization is required.
Update in v2.0
- You can attach categories and assets in the one request.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to create a new entry. |
404 | Not Found | Site not found. |
Permissions
- create_post
Request Body Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
entry | Object | Yes | Single Entries resource |
Example URI
- site_id
number
(required)The site ID.
Entries resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
entry={"excerpt" : "We are excited to announce that Six Apar...","status" : "Publish","allowComments" : true,"body" : "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e","keywords" : "","allowTrackbacks" : false,"basename" : "six_apart_acquires_topics_server_to_simplify_site_upgrades","title" : "Six Apart Acquires Topics Server to Simplify Site Upgrades","more" : "","customFields" : [{"basename" : "place","value" : "New York City"},{"basename" : "agenda","value" : "Movable Type¥nTopics"}]}
200
Headers
Content-Type: application/json
Body
{
"excerpt": "We are excited to announce that Six Apar...",
"status": "Publish",
"date": "2014-11-14T13:08:42¥u002b09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/blog/20141114-1/2014/11/six-apart-acquires-topics-server-to-simplify-site-upgrades.html",
"body": "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e",
"keywords": "",
"allowTrackbacks": false,
"id": 5,
"trackbacks": [],
"modifiedDate": "2014-11-14T13:17:52¥u002b09:00",
"trackbackCount": "0",
"categories": [],
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "six_apart_acquires_topics_server_to_simplify_site_upgrades",
"assets": [],
"pingsSentUrl": [],
"title": "Six Apart Acquires Topics Server to Simplify Site Upgrades",
"class": "entry",
"createdDate": "2014-11-14T13:17:52¥u002b09:00",
"more": "",
"customFields": [
{
"basename": "place",
"value": "New York City"
},
{
"basename": "agenda",
"value": "Movable Type¥nTopics"
}
]
}
getEntry ¶
Retrieve a single entry by its ID.GET/sites/{site_id}/entries/{entry_id}{?fields}
- Authorization is required if the entry status is “unpublished”. If the entry status is “published”, then this method can be called without authorization.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the requested entry. |
404 | Not Found | Site or Entry not found. |
Example URI
- site_id
number
(required)The site ID.
- entry_id
number
(required)The entry ID.
- fields
string
(optional)The field list to retrieve as part of the Entries resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
200
Headers
Content-Type: application/json
Body
{
"excerpt": "We are excited to announce that Six Apar...",
"status": "Publish",
"date": "2014-11-14T13:08:42¥u002b09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/blog/20141114-1/2014/11/six-apart-acquires-topics-server-to-simplify-site-upgrades.html",
"body": "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e",
"keywords": "",
"allowTrackbacks": false,
"id": 5,
"trackbacks": [],
"modifiedDate": "2014-11-14T13:17:52¥u002b09:00",
"trackbackCount": "0",
"categories": [],
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "six_apart_acquires_topics_server_to_simplify_site_upgrades",
"assets": [],
"pingsSentUrl": [],
"title": "Six Apart Acquires Topics Server to Simplify Site Upgrades",
"class": "entry",
"createdDate": "2014-11-14T13:17:52¥u002b09:00",
"more": "",
"customFields": [
{
"basename": "place",
"value": "New York City"
},
{
"basename": "agenda",
"value": "Movable Type¥nTopics"
}
]
}
updateEntry ¶
Update an existing entry.PUT/sites/{site_id}/entries/{entry_id}
-
Authorization is required.
-
This method accepts PUT and POST with __method=PUT.
Update in v2.0
- You can attach/detach categories and assets in the one request.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to update the speciied entry. |
404 | Not Found | Site or Entry not found. |
Permissions
- edit_entry
- for retrieve unpublished entry
Example URI
- site_id
number
(required)The site ID.
- entry_id
number
(required)The entry ID.
Entries resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
entry={"excerpt" : "We are excited to announce that Six Apar...","status" : "Publish","allowComments" : true,"body" : "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e","keywords" : "","allowTrackbacks" : false,"basename" : "six_apart_acquires_topics_server_to_simplify_site_upgrades","title" : "Six Apart Acquires Topics Server to Simplify Site Upgrades","more" : "","customFields" : [{"basename" : "place","value" : "New York City"},{"basename" : "agenda","value" : "Movable Type¥nTopics"}]}
200
Headers
Content-Type: application/json
Body
{
"excerpt": "We are excited to announce that Six Apar...",
"status": "Publish",
"date": "2014-11-14T13:08:42¥u002b09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/blog/20141114-1/2014/11/six-apart-acquires-topics-server-to-simplify-site-upgrades.html",
"body": "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e",
"keywords": "",
"allowTrackbacks": false,
"id": 5,
"trackbacks": [],
"modifiedDate": "2014-11-14T13:17:52¥u002b09:00",
"trackbackCount": "0",
"categories": [],
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "six_apart_acquires_topics_server_to_simplify_site_upgrades",
"assets": [],
"pingsSentUrl": [],
"title": "Six Apart Acquires Topics Server to Simplify Site Upgrades",
"class": "entry",
"createdDate": "2014-11-14T13:17:52¥u002b09:00",
"more": "",
"customFields": [
{
"basename": "place",
"value": "New York City"
},
{
"basename": "agenda",
"value": "Movable Type¥nTopics"
}
]
}
deleteEntry ¶
Delete an existing entry.DELETE/sites/{site_id}/entries/{entry_id}
- Authorization is required. This method accepts PUT and POST with __method=DELETE.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to delete the speciied entry. |
404 | Not Found | Site or Entry not found. |
Permissions
- edit_entry
- for retrieve unpublished entry
Example URI
- site_id
number
(required)The site ID.
- entry_id
number
(required)The entry ID.
200
Headers
Content-Type: application/json
Body
{
"excerpt": "We are excited to announce that Six Apar...",
"status": "Publish",
"date": "2014-11-14T13:08:42¥u002b09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/blog/20141114-1/2014/11/six-apart-acquires-topics-server-to-simplify-site-upgrades.html",
"body": "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e",
"keywords": "",
"allowTrackbacks": false,
"id": 5,
"trackbacks": [],
"modifiedDate": "2014-11-14T13:17:52¥u002b09:00",
"trackbackCount": "0",
"categories": [],
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "six_apart_acquires_topics_server_to_simplify_site_upgrades",
"assets": [],
"pingsSentUrl": [],
"title": "Six Apart Acquires Topics Server to Simplify Site Upgrades",
"class": "entry",
"createdDate": "2014-11-14T13:17:52¥u002b09:00",
"more": "",
"customFields": [
{
"basename": "place",
"value": "New York City"
},
{
"basename": "agenda",
"value": "Movable Type¥nTopics"
}
]
}
previewEntry ¶
new in v2.0: Make a preview for a entry.POST/sites/{site_id}/entries/preview{?raw}
-
Authorization is required.
-
This endpoint is available in Movable Type 6.1.2 or later.
Permissions
- create_post
Example URI
- site_id
number
(required)The site ID.
- raw
number
(optional)If specify “1”, will be returned preview contents.
Entries resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
entry={ "title" : "My First Post", "body" : "This is my first post!" }
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"preview": "http://example.com/2015/07/my-first-post.html"
}
403
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Do not have permission to get entry preview.",
"code": "403"
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Site not found",
"code": "404"
}
}
500
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Some error message is here",
"code": "500"
}
}
previewEntryById ¶
new in v2.0: Make a preview for a entry with existing data.POST/sites/{site_id}/entries/{entry_id}/preview{?raw}
-
Authorization is required.
-
This endpoint is available in Movable Type 6.1.2 or later.
-
entry parameter is required. If you just want to get preview entry from existing data, you should provide entry parameter with empty json.
Permissions
- create_post
Example URI
- site_id
number
(required)The site ID.
- entry_id
number
(required)The entry ID.
- raw
number
(optional)If specify “1”, will be returned preview contents.
Templates resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
entry={}
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"preview": "http://example.com/2015/07/existing-entry.html"
}
403
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Do not have permission to get entry preview.",
"code": "403"
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Site not found / Entry not found",
"code": "404"
}
}
500
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Some error message is here",
"code": "500"
}
}
Folders ¶
This is the Folders resource.
Property Name | Type | Data Type | Database Column | Private | Read Only | Description | Version |
---|---|---|---|---|---|---|---|
basename | value | string | mt_category.category_basename | The basename for this folder. | v2 | ||
blog | Object | Blog | Y | The blog for this folder. | v2 | ||
blog.id | value | number | mt_category.category_blog_id | Y | The ID of the blog that contains this folder. | v2 | |
class | value | string | mt_category.category_class | Y | The class for this folder. Always “folder”. | v2 | |
createdBy | Object | User | Y | Created user of this folder. | v2 | ||
createdBy.displayName | value | string | mt_author.author_nickname | Y | The display name of this folder creator. | v2 | |
createdBy.id | value | number | mt_category.category_created_by | Y | Y | The ID of this folder creator. | v2 |
createdBy.userpicUrl | value | string | mt_author.author_userpic_url | Y | The URL of this folder 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. | v2 | |
createdDate | value | iso 8601 datetime | mt_category.category_created_on | Y | Created date of this folder. | v2 | |
customFields | ARRAY | Object | Y | The list of customfields data for this folder. | v2 | ||
customField.basename | value | string | mt_field.field_basename | Y | The basename for this customfield. | v2 | |
customField.value | value | string | mt_template_meta.* | The value of this customfield. | v2 | ||
description | value | string | mt_category.category_description | The description for this folder. | v2 | ||
id | value | number | mt_category.category_id | Y | The ID for this folder. | v2 | |
label | value | string | mt_category.category_label | The label for this folder. | v2 | ||
modifiedBy | Object | User | Y | Last modified user of this folder. | v2 | ||
modifiedBy.displayName | value | string | mt_author.author_nickname | Y | The display name of this folder modifier. | v2 | |
modifiedBy.id | value | number | mt_category.category_modified_by | Y | Y | The ID of this folder modifier. | v2 |
modifiedBy.userpicUrl | value | string | mt_author.author_userpic_url | Y | The URL of this folder modifier’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. | New in v2 | |
modifiedDate | value | iso 8601 datetime | mt_category.category_modified_on | Y | Last modified date of this folder. | v2 | |
path | value | string | Y | The path for this folder. | v2 | ||
updatable | value | boolean | Y |
|
v2 |
{ “parent”: “0”, “createdBy”: { “userpicUrl”: null, “displayName”: “Yuji Takayama” }, “updatable”: false, “blog”: { “id”: “2” }, “path”: "http://path/to/downloads/", “description”: null, “basename”: “downloads”, “label”: “downloads”, “class”: “folder”, “id”: 12, “createdDate”: “2015-03-30T22:47:08+09:00”, “modifiedDate”: “2015-03-30T22:47:08+09:00”, “customFields”: [] },
listFolders ¶
New in v2.0: Retrieve a list of folders.GET/sites/{site_id}/folders{?limit,offset,sortBy,sortOrder,fields,searchFields,search,includeIds,excludeIds,top}
- Authentication required if you want to get private properties.
Example URI
- site_id
number
(required)The site ID
- limit
number
(optional) Default: 10Maximum number of folders to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: user_custom- user_custom
- Sort order you specified on the Manage Folders screen.
- created_by
- Sort by the ID of creator.
- id
- Sort by its own ID.
- basename
- Sort by the basename of each folders.
- label
- Sort by the label of each folders.
- sortOrder
string
(optional) Default: descend- descend
- (default) Return folders in descending order.
- ascend
- Return folders in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Folders resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- searchFields
string
(optional) Default: label,basenameThe comma separated field name list to search.
- search
string
(optional)Search query.
- includeIds
string
(optional)The comma separated ID list of folders to include to result.
- excludeIds
string
(optional)The comma separated ID list of folders to exclude from result.
- top
number
(optional) Default: 0If set to 1, retrieves only top level folders.
200
Headers
Content-Type: application/json
Body
{
"totalResults" : "1",
"items" : [
{
"parent": "0",
"createdBy": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"updatable": false,
"blog": {
"id": "2"
},
"path": "http://path/to/downloads/",
"description": null,
"basename": "downloads",
"label": "downloads",
"class": "folder",
"id": 12,
"createdDate": "2015-03-30T22:47:08+09:00",
"modifiedDate": "2015-03-30T22:47:08+09:00",
"customFields": []
},
]
}
listParentFolders ¶
New in v2.0: Retrieve a list of parent folders of the requested folder.GET/sites/{site_id}/folders/{folder_id}/parents{?maxDepth,includeCurrent}
- Authentication required if you want to get private properties.
Example URI
- site_id
number
(required)The site ID.
- folder_id
number
(required)The folder ID.
- maxDepth
numner
(optional)The depth of retrieving parent folders.
- includeCurrent
number
(optional) Default: 0- 1
- The results includes current folder.
- 0 The results do not include current folder.
200
Headers
Content-Type: application/json
Body
{
"totalResults" : "1",
"items" : [
{
"parent": "0",
"createdBy": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"updatable": false,
"blog": {
"id": "2"
},
"path": "http://path/to/downloads/",
"description": null,
"basename": "downloads",
"label": "downloads",
"class": "folder",
"id": 12,
"createdDate": "2015-03-30T22:47:08+09:00",
"modifiedDate": "2015-03-30T22:47:08+09:00",
"customFields": []
},
]
}
listSiblingFolders ¶
New in v2.0: Retrieve a list of sibling folders of the requested folder.GET/sites/{site_id}/folders/{folder_id}/siblings{?limit,offset,sortBy,sortOrder,fields,searchFields,search,includeIds,excludeIds,top}
- Authentication required if you want to get private properties.
Example URI
- site_id
number
(required)The site ID
- folder_id
number
(required)The folder ID.
- limit
number
(optional) Default: 10Maximum number of folders to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: user_custom- user_custom
- Sort order you specified on the Manage Folders screen.
- created_by
- Sort by the ID of creator.
- id
- Sort by its own ID.
- basename
- Sort by the basename of each folders.
- label
- Sort by the label of each folders.
- sortOrder
string
(optional) Default: descend- descend
- (default) Return folders in descending order.
- ascend
- Return folders in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Folders resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- searchFields
string
(optional) Default: label,basenameThe comma separated field name list to search.
- search
string
(optional)Search query.
- includeIds
string
(optional)The comma separated ID list of folders to include to result.
- excludeIds
string
(optional)The comma separated ID list of folders to exclude from result.
- top
number
(optional) Default: 0If set to 1, retrieves only top level folders.
200
Headers
Content-Type: application/json
Body
{
"totalResults" : "1",
"items" : [
{
"parent": "0",
"createdBy": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"updatable": false,
"blog": {
"id": "2"
},
"path": "http://path/to/downloads/",
"description": null,
"basename": "downloads",
"label": "downloads",
"class": "folder",
"id": 12,
"createdDate": "2015-03-30T22:47:08+09:00",
"modifiedDate": "2015-03-30T22:47:08+09:00",
"customFields": []
},
]
}
listChildFolders ¶
New in v2.0: Retrieve a list of child folders of the requested folder.GET/sites/{site_id}/folders/{folder_id}/children{?maxDepth,includeCurrent}
- Authentication required if you want to get private properties.
Example URI
- site_id
number
(required)The site ID.
- folder_id
number
(required)The folder ID.
- maxDepth
numner
(optional)The depth of retrieving child folders.
- includeCurrent
number
(optional) Default: 0- 1
- The results includes current folder.
- 0 The results do not include current folder.
200
Headers
Content-Type: application/json
Body
{
"totalResults" : "1",
"items" : [
{
"parent": "0",
"createdBy": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"updatable": false,
"blog": {
"id": "2"
},
"path": "http://path/to/downloads/",
"description": null,
"basename": "downloads",
"label": "downloads",
"class": "folder",
"id": 12,
"createdDate": "2015-03-30T22:47:08+09:00",
"modifiedDate": "2015-03-30T22:47:08+09:00",
"customFields": []
},
]
}
createFolder ¶
New in v2.0: Create a new folder.POST/sites/{site_id}/folders
- Authorization is required.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to create a new folder. |
404 | Not Found | Site not found. |
Permission
- Manage Pages
Request Body Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
folder | Object | Yes | Single Folders resource |
Example URI
- site_id
number
(required)The site ID.
Folders resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
folder={"basename" : "news","parent" : "0","label" : "News","description" : null}
200
Headers
Content-Type: application/json
Body
{
"basename" : "news",
"blog" : {
"id" : "1"
},
"class" : "folder",
"createdBy" : {
"displayName" : "Masahiro IUCHI"
"userpicUrl" : null,
},
"createdDate" : "2019-07-03T18:19:40+09:00",
"customFields" : [],
"description" : null,
"id" : 2,
"label" : "News",
"modifiedDate" : "2019-07-03T18:19:40+09:00",
"parent" : "0",
"path" : "https://example.com/site/news",
"updatable" : true
}
getFolder ¶
New in v2.0: Retrieve single folder by its ID.GET/sites/{site_id}/folders/{folder_id}{?fields}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve a folder. |
404 | Not Found | Folder or site not found. |
Example URI
- site_id
number
(required)The site ID.
- folder_id
number
(required)The folder ID.
- fields
string
(optional)The field list to retrieve as part of the Folders resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
200
Headers
Content-Type: application/json
Body
{
"basename" : "news",
"blog" : {
"id" : "1"
},
"class" : "folder",
"createdBy" : {
"displayName" : "Masahiro IUCHI"
"userpicUrl" : null,
},
"createdDate" : "2019-07-03T18:19:40+09:00",
"customFields" : [],
"description" : null,
"id" : 2,
"label" : "News",
"modifiedDate" : "2019-07-03T18:19:40+09:00",
"parent" : "0",
"path" : "https://example.com/site/news",
"updatable" : false
}
updateFolder ¶
New in v2.0: Update an existing folder.PUT/sites/{site_id}/Folders/{folder_id}
-
Authorization is required.
-
This method accepts PUT and POST with __method=PUT.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to update a folder. |
404 | Not Found | Site or Folder not found. |
Permission
- Manage Pages
Request Body Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
folder | Object | Yes | Single Folders resource |
Example URI
- site_id
number
(required)The site ID.
- folder_id
number
(required)The folder ID.
Categories resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
folder={"basename" : "news","parent" : "0","label" : "News","description" : null}
200
Headers
Content-Type: application/json
Body
{
"basename" : "news",
"blog" : {
"id" : "1"
},
"class" : "folder",
"createdBy" : {
"displayName" : "Masahiro IUCHI"
"userpicUrl" : null,
},
"createdDate" : "2019-07-03T18:19:40+09:00",
"customFields" : [],
"description" : null,
"id" : 2,
"label" : "News",
"modifiedDate" : "2019-07-03T18:19:40+09:00",
"parent" : "0",
"path" : "https://example.com/site/news",
"updatable" : true
}
deleteFolder ¶
New in v2.0: Delete an existing folder.DELETE/sites/{site_id}/folders/{folder_id}
-
Authorization is required.
-
This method accepts DELETE and POST with __method=DELETE.
-
This method returns deleted Folder resource.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to delete a folder. |
404 | Not Found | Site or Folder not found. |
Permission
- Manage Pages
Example URI
- site_id
number
(required)The site ID.
- folder_id
number
(required)The folder ID.
200
Headers
Content-Type: application/json
Body
{
"basename" : "news",
"blog" : {
"id" : "1"
},
"class" : "folder",
"createdBy" : {
"displayName" : "Masahiro IUCHI"
"userpicUrl" : null,
},
"createdDate" : "2019-07-03T18:19:40+09:00",
"customFields" : [],
"description" : null,
"id" : 2,
"label" : "News",
"modifiedDate" : "2019-07-03T18:19:40+09:00",
"parent" : "0",
"path" : "https://example.com/site/news",
"updatable" : true
}
permutateFolders ¶
New in v2.0: Rearrange existing folders in a new order.POST/sites/{site_id}/folders/permutate
-
Authorization is required.
-
This method returns rearranged Folders resource.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to rearrange folders. |
404 | Not Found | Site not found. |
Permission
- Manage Pages
Request Body Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
folders | ARRAY | Yes | Array of Folders resource that will be rearranged. |
Example URI
- site_id
number
(required)The site ID.
Folders resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
folders=[{"id" : "2"},{"id" : "2"}]
200
Headers
Content-Type: application/json
Body
[
{
"basename" : "news",
"blog" : {
"id" : "1"
},
"class" : "folder",
"createdBy" : {
"displayName" : "Masahiro IUCHI"
"userpicUrl" : null,
},
"createdDate" : "2019-07-03T18:19:40+09:00",
"customFields" : [],
"description" : null,
"id" : 2,
"label" : "News",
"modifiedDate" : "2019-07-03T18:19:40+09:00",
"parent" : "0",
"path" : "https://example.com/site/news",
"updatable" : true,
},
{
"basename" : "events",
"blog" : {
"id" : "1"
},
"class" : "folder",
"createdBy" : {
"displayName" : "Masahiro IUCHI"
"userpicUrl" : null,
},
"createdDate" : "2019-07-03T18:19:40+09:00",
"customFields" : [],
"description" : null,
"id" : 1,
"label" : "Events",
"modifiedDate" : "2019-07-03T18:19:40+09:00",
"parent" : "0",
"path" : "https://example.com/site/events",
"updatable" : true,
}
]
Logs ¶
This is the Logs resource.
Property Name | Type | Data Type | Database Column | Private | Read Only | Description | Version |
---|---|---|---|---|---|---|---|
blog | Object | Blog | Y | The blog of this log. | v2 | ||
blog.id | value | Number | mt_log.log_blog_id | Y | The ID of the blog that contains this log. | v2 | |
by | Object | User | Y | Created user of this log. | v2 | ||
by.id | value | Number | mt_log.log_author_id | The ID of this log creator. | v2 | ||
by.displayName | value | String | mt_author.author_nickname | Y | The display name of this log creator. | v2 | |
by.userpicUrl | value | String | mt_author.author_userpic | The URL of this log 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. | v2 | ||
category | value | String | mt_log.log_category | The category of this log. | v2 | ||
class | value | String | mt_log.log_class | The class of this log. | v2 | ||
date | value | iso 8601 datetime | mt_log.log_created_on | Y | Created date of this log. | v2 | |
id | value | Number | mt_log.log_id | Y | The ID of this log. | v2 | |
ip | value | String | mt_log.log_ip | Y | The remote IP address of this log creator. | v2 | |
level | value | String | mt_log.log_level | The level of this log.
|
New in v2 | ||
message | value | String | mt_log.log_message | The message of this log. | v2 | ||
metadata | value | String | mt_log.log_metadata | The metadata of this log. | v2 | ||
upatable | value | boolean | Y |
|
v2 |
{ “ip”: “127.0.0.1”, “date”: “2015-06-29T09:29:35+09:00”, “updatable”: true, “blog”: { “id”: “1” }, “message”: “Some log messages here.”, “by”: { “userpicUrl”: null, “id”: “1”, “displayName”: “Yuji Takayama” }, “level”: “INFO”, “metadata”: “”, “category”: “new”, “class”: “template”, “id”: “370” }
listLogs ¶
New in v2.0: Retrieve a list of logs in the specified site.GET/sites/:site_id/logs{?site_id,limit,offset,sortBy,sortOrder,fields,searchFields,search,includeIds,excludeIds,level}
- Authorization is required.
Permissions
-
view_blog_log for website and blog.
-
view_log for the system.
Example URI
- site_id
number
(required)The site ID. If 0 specified, will load from global template in the system.
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: message,ipThe comma separated list of field names to search. Available value is ‘message’ and ‘ip’.
- limit
number
(optional) Default: 25Maximum number of logs to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: created_on- id
- created_on
- blog_id
- author_id
- level
- class
- sortOrder
string
(optional) Default: descend- descend
- Return templates in descending order. For sorting by date, it means from newest to oldest.
- ascend
- Return templates in ascending order. For sorting by date, it means from oldest to newest.
- fields
string
(optional)The field list to retrieve as part of the Logs resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
- includeIds
string
(optional)The comma separated list of log IDs to include in result.
- excludeIds
string
(optional)The comma separated list of log IDSs to exclude from result.
- level
string
(optional)The comma separated list of level name to filter logs. Available value is foolows.
- security
- error
- warning
- info
- debug
- security_or_error
- security_or_error_or_warning
- not_debug
- debug_or_error
Headers
X-MT-Authorization: MTAuth accessToken=<accessToken>
200
Headers
Content-Type: application/json
Body
{
"totalResults": "224",
"items": [
{
"ip": "127.0.0.1",
"date": "2015-06-29T09:29:35+09:00",
"updatable": true,
"blog": {
"id": "1"
},
"message": "Some log messages here.",
"by": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"level": "INFO",
"metadata": "",
"category": "new",
"class": "template",
"id": "370"
}
]
}
401
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Unauthorized",
"code": 401
}
}
403
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Do not have permission to retrieve the list of activity logs.",
"code": "403"
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Site not found",
"code": "404"
}
}
500
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Some error message is here",
"code": "500"
}
}
Pages ¶
This is the Pages resource.
Property Name | Type | Data Type | Database Column | Private | Read Only | Description | Version |
---|---|---|---|---|---|---|---|
allowComments | value | boolean | mt_entry.entry_allow_comments |
|
v2 | ||
allowTrackbacks | value | boolean | mt_entry.entry_allow_pings |
|
v2 | ||
assets | ARRAY | Assets | Y | The list of related assets for this page. | v2 | ||
author | Object | Y | The author of this page. | v2 | |||
author.displayName | value | string | mt_author.nickame | Y | The display name of this page creator. | v2 | |
author.id | value | number | mt_entry.entry_author_id | Y | Y | The ID of this page creator. | v2 |
author.userpicUrl | value | string | Y | The URL of this page 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. | v2 | ||
basename | value | string | mt_entry.entry_basename | The basename for this page. | v2 | ||
blog | Object | Y | The blog of this page. | v2 | |||
blog.id | value | number | mt_entry.entry_blog_id | Y | The ID of the blog that contains this page. | v2 | |
body | value | string | mt_entry.entry_text | The contents of this page that the text format is applied. [update in v2] if you want to get the raw contents, you should sent a “no_text_filter=1” parameter with authenticated request. | v2 | ||
folder | Object | Folder | The container folder of this page. | v2 | |||
class | value | string | mt_entry.entry_class | Y | The object class for this page. | v2 | |
commentCount | value | number | mt_entry.entry_comment_count | Y | The number of comments for this page. | v2 | |
comments | ARRAY | Comments | Y | The list of comments for this page. The list is sorted by ID of the comment and The parent ID of the comment. | v2 | ||
createdDate | value | iso 8601 datetime | mt_entry.entry_created_on | Y | The created time for this page. | v2 | |
customFields | ARRAY | Object | The list of customfields data for this page. | v2 | |||
customField.basename | value | string | mt_field.field_basename | Y | The basename of this customfield. | v2 | |
customField.value | value | string | The value of this customfield. | v2 | |||
date | value | iso 8601 datetime | mt_entry.entry_authored_on | The published time for this page. | v2 | ||
excerpt | value | string | mt_entry.entry_excerpt | The excerpt value of this page if one is specified or, if not, an auto-generated excerpt from the page Body field followed by an ellipsis (“…”). If an excerpt is auto-generated also note that any HTML is stripped. The length of the auto-generated output of this tag can be set in the blog’s page Settings. | v2 | ||
format | value | string | mt_entry.entry_convert_breaks | Y | The text format of this page. | v2 | |
id | value | number | mt_entry.entry_id | Y | The ID of this page. | v2 | |
keywords | value | string | mt_entry.entry_keywords | The keywords text for this page. | v2 | ||
modifiedDate | value | iso 8601 datetime | mt_entry.entry_modified_on | Y | The last modified time for this page. | v2 | |
more | value | string | mt_entry.entry_text_more | The extended contents for this page. if you want to get the raw contents, you should sent a “no_text_filter=1” parameter with authenticated request. | v2 | ||
permalink | value | value | string | Y | The parmalink URL for this page. | v2 | |
pingsSentUrl | ARRAY | string | Y | The list of TrackBack pings sent from this page. | v2 | ||
status | value | string |
|
v2 | |||
tags | ARRAY | string | The list of page tags for this page. | v2 | |||
title | value | string | mt_entry.entry_title | The title of this page. | v2 | ||
trackbackCount | value | number | mt_entry.entry_comment_count | The number of received trackbacks for this page. | v2 | ||
trackbacks | ARRAY | Trackbacks | Y | The list of received trackbacks for this page. The list is sorted by the ID of trackback. | v2 | ||
updatable | value | boolean | Y |
|
v2 |
{ “excerpt” : “We are excited to announce that Six Apar…”, “status” : “Publish”, “date” : “2014-11-14T13:08:42¥u002b09:00”, “updatable” : false, “author” : { “userpicUrl” : null, “displayName” : “Yuji Takayama” }, “allowComments” : true, “comments” : [], “permalink” : "http://localhost/news/six-apart-acquires-topics-server-to-simplify-site-upgrades.html", “body” : “¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e”, “keywords” : “”, “allowTrackbacks” : false, “id” : 5, “trackbacks” : [], “modifiedDate” : “2014-11-14T13:17:52¥u002b09:00”, “trackbackCount” : “0”, “folder” : { “id” : 2, “parent” : 1, “label” : “news” }, “blog” : { “id” : “1” }, “commentCount” : “0”, “tags” : [], “basename” : “six_apart_acquires_topics_server_to_simplify_site_upgrades”, “assets” : [], “pingsSentUrl” : [], “title” : “Six Apart Acquires Topics Server to Simplify Site Upgrades”, “class” : “entry”, “createdDate” : “2014-11-14T13:17:52¥u002b09:00”, “more” : “”, “customFields” : [ { “basename” : “place”, “value” : “New York City” }, { “basename” : “agenda”, “value” : “Movable Type¥nTopics” } ] }
listPages ¶
New in v2.0: Retrieve a list of pages in the specified site.GET/sites/{site_id}/pages{?search,searchFields,limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds,status,maxComments,maxTrackbacks,no_text_filter}
- Authorization is required if want to include unpublished pages.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of pages. |
404 | Not Found | Site not found. |
Permissions
- manage_pages
- for retrieve unpublished page
Example URI
- site_id
number
(required)The site ID.
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: title,body,more,keywords,excerpt,basenameThe comma separated field name list to search.
- limit
number
(optional) Default: 10Maximum number of pages to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: modified_onThe field name for sort. You can specify one of following values
- authored_on
- title
- created_on
- modified_on
- sortOrder
string
(optional) Default: descend- descend
- (default) Return pages in descending order.
- ascend
- Return pages in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Pages resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds
string
(optional)The comma separated ID list of pages to include to result.
- excludeIds
string
(optional)The comma separated ID list of pages to exclude from result.
- status
string
(optional)Filter by container page’s status.
- Draft
- status is 1.
- Publish
- status is 2.
- Review
- status is 3.
- Future
- status is 4.
- Spam
- status is 5.
- maxComments
number
(optional)This is an optional parameter. Maximum number of pages to retrieve as part of the Pages resource. If this parameter is not supplied, no pages will be returned.
- maxTrackbacks
number
(optional)This is an optional parameter. Maximum number of received trackbacks to retrieve as part of the Pages resource. If this parameter is not supplied, no trackbacks will be returned.
- no_text_filter
number
(optional) Default: 0If you want to fetch the raw text, set to ‘1’. New in v2
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"excerpt": "We are excited to announce that Six Apar...",
"status": "Publish",
"date": "2014-11-14T13:08:42¥u002b09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/news/six-apart-acquires-topics-server-to-simplify-site-upgrades.html",
"body": "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e",
"keywords": "",
"allowTrackbacks": false,
"id": 5,
"trackbacks": [],
"modifiedDate": "2014-11-14T13:17:52¥u002b09:00",
"trackbackCount": "0",
"folder": {
"id": 2,
"parent": 1,
"label": "news"
},
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "six_apart_acquires_topics_server_to_simplify_site_upgrades",
"assets": [],
"pingsSentUrl": [],
"title": "Six Apart Acquires Topics Server to Simplify Site Upgrades",
"class": "entry",
"createdDate": "2014-11-14T13:17:52¥u002b09:00",
"more": "",
"customFields": [
{
"basename": "place",
"value": "New York City"
},
{
"basename": "agenda",
"value": "Movable Type¥nTopics"
}
]
}
]
}
listPagesForFolder ¶
New in v2.0: Retrieve a list of pages by specific folder.GET/sites/{site_id}/folders/{folder_id}/pages{?search,searchFields,limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds,status,maxComments,maxTrackbacks,no_text_filter}
- Authorization is required if want to include unpublished pages.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of pages. |
404 | Not Found | Site or Folder not found. |
Permissions
- manage_pages
- for retrieve unpublished page
Example URI
- site_id
number
(required)The site ID.
- folder_id
number
(required)The folder ID.
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: title,body,more,keywords,excerpt,basenameThe comma separated field name list to search.
- limit
number
(optional) Default: 10Maximum number of pages to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: modified_onThe field name for sort. You can specify one of following values
- authored_on
- title
- created_on
- modified_on
- sortOrder
string
(optional) Default: descend- descend
- (default) Return pages in descending order.
- ascend
- Return pages in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Pages resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds
string
(optional)The comma separated ID list of pages to include to result.
- excludeIds
string
(optional)The comma separated ID list of pages to exclude from result.
- status
string
(optional)Filter by container page’s status.
- Draft
- status is 1.
- Publish
- status is 2.
- Review
- status is 3.
- Future
- status is 4.
- Spam
- status is 5.
- maxComments
number
(optional)This is an optional parameter. Maximum number of comments to retrieve as part of the Pages resource. If this parameter is not supplied, no comments will be returned.
- maxTrackbacks
number
(optional)This is an optional parameter. Maximum number of received trackbacks to retrieve as part of the Pages resource. If this parameter is not supplied, no trackbacks will be returned.
- no_text_filter
number
(optional) Default: 0If you want to fetch the raw text, set to ‘1’. New in v2
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"excerpt": "We are excited to announce that Six Apar...",
"status": "Publish",
"date": "2014-11-14T13:08:42¥u002b09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/news/six-apart-acquires-topics-server-to-simplify-site-upgrades.html",
"body": "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e",
"keywords": "",
"allowTrackbacks": false,
"id": 5,
"trackbacks": [],
"modifiedDate": "2014-11-14T13:17:52¥u002b09:00",
"trackbackCount": "0",
"folder": {
"id": 2,
"parent": 1,
"label": "news"
},
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "six_apart_acquires_topics_server_to_simplify_site_upgrades",
"assets": [],
"pingsSentUrl": [],
"title": "Six Apart Acquires Topics Server to Simplify Site Upgrades",
"class": "entry",
"createdDate": "2014-11-14T13:17:52¥u002b09:00",
"more": "",
"customFields": [
{
"basename": "place",
"value": "New York City"
},
{
"basename": "agenda",
"value": "Movable Type¥nTopics"
}
]
}
]
}
listPagesForAsset ¶
New in v2.0: Retrieve a list of pages that related with specific asset.GET/sites/{site_id}/assets/{asset_id}/pages{?search,searchFields,limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds,status,maxComments,maxTrackbacks,no_text_filter}
- Authorization is required if want to include unpublished pages.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of pages. |
404 | Not Found | Site or Asset not found. |
Permissions
- manage_pages
- for retrieve unpublished page
Example URI
- site_id
number
(required)The site ID.
- asset_id
number
(required)The asset ID.
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: title,body,more,keywords,excerpt,basenameThe comma separated field name list to search.
- limit
number
(optional) Default: 10Maximum number of pages to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: authored_onThe field name for sort. You can specify one of following values
- authored_on
- title
- created_on
- modified_on
- sortOrder
string
(optional) Default: descend- descend
- (default) Return pages in descending order.
- ascend
- Return pages in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Pages resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds
string
(optional)The comma separated ID list of pages to include to result.
- excludeIds
string
(optional)The comma separated ID list of pages to exclude from result.
- status
string
(optional)Filter by container entry’s status.
- Draft
- entry_status is 1.
- Publish
- entry_status is 2.
- Review
- entry_status is 3.
- Future
- entry_status is 4.
- Spam
- entry_status is 5.
- maxComments
number
(optional)This is an optional parameter. Maximum number of pages to retrieve as part of the Pages resource. If this parameter is not supplied, no pages will be returned.
- maxTrackbacks
number
(optional)This is an optional parameter. Maximum number of received trackbacks to retrieve as part of the Pages resource. If this parameter is not supplied, no trackbacks will be returned.
- no_text_filter
number
(optional) Default: 0If you want to fetch the raw text, set to ‘1’. New in v2
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"excerpt": "We are excited to announce that Six Apar...",
"status": "Publish",
"date": "2014-11-14T13:08:42¥u002b09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/blog/20141114-1/2014/11/six-apart-acquires-topics-server-to-simplify-site-upgrades.html",
"body": "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e",
"keywords": "",
"allowTrackbacks": false,
"id": 5,
"trackbacks": [],
"modifiedDate": "2014-11-14T13:17:52¥u002b09:00",
"trackbackCount": "0",
"folder": {
"id": 2,
"parent": 1,
"label": "news"
},
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "six_apart_acquires_topics_server_to_simplify_site_upgrades",
"assets": [],
"pingsSentUrl": [],
"title": "Six Apart Acquires Topics Server to Simplify Site Upgrades",
"class": "entry",
"createdDate": "2014-11-14T13:17:52¥u002b09:00",
"more": "",
"customFields": [
{
"basename": "place",
"value": "New York City"
},
{
"basename": "agenda",
"value": "Movable Type¥nTopics"
}
]
}
]
}
listPagesForSiteAndTag ¶
New in v2.0: Retrieve a list of pages that related with specific tag.GET/sites/{site_id}/tags/{tag_id}/pages{?search,searchFields,limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds,status,status,maxComments,maxTrackbacks,no_text_filter}
- Authorization is required if want to include unpublished pages.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of pages. |
404 | Not Found | Site or Tag not found. |
Permissions
- manage_pages
- for retrieve unpublished page
Example URI
- site_id
number
(required)The site ID.
- tag_id
number
(required)The tag ID.
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: title,body,more,keywords,excerpt,basenameThe comma separated field name list to search.
- limit
number
(optional) Default: 10Maximum number of pages to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: modified_onThe field name for sort. You can specify one of following values
- authored_on
- title
- created_on
- modified_on
- sortOrder
string
(optional) Default: descend- descend
- (default) Return pages in descending order.
- ascend
- Return pages in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Pages resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds
string
(optional)The comma separated ID list of pages to include to result.
- excludeIds
string
(optional)The comma separated ID list of pages to exclude from result.
- status
string
(optional)Filter by container entry’s status.
- Draft
- entry_status is 1.
- Publish
- entry_status is 2.
- Review
- entry_status is 3.
- Future
- entry_status is 4.
- Spam
- entry_status is 5.
- maxComments
number
(optional)This is an optional parameter. Maximum number of pages to retrieve as part of the Pages resource. If this parameter is not supplied, no pages will be returned.
- maxTrackbacks
number
(optional)This is an optional parameter. Maximum number of received trackbacks to retrieve as part of the Pages resource. If this parameter is not supplied, no trackbacks will be returned.
- no_text_filter
number
(optional) Default: 0If you want to fetch the raw text, set to ‘1’.
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"excerpt": "We are excited to announce that Six Apar...",
"status": "Publish",
"date": "2014-11-14T13:08:42¥u002b09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/blog/20141114-1/2014/11/six-apart-acquires-topics-server-to-simplify-site-upgrades.html",
"body": "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e",
"keywords": "",
"allowTrackbacks": false,
"id": 5,
"trackbacks": [],
"modifiedDate": "2014-11-14T13:17:52¥u002b09:00",
"trackbackCount": "0",
"folder": {
"id": 2,
"parent": 1,
"label": "news"
},
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "six_apart_acquires_topics_server_to_simplify_site_upgrades",
"assets": [],
"pingsSentUrl": [],
"title": "Six Apart Acquires Topics Server to Simplify Site Upgrades",
"class": "entry",
"createdDate": "2014-11-14T13:17:52¥u002b09:00",
"more": "",
"customFields": [
{
"basename": "place",
"value": "New York City"
},
{
"basename": "agenda",
"value": "Movable Type¥nTopics"
}
]
}
]
}
createPage ¶
Create a new page.POST/sites/{site_id}/pages
- Authorization is required.
Update in v2.0
- You can attach folder and assets in the one request.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to create a new page. |
404 | Not Found | Site not found. |
Permissions
- manage_post
Request Body Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
page | Object | Yes | Single Pages resource |
Example URI
- site_id
number
(required)The site ID.
Pages resource
Headers
Content-Type: application/x-www-form-urlencoded
200
Headers
Content-Type: application/json
Body
{
"excerpt": "We are excited to announce that Six Apar...",
"status": "Publish",
"date": "2014-11-14T13:08:42¥u002b09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/blog/20141114-1/2014/11/six-apart-acquires-topics-server-to-simplify-site-upgrades.html",
"body": "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e",
"keywords": "",
"allowTrackbacks": false,
"id": 5,
"trackbacks": [],
"modifiedDate": "2014-11-14T13:17:52¥u002b09:00",
"trackbackCount": "0",
"folder": {
"id": 2,
"parent": 1,
"label": "news"
},
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "six_apart_acquires_topics_server_to_simplify_site_upgrades",
"assets": [],
"pingsSentUrl": [],
"title": "Six Apart Acquires Topics Server to Simplify Site Upgrades",
"class": "entry",
"createdDate": "2014-11-14T13:17:52¥u002b09:00",
"more": "",
"customFields": [
{
"basename": "place",
"value": "New York City"
},
{
"basename": "agenda",
"value": "Movable Type¥nTopics"
}
]
}
getPage ¶
Retrieve a single page by its ID.GET/sites/{site_id}/pages/{page_id}{?fields}
- Authorization is required if the page status is “unpublished”. If the page status is “published”, then this method can be called without authorization.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the requested page. |
404 | Not Found | Site or Page not found. |
Example URI
- site_id
number
(required)The site ID.
- page_id
number
(required)The page ID.
- fields
string
(optional)The field list to retrieve as part of the Pages resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
200
Headers
Content-Type: application/json
Body
{
"excerpt": "We are excited to announce that Six Apar...",
"status": "Publish",
"date": "2014-11-14T13:08:42¥u002b09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/blog/20141114-1/2014/11/six-apart-acquires-topics-server-to-simplify-site-upgrades.html",
"body": "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e",
"keywords": "",
"allowTrackbacks": false,
"id": 5,
"trackbacks": [],
"modifiedDate": "2014-11-14T13:17:52¥u002b09:00",
"trackbackCount": "0",
"folder": {
"id": 2,
"parent": 1,
"label": "news"
},
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "six_apart_acquires_topics_server_to_simplify_site_upgrades",
"assets": [],
"pingsSentUrl": [],
"title": "Six Apart Acquires Topics Server to Simplify Site Upgrades",
"class": "entry",
"createdDate": "2014-11-14T13:17:52¥u002b09:00",
"more": "",
"customFields": [
{
"basename": "place",
"value": "New York City"
},
{
"basename": "agenda",
"value": "Movable Type¥nTopics"
}
]
}
updatePage ¶
Update an existing page.PUT/sites/{site_id}/pages/{page_id}
-
Authorization is required.
-
This method accepts PUT and POST with __method=PUT.
** Update in v2.0 **
- You can attach/detach folder and assets in the one request.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to update the speciied age. |
404 | Not Found | Site or Pagenot found. |
Permissions
- manage_pages
Example URI
- site_id
number
(required)The site ID.
- page_id
number
(required)The page ID.
Entries resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
page={"excerpt" : "We are excited to announce that Six Apar...","status" : "Publish","allowComments" : true,"body" : "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e","keywords" : "","allowTrackbacks" : false,"basename" : "six_apart_acquires_topics_server_to_simplify_site_upgrades","title" : "Six Apart Acquires Topics Server to Simplify Site Upgrades","more" : "","customFields" : [{"basename" : "place","value" : "New York City"},{"basename" : "agenda","value" : "Movable Type¥nTopics"}]}
200
Headers
Content-Type: application/json
Body
{
"excerpt": "We are excited to announce that Six Apar...",
"status": "Publish",
"date": "2014-11-14T13:08:42¥u002b09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/blog/20141114-1/2014/11/six-apart-acquires-topics-server-to-simplify-site-upgrades.html",
"body": "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e",
"keywords": "",
"allowTrackbacks": false,
"id": 5,
"trackbacks": [],
"modifiedDate": "2014-11-14T13:17:52¥u002b09:00",
"trackbackCount": "0",
"folder": {
"id": 2,
"parent": 1,
"label": "news"
},
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "six_apart_acquires_topics_server_to_simplify_site_upgrades",
"assets": [],
"pingsSentUrl": [],
"title": "Six Apart Acquires Topics Server to Simplify Site Upgrades",
"class": "entry",
"createdDate": "2014-11-14T13:17:52¥u002b09:00",
"more": "",
"customFields": [
{
"basename": "place",
"value": "New York City"
},
{
"basename": "agenda",
"value": "Movable Type¥nTopics"
}
]
}
deletePage ¶
Delete an existing page.DELETE/sites/{site_id}/pages/{page_id}
- Authorization is required. This method accepts PUT and POST with __method=DELETE.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to delete the speciied page. |
404 | Not Found | Site or Page not found. |
Permissions
- edit_entry
Example URI
- site_id
number
(required)The site ID.
- page_id
number
(required)The page ID.
200
Headers
Content-Type: application/json
Body
{
"excerpt": "We are excited to announce that Six Apar...",
"status": "Publish",
"date": "2014-11-14T13:08:42¥u002b09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Yuji Takayama"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/blog/20141114-1/2014/11/six-apart-acquires-topics-server-to-simplify-site-upgrades.html",
"body": "¥u003cp¥u003e¥u003cspan¥u003eWe are excited to announce that Six Apart has acquired Topics, a dynamic online publishing product. This offering will provide Six Apart customers with an easy and cost-effective way to adapt existing content to evolving digital platforms.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eThis new product will save Six Apart customers a significant amount of time and money by allowing users to upgrade their websites and applications without migrating from their current content management systems. Clients who need to scale large amounts of data or even revamp a website on an entirely new platform can now achieve these changes with minimal effort.¥u003c/span¥u003e¥u003c/p¥u003e¥n¥u003cp¥u003e¥u003cspan¥u003eSix Apart customers will benefit not only from saved time and money, but also from ease of use. Topics does not have a user interface, so there is no new software to learn. Instead, it exists as a middle layer between the data library and the published page - automatically gathering, organizing and redistributing data.¥u003c/span¥u003e¥u003c/p¥u003e",
"keywords": "",
"allowTrackbacks": false,
"id": 5,
"trackbacks": [],
"modifiedDate": "2014-11-14T13:17:52¥u002b09:00",
"trackbackCount": "0",
"folder": {
"id": 2,
"parent": 1,
"label": "news"
},
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "six_apart_acquires_topics_server_to_simplify_site_upgrades",
"assets": [],
"pingsSentUrl": [],
"title": "Six Apart Acquires Topics Server to Simplify Site Upgrades",
"class": "entry",
"createdDate": "2014-11-14T13:17:52¥u002b09:00",
"more": "",
"customFields": [
{
"basename": "place",
"value": "New York City"
},
{
"basename": "agenda",
"value": "Movable Type¥nTopics"
}
]
}
previewPage ¶
new in v2.0: Make a preview for a page.POST/sites/{site_id}/pages/preview{?raw}
-
Authorization is required.
-
This endpoint is available in Movable Type 6.1.2 or later.
Permissions
- manage_pages
Example URI
- site_id
number
(required)The site ID.
- raw
number
(optional)If specify “1”, will be returned preview contents.
Entries resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
page={ "title" : "My First Post", "body" : "This is my first post!" }
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"preview": "http://example.com/my-first-post.html"
}
403
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Do not have permission to get page preview.",
"code": "403"
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Site not found",
"code": "404"
}
}
500
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Some error message is here",
"code": "500"
}
}
previewPageById ¶
new in v2.0: Make a preview for a page with existing data.POST/sites/{site_id}/pages/{page_id}/preview{?raw}
-
Authorization is required.
-
This endpoint is available in Movable Type 6.1.2 or later.
-
page parameter is required. If you just want to get preview page from existing data, you should provide page parameter with empty json.
Permissions
- manage_post
Example URI
- site_id
number
(required)The site ID.
- page_id
number
(required)The page ID.
- raw
number
(optional)If specify “1”, will be returned preview contents.
Templates resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
page={}
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"preview": "http://example.com/existing-page.html"
}
403
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Do not have permission to get entry preview.",
"code": "403"
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Site not found / Page not found",
"code": "404"
}
}
500
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Some error message is here",
"code": "500"
}
}
Permissions ¶
This is the Permissions resource. In this case, Permission means Association record.
Property Name | Type | Data Type | Database Column | Private | Read Only | Description | Version |
---|---|---|---|---|---|---|---|
blog | Ojbect | Blog | Y | The blog of this permission. | v2 | ||
blog.id | value | number | mt_permission.permission_blog_id | Y | The ID of the blog. | v1 | |
id | value | number | mt_permission.permission_id | Y | The ID for this permission. | v2 | |
createdBy | Object | User | Y | Created user of this permission. | v2 | ||
createdBy.displayName | value | string | mt_author.author_nickname | Y | The display name of this permission creator. | v2 | |
createdBy.id | value | number | mt_permission.permission_created_by | Y | The ID of this permission creator. | v2 | |
createdBy.userpicUrl | value | string | mt_author.author_userpic_url | Y | The URL of this permission 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. | v2 | |
createdDate | value | iso 8601 datetime | mt_permission.permission_created_on | Y | Created date of this permission. | v2 | |
permissions | ARRAY | string | mt_permission.permission_permissions, mt_permission.permissoin_restrictions | Y | The list of granted permissions. The restricted permissions are excluded from this list. | v2 | |
roles | ARRAY | Role | Y | The list of roles. | v2 | ||
role.id | value | number | mt_role.role_id | Y | The ID of this role. | v2 | |
role.name | value | string | mt_role.role_name | Y | The name of this role. | v2 | |
user | Object | User | Y | The user of this permission. | v2 | ||
user.displayName | value | string | mt_author.author_nickname | Y | The nickname for this permission user. | v2 | |
user.id | value | number | mt_permission.permission_author_id | Y | The ID for this permission user. | v2 | |
user.userpicUrl | value | string | mt_author.author_userpic_url | Y | The URL of this permission user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. | v2 |
{ “roles” : [ { “name” : “Website Administrator”, “id” : 1 } ], “permissions” : [ “administer”, “administer_blog”, “administer_website”, “comment”, “create_blog”, “create_post”, “create_website”, “edit_all_posts”, “edit_assets”, “edit_categories”, “edit_config”, “edit_notifications”, “edit_tags”, “edit_templates”, “manage_feedback”, “manage_member_blogs”, “manage_pages”, “manage_plugins”, “manage_themes”, “manage_users”, “publish_post”, “rebuild”, “save_image_defaults”, “send_notifications”, “set_publish_paths”, “upload”, “view_blog_log”, “view_log” ], “createdBy” : { “userpicUrl” : null, “id” : “1”, “displayName” : “Yuji Takayama” }, “user” : { “userpicUrl” : null, “id” : “1”, “displayName” : “Yuji Takayama” }, “blog” : { “id” : “2” }, “id” : “3”, “createdDate” : “2015-03-21T19:37:53+09:00” }
listPermissions ¶
New in v2.0: Retrieve a list of permissions.GET/permissions{?limit,offset,sortBy,sortOrder,fields,blogIds}
-
Authentication is required
-
Need Administer privilege.
Example URI
- limit
number
(optional) Default: 25Maximum number of permissions to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: bog_idThe field name for sort. You can specify one of following values
- id
- blog_id
- author_id
- created_by
- created_on
- sortOrder
string
(optional) Default: ascend- descend
- (default) Return permissions in descending order.
- ascend
- Return permissions in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Permissions resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- blogIds
number
(optional)The comma-separated blog id list that to be included in the result.
Headers
X-MT-Authorization: MTAuth accessToken=<Token>
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"roles": [
{
"name": "Website Administrator",
"id": 1
}
],
"permissions": [
"administer",
"administer_blog",
"administer_website",
"comment",
"create_blog",
"create_post",
"create_website",
"edit_all_posts",
"edit_assets",
"edit_categories",
"edit_config",
"edit_notifications",
"edit_tags",
"edit_templates",
"manage_feedback",
"manage_member_blogs",
"manage_pages",
"manage_plugins",
"manage_themes",
"manage_users",
"publish_post",
"rebuild",
"save_image_defaults",
"send_notifications",
"set_publish_paths",
"upload",
"view_blog_log",
"view_log"
],
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"user": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"blog": {
"id": "2"
},
"id": "3",
"createdDate": "2015-03-21T19:37:53+09:00"
}
]
}
listPermissionsForUser ¶
Retrieve a list of permissions for user.GET/users/{user_id}/permissions{?limit,offset,sortBy,sortOrder,fields,blogIds}
-
Authentication is required
-
If you want to get others list, you should have Administer privilege.
Example URI
- user_id
number or the word 'me'
(required)The user ID.
- limit
number
(optional) Default: 25Maximum number of permissions to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: bog_idThe field name for sort. You can specify one of following values
- id
- blog_id
- author_id
- created_by
- created_on
- sortOrder
string
(optional) Default: ascend- descend
- (default) Return permissions in descending order.
- ascend
- Return permissions in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Permissions resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- blogIds
number
(optional)The comma-separated blog id list that to be included in the result.
Headers
X-MT-Authorization: MTAuth accessToken=<Token>
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"roles": [
{
"name": "Website Administrator",
"id": 1
}
],
"permissions": [
"administer",
"administer_blog",
"administer_website",
"comment",
"create_blog",
"create_post",
"create_website",
"edit_all_posts",
"edit_assets",
"edit_categories",
"edit_config",
"edit_notifications",
"edit_tags",
"edit_templates",
"manage_feedback",
"manage_member_blogs",
"manage_pages",
"manage_plugins",
"manage_themes",
"manage_users",
"publish_post",
"rebuild",
"save_image_defaults",
"send_notifications",
"set_publish_paths",
"upload",
"view_blog_log",
"view_log"
],
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"user": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"blog": {
"id": "2"
},
"id": "3",
"createdDate": "2015-03-21T19:37:53+09:00"
}
]
}
listPermissionsForSite ¶
New in v2.0: Retrieve a list of permissions for site.GET/sites/{site_id}/permissions{?limit,offset,sortBy,sortOrder,fields}
-
Authentication is required
-
Permissions
- Administer
- Website Administrator for websites
- Blog Administrator for blog
Example URI
- site_id
number
(required)The site ID.
- limit
number
(optional) Default: 25Maximum number of permissions to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: bog_idThe field name for sort. You can specify one of following values
- id
- blog_id
- author_id
- created_by
- created_on
- sortOrder
string
(optional) Default: ascend- descend
- (default) Return permissions in descending order.
- ascend
- Return permissions in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Permissions resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
Headers
X-MT-Authorization: MTAuth accessToken=<Token>
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"roles": [
{
"name": "Website Administrator",
"id": 1
}
],
"permissions": [
"administer",
"administer_blog",
"administer_website",
"comment",
"create_blog",
"create_post",
"create_website",
"edit_all_posts",
"edit_assets",
"edit_categories",
"edit_config",
"edit_notifications",
"edit_tags",
"edit_templates",
"manage_feedback",
"manage_member_blogs",
"manage_pages",
"manage_plugins",
"manage_themes",
"manage_users",
"publish_post",
"rebuild",
"save_image_defaults",
"send_notifications",
"set_publish_paths",
"upload",
"view_blog_log",
"view_log"
],
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"user": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"blog": {
"id": "2"
},
"id": "3",
"createdDate": "2015-03-21T19:37:53+09:00"
}
]
}
listPermissionsForRole ¶
New in v2.0: Retrieve a list of permissions by role.GET/roles/{role_id}/permissions{?limit,offset,sortBy,sortOrder,fields,blogIds}
-
Authentication is required
-
Permissions
- Administer
Example URI
- role_id
number
(required)The role ID.
- limit
number
(optional) Default: 25Maximum number of permissions to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: bog_idThe field name for sort. You can specify one of following values
- id
- blog_id
- author_id
- created_by
- created_on
- sortOrder
string
(optional) Default: ascend- descend
- (default) Return permissions in descending order.
- ascend
- Return permissions in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Permissions resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- blogIds
number
(optional)The comma-separated blog id list that to be included in the result.
Headers
X-MT-Authorization: MTAuth accessToken=<Token>
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"roles": [
{
"name": "Website Administrator",
"id": 1
}
],
"permissions": [
"administer",
"administer_blog",
"administer_website",
"comment",
"create_blog",
"create_post",
"create_website",
"edit_all_posts",
"edit_assets",
"edit_categories",
"edit_config",
"edit_notifications",
"edit_tags",
"edit_templates",
"manage_feedback",
"manage_member_blogs",
"manage_pages",
"manage_plugins",
"manage_themes",
"manage_users",
"publish_post",
"rebuild",
"save_image_defaults",
"send_notifications",
"set_publish_paths",
"upload",
"view_blog_log",
"view_log"
],
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"user": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"blog": {
"id": "2"
},
"id": "3",
"createdDate": "2015-03-21T19:37:53+09:00"
}
]
}
grantPermissionToSite ¶
New in v2.0: Grant permissions to site.POST/sites/{site_id}/permissions/grant
-
Authentication is required
-
You should have grant_administer_role or grant_role_for_blog (Need grant_administer_role when granting role having administer_blog)
Post form data is follows
-
role_id (required, number) … The role ID.
-
user_id (required, number) … The user ID.
Example URI
- site_id
number
(required)The site ID.
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
role_id=1&user_id=4
200
Headers
Content-Type: application/json
Body
{
"status": "success"
}
grantPermissionToUser ¶
New in v2.0: Grant permissions to user.POST/users/{user_id}/permissions/grant
-
Authentication is required
-
You should have grant_administer_role or grant_role_for_blog (Need grant_administer_role when granting role having administer_blog)
Post form data is follows
-
role_id (required, number) - The role ID.
-
site_id (required, number) - The site ID.
Example URI
- user_id
number
(required)The user ID.
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
role_id=1&site_id=1
200
Headers
Content-Type: application/json
Body
{
"status": "success"
}
revokePermissionFromSite ¶
New in v2.0: Revoke permissions from site.POST/sites/{site_id}/permissions/revoke
-
Authentication is required
-
You should have revoke_role(Need revoke_administer_role when granting role having administer_blog )
Post form data is follows
-
user_id (required, number) … The user ID.
-
role_id (required, number) … The role ID.
Example URI
- site_id
number
(required)The site ID.
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
role_id=1&user_id=1
200
Headers
Content-Type: application/json
Body
{
"status": "success"
}
revokePermissionFromUser ¶
New in v2.0: Revoke permissions from user.POST/users/{user_id}/permissions/revoke
-
Authentication is required
-
You should have revoke_role(Need revoke_administer_role when granting role having administer_blog )
Post form data is follows
-
site_id (required, number) … The site ID.
-
role_id (required, number) … The role ID.
Example URI
- user_id
number
(required)The user ID.
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
role_id=1&site_id=1
200
Headers
Content-Type: application/json
Body
{
"status": "success"
}
Search ¶
Search ¶
New in v2.0: Searching entries.GET/search{?search,blog_id,IncludeBlogs,ExcludeBlogs,limit,offset,SearchSortBy,SearchResultDisplay,SearchMaxResults}
Example URI
- search
string
(required)The search term.
You can specify search term, like [foo], [foo AND bar], ‘foo NOT bar’.
Also, you can specify category filter, like [category:foo], [category:“hoge OR ‘foo bar’”]
Also, you can specify author filter, like [author:Melody]
Also, you can specify Custom Fields filter, like [field:address:akasaka] in this case,
address
is basename of Custom Fields.akasaka
is filter value.- blog_id
number
(optional)The site ID for search. If you want to specify multiple site ID, you must use IncludeBlogs.
- IncludeBlogs
string
(optional)The list of the site ID that will be included in the search it should be separated by comma.
- ExcludeBlogs
string
(optional)The list of the site ID will be excluded from the search it should be separated by comma.
- limit
number
(optional) Default: 20Maximum number of entries to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- SearchSortBy
string
(optional)The sort column for the search results. Available value is follows.
- created_on
- Will sort the entries by the authored on date.
- title
- Will sort the entries by title.
- SearchResultDisplay
string
(optional) Default: ascendDefines the sort order search results. Available value is follows.
- ascend
- will list the entries in chronological order (oldest entry at the top)
- descend
- will list the entries in reverse chronological order (newest entry at the top).
- SearchMaxResults
number
(optional) Default: 20Maximum number of entries to retrieve.
NOTE: By default, “SearchMaxResults” override is disabled.
200
Headers
Content-Type: application/json
Body
{
"totalResults": "4",
"items": [
{
"excerpt": "Lorem ipsum dolor sit amet...",
"status": "Publish",
"date": "2015-04-14T17:58:40+09:00",
"updatable": false,
"author": {
"userpicUrl": null,
"displayName": "Melody Nelson"
},
"allowComments": true,
"comments": [],
"permalink": "http://localhost/blog/20150407-1/2015/04/post-6.html",
"body": "<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>",
"keywords": "",
"allowTrackbacks": false,
"id": 20,
"trackbacks": [],
"modifiedDate": "2015-04-14T17:58:55+09:00",
"trackbackCount": "0",
"categories": [],
"blog": {
"id": "1"
},
"commentCount": "0",
"tags": [],
"basename": "post_6",
"assets": [],
"pingsSentUrl": [],
"title": "Lorem ipsum",
"class": "entry",
"createdDate": "2015-04-14T17:58:55+09:00",
"more": "",
"customFields": []
}
]
}
Sites ¶
This is the Sites resource.
Property Name | Type | Data Type | Database Column | Private | Read Only | Description | Version |
---|---|---|---|---|---|---|---|
allowCommenterRegist | value | boolean | mt_blog.blog_allow_commenter_regist | Y |
|
v2 | |
allowCommentHtml | value | boolean | mt_blog.blog_allow_comment_html | Y |
|
v2 | |
allowComments | value | boolean | mt_blog.blog_allow_reg_comments mt_blog.blog_allow_unreg_comments |
Y |
|
v2 | |
allowCommentsDefault | value | boolean | mt_blog.blog_allow_comments_default | Y | The state of the comment acceptance of default in this site.
|
v2 | |
allowPings | value | boolean | mt_blog.blog_allow_pings | Y | - |
|
v2 |
allowPingsDefault | value | boolean | mt_blog.blog_allow_pings_default | Y | The state of the comment acceptance of default in this site. Available value is follows.
|
v2 | |
allowUnregComments | value | boolean | mt_blog.blog_allow_unreg_comments | Y |
|
v2 | |
archivePath | value | string | mt_blog.blog_archive_path | Y | The archive path for this site. This property only accepts absolute path. | v2 | |
archiveTypePreferred | value | string | mt_blog.blog_archive_type_preferred | Y | The preferred archive type for this site. | v2 | |
archiveUrl | value | string | mt_blog.blog_archive_url | The archive url of this site. [Update in v2] This property was changed to updatable. | v1 | ||
autodiscoverLinks | value | boolean | mt_blog.blog_autodiscovery_links | Y |
|
v2 | |
autolinkUrls | value | boolean | mt_blog.blog_autolink_urls | Y |
|
v2 | |
basenameLimit | value | number | mt_blog.blog_basename_limit | Y | The maximum length of basename. | v2 | |
ccLicenseImage | value | string | mt_blog.blog_cc_license | - | Y | The URL for the Creative Commons License image for this site. | v2 |
ccLicenseUrl | value | string | mt_blog.blog_cc_license | - | Y | The URL for the Creative Commons License url for this site. | v2 |
class | value | string | mt_blog.blog_class | Y | The object class for this site. | v1 | |
commenterAuthenticators | ARRAY | string | mt_blog_meta.commenter_authenticators | Y | Array of commenter authenticators for this site. | v2 | |
convertParasComments | value | string | mt_blog.blog_convert_paras_comments | Y | The text formatting of this site’s comment. | v2 | |
contentCss | value | string | mt_blog.blog_content_css | Y | The CSS applying to WYSIWYG editor of this site. | v2 | |
convertParas | value | string | mt_blog.blog_convert_paras | Y | The default text formatting in this site. Available value in default is follows.
|
v2 | |
createdBy | Object | - | Y | The created user of this website. | v2 | ||
createdBy.id | value | number | mt_blog.blog_created_by | Y | Y | The ID of created user. | v2 |
createdBy.displayName | value | string | Y | The display name of created user. | v2 | ||
createdBy.userpicUrl | value | string | Y | The URL of created user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. | v2 | ||
createdDate | value | iso 8601 datetime | mt_blog.blog_created_on | Y | The created time for this website. | v2 | |
customDynamicTemplates | value | string | mt_blog.blog_custom_dynamic_templates | Y | Publishing profile for this site. Available value is follows.
|
v2 | |
daysOrPosts | value | string | mt_blog.blog_days_on_index mt_blog.blog_entries_on_index |
Y | The type of listing default. Available value is follows.
|
v2 | |
dateLanguage | value | string | mt_blog.blog_date_language | - | - | The date locale settings for this site. Available valus is follow.
|
v2 |
description | value | string | mt_blog.blog_description | The description of this site. [Update in v2] This property was changed to updatable. | v1 | ||
dynamicCache | value | boolean | Y | Cannot set this property when dynamic templates does not exist.
|
v2 | ||
dynamicConditional | value | boolean | Y | Cannot set this property when dynamic templates does not exist.
|
v2 | ||
entryCustomPrefs | ARRAY | string | Y | Y | Default displayed fields of this site’s entry. Available value is follows.
|
v2 | |
emailNewComments | value | number | mt_blog.blog_email_new_comments | Y | Email notification when posting comment to this site.
|
v2 | |
emailNewPings | value | number | mt_blog.blog_email_new_pings | Y | "Email notification setting when accepting trackback to this site.
|
v2 | |
fileExtension | value | string | mt_blog.blog_file_extension | Y | The file extension for this site. | v2 | |
followAuthLinks | value | boolean | mt_blog_meta.follow_auth_links | Y |
|
v2 | |
host | value | string | mt_blog.blog_site_url | - | Y | The host name of this site. | v2 |
id | value | number | mt_blog.blog_id | Y | The ID of this site. | v1 | |
includeCache | value | boolean | mt_blog_meta:include_cache | Y |
|
v2 | |
includeSystem | value | string | mt_blog_meta:include_system | Y |
|
v2 | |
language | value | string | mt_blog.blog_language | The language for this site. Available value is follows.
|
v2 | ||
internalAutodiscovery | value | boolean | mt_blog.blog_internal_autodiscovery | Y | - |
|
v2 |
junkFolderExpiry | value | number | mt_blog.blog_junk_folder_expiry | Y | The period for deleting spam comments and trackbacks. | v2 | |
junkScoreThreshold | value | number | mt_blog.blog_junk_score_threshold | Y | The spam score threshold of this site. | v2 | |
listOnIndex | value | number | mt_blog.blog_days_on_index mt_blog.blog_entries_on_index |
Y | The number of entries shown in the list by default. | v2 | |
maxRevisionsEntry | value | number | mt_blog_meta:max_revisions_entry | Y | The number of revisions per entries and pages in this site. | v2 | |
maxRevisionsTemplate | value | number | mt_blog_meta.max_revisions_template | Y | The number of revisions per templates in this site. | v2 | |
moderateComments | value | number | mt_blog.blog_moderate_unreg_comments | Y |
|
v2 | |
moderatePings | value | boolean | mt_blog.blog_moderate_pings | Y |
|
v2 | |
modifiedBy | Object | - | Y | The last modified user of this website. | v2 | ||
modifiedBy.displayName | value | string | Y | The display name of last modified user. | v2 | ||
modifiedBy.id | value | number | mt_blog.blog_modified_by | Y | Y | The ID of last modified user. | v2 |
modifiedBy.userpicUrl | value | string | Y | The URL of last modified user’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. | v2 | ||
modifiedDate | value | iso 8601 datetime | mt_blog.blog_modified_on | Y | The last modified time for this website. | v2 | |
name | value | string | mt_blog.blog_name | The name for this site. [Update in v2] This property was changed to updatable. | v1 | ||
newCreatedUserRoles | ARRAY | Role | - | Y | Assigned to users that are created in the future on this site. | v2 | |
newCreatedUserRole.id | value | number | mt_role.role_id | Y | Y | v2 | |
newCreatedUserRole.name | value | string | mt_role.role_name | Y | Y | v2 | |
nofollowUrls | value | boolean | mt_blog_meta.nofollow_urls | Y |
|
v2 | |
pageCustomPrefs | ARRAY | string | Y | Y | Default displayed fields of this site’s page. Available value is follows.
|
v2 | |
parent | Object | - | - | - | Y | The parent website of this blog. If this object is Websites Resource, this object must be null. | v2 |
parent.id | value | number | mt_blog.blog_parent_id (mt_blog.blog_id) | - | Y | The ID of parent website. | v2 |
parent.name | value | string | mt_blog.blog_name | - | Y | The name of parent website. | v2 |
publishEmptyArchive | value | boolean | mt_blog_meta:publish_empty_archive |
|
v2 | ||
pingGoogle | value | boolean | mt_blog.blog_ping_google | Y |
|
v2 | |
pingWeblogs | value | boolean | mt_blog.blog_ping_weblogs | Y |
|
v2 | |
pingOthers | value | string | mt_blog.blog_ping_others | Y | - | Array of update ping services. | v2 |
relativeUrl | value | string | mt_blog.blog_site_url | - | Y | The relative site url of this site. | v2 |
requireCommentEmails | value | boolean | mt_blog.blog_require_comment_emails | Y |
|
v2 | |
sanitizeSpec | value | string | mt_blog.blog_santize_spec | Y | The limit html tags of this site’s comment. “0” is default. | v2 | |
serverOffset | value | number | mt_blog.blog_server_offset | The server offset for this site. | v2 | ||
sitePath | value | string | mt_blog.blog_site_path | Y | The site path for this site. This property only accepts absolute path. | v2 | |
siteSubdomain | value | string | mt_blog.blog_site_url | Y | (Write Only) | The subdomain for this site. This is write-only property. | v2 |
smartReplace | value | number | mt_blog.blog_nwc_smart_replace | Y | The punctuation replacement of this site.
|
v2 | |
sortOrderPosts | value | string | mt_blog.blog_sort_order_posts | Y | The default sorting direction for the entry listing. Available value is follows.
|
v2 | |
sortOrderComments | value | string | mt_blog.blog_sort_order_comments | Y | The comment order of this site. Available value is follows.
|
v2 | |
smartReplaceFields | ARRAY | string | mt_blog.blog_nwc_replace_field | Y | Replace fields of this site. | v2 | |
statusDefault | value | string | mt_blog.blog_status_default | Y | The default entry status in this site. Available value is follows.
|
v2 | |
themeId | value | string | mt_blog.blog_theme_id | Y | The theme ID for this site. | v2 | |
timezone | value | number | mt_blog.mt_server_offset | - | Y | The timezone of this site. | v2 |
updatable | value | boolean | Y |
|
v2 | ||
url | value | string | mt_blog.blog_site_url | The site url of this site. [Update in v2] This property was changed to updatable. | v1 | ||
useCommentConfirmation | value | boolean | mt_blog.blog_use_comment_confirmation | Y |
|
v2 | |
useRevision | value | boolean | mt_blog.blog_use_revision | Y |
|
v2 | |
wordsInExcerpt | value | number | mt_blog.blog_words_in_excerpt | Y | The default length for excerpt. | v2 |
{ “serverOffset” : “9”, “themeId” : “rainier”, “statusDefault” : “Publish”, “autodiscoverLinks” : false, “useRevision” : true, “relativeUrl” : “/”, “entryCustomPrefs” : [ “title”, “text”, “category”, “excerpt”, “keywords”, “tags”, “feedback”, “assets”, “customfield_license_fee”, “customfield_foo” ], “archivePath” : “/path/to/document_root/”, “useCommentConfirmation” : true, “url” : "http://example.com/", “smartReplaceFields” : [ “title”, “text”, “text_more”, “keywords”, “excerpt”, “tags” ], “modifiedBy” : { “userpicUrl” : null, “id” : “1”, “displayName” : “Yuji Takayama” }, “timezone” : “+09:00”, “daysOrPosts” : “posts”, “sortOrderPosts” : “descend”, “name” : “Six Apart Shop”, “convertParas” : “richtext”, “description” : “”, “includeSystem” : “”, “archiveUrl” : "http://example.com", “allowCommentHtml” : true, “fileExtension” : “html”, “smartReplace” : “0”, “junkFolderExpiry” : “14”, “publishEmptyArchive” : false, “dateLanguage” : “ja”, “listOnIndex” : “10”, “pingWeblogs” : true, “emailNewComments” : “1”, “language” : “ja”, “autolinkUrls” : true, “sanitizeSpec” : “0”, “customFields” : [], “emailNewPings” : “1”, “nofollowUrls” : true, “createdBy” : { “userpicUrl” : null, “id” : “1”, “displayName” : “Yuji Takayama” }, “pingGoogle” : true, “convertParasComments” : “1”, “sitePath” : “/path/to/document_root/”, “id” : “1”, “parent” : null, “archiveTypePreferred” : “Individual”, “contentCss” : “{{theme_static}}css/editor.css”, “junkScoreThreshold” : “0”, “internalAutodiscovery” : false, “createdDate” : “2014-12-28T23:09:45+09:00”, “class” : “website”, “moderateComments” : “2”, “allowCommentsDefault” : true, “includeCache” : false, “allowCommenterRegist” : true, “maxRevisionsEntry” : “20”, “updatable” : true, “requireCommentEmails” : false, “ccLicenseImage” : "https://i.creativecommons.org/l/by/4.0/88x31.png", “allowComments” : true, “allowPingsDefault” : false, “pingOthers” : [], “dynamicCache” : false, “basenameLimit” : “100”, “modifiedDate” : “2015-03-12T12:16:24+09:00”, “dynamicConditional” : false, “pageCustomPrefs” : [ “title”, “text”, “excerpt”, “keywords”, “tags”, “feedback”, “assets” ], “allowPings” : false, “commenterAuthenticators” : [ “MovableType” ], “host” : “localhost”, “ccLicenseUrl” : "http://creativecommons.org/licenses/by/4.0/", “newCreatedUserRoles” : [], “wordsInExcerpt” : “40”, “sortOrderComments” : “ascend”, “followAuthLinks” : true, “allowUnregComments” : false, “maxRevisionsTemplate” : “20”, “moderatePings” : true, “customDynamicTemplates” : “none” }
listByUser ¶
- Authorization is required.
Retrieve a list of sites by userGET/users/{user_id}/sites{?limit,offset,sortBy,sortOrder,fields,searchFields,search,includeIds,excludeIds}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of sites. |
404 | Not Found | User not found. |
Example URI
- user_id
number or 'me'
(required)The user ID or the word ‘me’.
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: nameOnly ‘name’ is available.
- limit
number
(optional) Default: 25Maximum number of sites to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: nameOnly ‘name’ is available
- sortOrder
string
(optional) Default: descend- descend
- (default) Return sites in descending order.
- ascend
- Return sites in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Sites resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds
string
(optional)The comma separated ID list of sites to include to result.
- excludeIds
string
(optional)The comma separated ID list of sites to exclude from result.
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"serverOffset": "9",
"themeId": "rainier",
"statusDefault": "Publish",
"autodiscoverLinks": false,
"useRevision": true,
"relativeUrl": "/",
"entryCustomPrefs": [
"title",
"text",
"category",
"excerpt",
"keywords",
"tags",
"feedback",
"assets",
"customfield_license_fee",
"customfield_foo"
],
"archivePath": "/path/to/document_root/",
"useCommentConfirmation": true,
"url": "http://example.com/",
"smartReplaceFields": [
"title",
"text",
"text_more",
"keywords",
"excerpt",
"tags"
],
"modifiedBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"timezone": "+09:00",
"daysOrPosts": "posts",
"sortOrderPosts": "descend",
"name": "Six Apart Shop",
"convertParas": "richtext",
"description": "",
"includeSystem": "",
"archiveUrl": "http://example.com",
"allowCommentHtml": true,
"fileExtension": "html",
"smartReplace": "0",
"junkFolderExpiry": "14",
"publishEmptyArchive": false,
"dateLanguage": "ja",
"listOnIndex": "10",
"pingWeblogs": true,
"emailNewComments": "1",
"language": "ja",
"autolinkUrls": true,
"sanitizeSpec": "0",
"customFields": [],
"emailNewPings": "1",
"nofollowUrls": true,
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"pingGoogle": true,
"convertParasComments": "1",
"sitePath": "/path/to/document_root/",
"id": "1",
"parent": null,
"archiveTypePreferred": "Individual",
"contentCss": "{{theme_static}}css/editor.css",
"junkScoreThreshold": "0",
"internalAutodiscovery": false,
"createdDate": "2014-12-28T23:09:45+09:00",
"class": "website",
"moderateComments": "2",
"allowCommentsDefault": true,
"includeCache": false,
"allowCommenterRegist": true,
"maxRevisionsEntry": "20",
"updatable": true,
"requireCommentEmails": false,
"ccLicenseImage": "https://i.creativecommons.org/l/by/4.0/88x31.png",
"allowComments": true,
"allowPingsDefault": false,
"pingOthers": [],
"dynamicCache": false,
"basenameLimit": "100",
"modifiedDate": "2015-03-12T12:16:24+09:00",
"dynamicConditional": false,
"pageCustomPrefs": [
"title",
"text",
"excerpt",
"keywords",
"tags",
"feedback",
"assets"
],
"allowPings": false,
"commenterAuthenticators": [
"MovableType"
],
"host": "localhost",
"ccLicenseUrl": "http://creativecommons.org/licenses/by/4.0/",
"newCreatedUserRoles": [],
"wordsInExcerpt": "40",
"sortOrderComments": "ascend",
"followAuthLinks": true,
"allowUnregComments": false,
"maxRevisionsTemplate": "20",
"moderatePings": true,
"customDynamicTemplates": "none"
}
]
}
listSites ¶
New in v2.0: Retrieve sitesGET/sites{?limit,offset,sortBy,sortOrder,fields,searchFields,search,includeIds,excludeIds}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of sites. |
Example URI
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: nameOnly ‘name’ is available.
- limit
number
(optional) Default: 25Maximum number of sites to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: nameOnly ‘name’ is available
- sortOrder
string
(optional) Default: descend- descend
- (default) Return sites in descending order.
- ascend
- Return sites in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Sites resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds
string
(optional)The comma separated ID list of sites to include to result.
- excludeIds
string
(optional)The comma separated ID list of sites to exclude from result.
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"serverOffset": "9",
"themeId": "rainier",
"statusDefault": "Publish",
"autodiscoverLinks": false,
"useRevision": true,
"relativeUrl": "/",
"entryCustomPrefs": [
"title",
"text",
"category",
"excerpt",
"keywords",
"tags",
"feedback",
"assets",
"customfield_license_fee",
"customfield_foo"
],
"archivePath": "/path/to/document_root/",
"useCommentConfirmation": true,
"url": "http://example.com/",
"smartReplaceFields": [
"title",
"text",
"text_more",
"keywords",
"excerpt",
"tags"
],
"modifiedBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"timezone": "+09:00",
"daysOrPosts": "posts",
"sortOrderPosts": "descend",
"name": "Six Apart Shop",
"convertParas": "richtext",
"description": "",
"includeSystem": "",
"archiveUrl": "http://example.com",
"allowCommentHtml": true,
"fileExtension": "html",
"smartReplace": "0",
"junkFolderExpiry": "14",
"publishEmptyArchive": false,
"dateLanguage": "ja",
"listOnIndex": "10",
"pingWeblogs": true,
"emailNewComments": "1",
"language": "ja",
"autolinkUrls": true,
"sanitizeSpec": "0",
"customFields": [],
"emailNewPings": "1",
"nofollowUrls": true,
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"pingGoogle": true,
"convertParasComments": "1",
"sitePath": "/path/to/document_root/",
"id": "1",
"parent": null,
"archiveTypePreferred": "Individual",
"contentCss": "{{theme_static}}css/editor.css",
"junkScoreThreshold": "0",
"internalAutodiscovery": false,
"createdDate": "2014-12-28T23:09:45+09:00",
"class": "website",
"moderateComments": "2",
"allowCommentsDefault": true,
"includeCache": false,
"allowCommenterRegist": true,
"maxRevisionsEntry": "20",
"updatable": true,
"requireCommentEmails": false,
"ccLicenseImage": "https://i.creativecommons.org/l/by/4.0/88x31.png",
"allowComments": true,
"allowPingsDefault": false,
"pingOthers": [],
"dynamicCache": false,
"basenameLimit": "100",
"modifiedDate": "2015-03-12T12:16:24+09:00",
"dynamicConditional": false,
"pageCustomPrefs": [
"title",
"text",
"excerpt",
"keywords",
"tags",
"feedback",
"assets"
],
"allowPings": false,
"commenterAuthenticators": [
"MovableType"
],
"host": "localhost",
"ccLicenseUrl": "http://creativecommons.org/licenses/by/4.0/",
"newCreatedUserRoles": [],
"wordsInExcerpt": "40",
"sortOrderComments": "ascend",
"followAuthLinks": true,
"allowUnregComments": false,
"maxRevisionsTemplate": "20",
"moderatePings": true,
"customDynamicTemplates": "none"
}
]
}
listSitesByParent ¶
New in v2.0: Retrieve sites by parent IDGET/sites/{site_id}/children{?limit,offset,sortBy,sortOrder,fields,searchFields,search,includeIds,excludeIds}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of sites. |
404 | Not Found | Site not found. |
Example URI
- site_id
number
(required)The site ID.
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: nameOnly ‘name’ is available.
- limit
number
(optional) Default: 25Maximum number of sites to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: nameOnly ‘name’ is available
- sortOrder
string
(optional) Default: descend- descend
- (default) Return sites in descending order.
- ascend
- Return sites in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Sites resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds
string
(optional)The comma separated ID list of sites to include to result.
- excludeIds
string
(optional)The comma separated ID list of sites to exclude from result.
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"serverOffset": "9",
"themeId": "rainier",
"statusDefault": "Publish",
"autodiscoverLinks": false,
"useRevision": true,
"relativeUrl": "/",
"entryCustomPrefs": [
"title",
"text",
"category",
"excerpt",
"keywords",
"tags",
"feedback",
"assets",
"customfield_license_fee",
"customfield_foo"
],
"archivePath": "/path/to/document_root/",
"useCommentConfirmation": true,
"url": "http://example.com/",
"smartReplaceFields": [
"title",
"text",
"text_more",
"keywords",
"excerpt",
"tags"
],
"modifiedBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"timezone": "+09:00",
"daysOrPosts": "posts",
"sortOrderPosts": "descend",
"name": "Six Apart Shop",
"convertParas": "richtext",
"description": "",
"includeSystem": "",
"archiveUrl": "http://example.com",
"allowCommentHtml": true,
"fileExtension": "html",
"smartReplace": "0",
"junkFolderExpiry": "14",
"publishEmptyArchive": false,
"dateLanguage": "ja",
"listOnIndex": "10",
"pingWeblogs": true,
"emailNewComments": "1",
"language": "ja",
"autolinkUrls": true,
"sanitizeSpec": "0",
"customFields": [],
"emailNewPings": "1",
"nofollowUrls": true,
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"pingGoogle": true,
"convertParasComments": "1",
"sitePath": "/path/to/document_root/",
"id": "2",
"parent": {
"id": "1",
"name": "Parent Website"
},
"archiveTypePreferred": "Individual",
"contentCss": "{{theme_static}}css/editor.css",
"junkScoreThreshold": "0",
"internalAutodiscovery": false,
"createdDate": "2014-12-28T23:09:45+09:00",
"class": "website",
"moderateComments": "2",
"allowCommentsDefault": true,
"includeCache": false,
"allowCommenterRegist": true,
"maxRevisionsEntry": "20",
"updatable": true,
"requireCommentEmails": false,
"ccLicenseImage": "https://i.creativecommons.org/l/by/4.0/88x31.png",
"allowComments": true,
"allowPingsDefault": false,
"pingOthers": [],
"dynamicCache": false,
"basenameLimit": "100",
"modifiedDate": "2015-03-12T12:16:24+09:00",
"dynamicConditional": false,
"pageCustomPrefs": [
"title",
"text",
"excerpt",
"keywords",
"tags",
"feedback",
"assets"
],
"allowPings": false,
"commenterAuthenticators": [
"MovableType"
],
"host": "localhost",
"ccLicenseUrl": "http://creativecommons.org/licenses/by/4.0/",
"newCreatedUserRoles": [],
"wordsInExcerpt": "40",
"sortOrderComments": "ascend",
"followAuthLinks": true,
"allowUnregComments": false,
"maxRevisionsTemplate": "20",
"moderatePings": true,
"customDynamicTemplates": "none"
}
]
}
insertNewWebsite ¶
New in v2.0: Create a new website.POST/sites
-
Authorization is required.
-
This method accepts PUT and POST with __method=PUT.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to create a new website. |
404 | Not Found | Site not found. |
Permissions
- create_website
Request Body Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
blog | Object | Yes | Single Sites resource |
Example URI
Sites resource
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
website={"url" : "http://example.com/", "name" : "New Website", "sitePath":"/path/to/document_root/"}
200
Headers
Content-Type: application/json
Body
{
"serverOffset": 9,
"themeId": "rainier",
"statusDefault": "Publish",
"autodiscoverLinks": false,
"useRevision": true,
"relativeUrl": "/",
"entryCustomPrefs": [
"title",
"body",
"category",
"tags",
"feedback",
"publishing",
"assets"
],
"archivePath": "/path/to/document_root/",
"useCommentConfirmation": true,
"url": "http://example.com/",
"smartReplaceFields": [
"title",
"text",
"text_more",
"keywords",
"excerpt",
"tags"
],
"timezone": "+09:00",
"daysOrPosts": "posts",
"sortOrderPosts": "descend",
"convertParas": "richtext",
"name": "New Website",
"description": null,
"includeSystem": null,
"archiveUrl": "http://example.com/",
"allowCommentHtml": true,
"fileExtension": "html",
"smartReplace": 0,
"junkFolderExpiry": 14,
"publishEmptyArchive": false,
"dateLanguage": "ja",
"listOnIndex": 10,
"pingWeblogs": false,
"emailNewComments": 1,
"language": "",
"autolinkUrls": true,
"sanitizeSpec": 0,
"customFields": [],
"emailNewPings": 1,
"nofollowUrls": true,
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"pingGoogle": false,
"convertParasComments": 1,
"sitePath": "/path/to/document_root/",
"id": "10",
"parent": null,
"archiveTypePreferred": "",
"contentCss": null,
"junkScoreThreshold": 0,
"internalAutodiscovery": false,
"createdDate": "2015-03-24T22:03:47+09:00",
"class": "website",
"moderateComments": 2,
"allowCommentsDefault": true,
"includeCache": false,
"allowCommenterRegist": true,
"maxRevisionsEntry": 20,
"updatable": true,
"requireCommentEmails": false,
"ccLicenseImage": "",
"allowComments": true,
"allowPingsDefault": true,
"pingOthers": [],
"dynamicCache": false,
"basenameLimit": 100,
"modifiedDate": "2015-03-24T22:03:47+09:00",
"dynamicConditional": false,
"pageCustomPrefs": [
"title",
"body",
"category",
"tags",
"feedback",
"publishing",
"assets"
],
"allowPings": true,
"commenterAuthenticators": [
"MovableType"
],
"host": "example.com",
"ccLicenseUrl": "",
"newCreatedUserRoles": [],
"wordsInExcerpt": 40,
"sortOrderComments": "ascend",
"followAuthLinks": true,
"allowUnregComments": false,
"maxRevisionsTemplate": 20,
"moderatePings": true,
"customDynamicTemplates": "none"
}
insertNewBlog ¶
New in v2.0: Create a new blog.POST/sites/{site_id}
- Authorization is required.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to create a new blog. |
404 | Not Found | Site not found. |
Permissions
- create_blog
Request Body Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
blog | Object | Yes | Single Sites resource |
Example URI
- site_id
number
(required)The site ID.
Sites resource
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
blog={"name":"New Blog", "url":"blog", "sitePath":"blog"}
200
Headers
Content-Type: application/json
Body
{
"serverOffset": 9,
"themeId": "rainier",
"statusDefault": "Publish",
"autodiscoverLinks": false,
"useRevision": true,
"relativeUrl": "/blog/",
"entryCustomPrefs": [
"title",
"body",
"category",
"tags",
"feedback",
"publishing",
"assets"
],
"archivePath": "/path/to/document_root/blog",
"useCommentConfirmation": true,
"url": "http://example.com/blog/",
"smartReplaceFields": [
"title",
"text",
"text_more",
"keywords",
"excerpt",
"tags"
],
"timezone": "+09:00",
"daysOrPosts": "posts",
"sortOrderPosts": "descend",
"convertParas": "richtext",
"name": "New Blog",
"description": null,
"includeSystem": null,
"archiveUrl": "http://example.com/blog/",
"allowCommentHtml": true,
"fileExtension": "html",
"smartReplace": 0,
"junkFolderExpiry": 14,
"publishEmptyArchive": false,
"dateLanguage": "ja",
"listOnIndex": 10,
"pingWeblogs": false,
"emailNewComments": 1,
"language": "",
"autolinkUrls": true,
"sanitizeSpec": 0,
"customFields": [],
"emailNewPings": 1,
"nofollowUrls": true,
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"pingGoogle": false,
"convertParasComments": 1,
"sitePath": "/path/to/document_root/blog",
"id": "9",
"parent": {
"name": "First Website",
"id": "1"
},
"archiveTypePreferred": "",
"contentCss": null,
"junkScoreThreshold": 0,
"internalAutodiscovery": false,
"createdDate": "2015-03-24T15:15:56+09:00",
"class": "blog",
"moderateComments": 2,
"allowCommentsDefault": true,
"includeCache": false,
"allowCommenterRegist": true,
"maxRevisionsEntry": "20",
"updatable": true,
"requireCommentEmails": false,
"ccLicenseImage": "",
"allowComments": true,
"allowPingsDefault": true,
"pingOthers": [],
"dynamicCache": false,
"basenameLimit": 100,
"modifiedDate": "2015-03-24T15:15:56+09:00",
"dynamicConditional": false,
"pageCustomPrefs": [
"title",
"body",
"category",
"tags",
"feedback",
"publishing",
"assets"
],
"allowPings": true,
"commenterAuthenticators": [
"MovableType"
],
"host": "example.com",
"ccLicenseUrl": "",
"newCreatedUserRoles": [],
"wordsInExcerpt": 40,
"sortOrderComments": "ascend",
"followAuthLinks": true,
"allowUnregComments": false,
"maxRevisionsTemplate": "20",
"moderatePings": true,
"customDynamicTemplates": "none"
}
updateSite ¶
New in v2.0: Update an existing blog or website.PUT/sites/{site_id}
-
Authorization is required.
-
This method accepts PUT and POST with __method=PUT.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to update an existing blog or website. |
404 | Not Found | Site not found. |
Permissions
- edit_blog_config
Request Body Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
blog | Object | Yes | Single Sites resource |
Example URI
- site_id
number
(required)The site ID.
Sites resource
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
website={"name" : "Our new Website"} or blog={"name" : "Our new Website"}
200
Headers
Content-Type: application/json
Body
{
"serverOffset": 9,
"themeId": "rainier",
"statusDefault": "Publish",
"autodiscoverLinks": false,
"useRevision": true,
"relativeUrl": "/",
"entryCustomPrefs": [
"title",
"body",
"category",
"tags",
"feedback",
"publishing",
"assets"
],
"archivePath": "/path/to/document_root/",
"useCommentConfirmation": true,
"url": "http://example.com/",
"smartReplaceFields": [
"title",
"text",
"text_more",
"keywords",
"excerpt",
"tags"
],
"timezone": "+09:00",
"daysOrPosts": "posts",
"sortOrderPosts": "descend",
"convertParas": "richtext",
"name": "Our new Website",
"description": null,
"includeSystem": null,
"archiveUrl": "http://example.com/",
"allowCommentHtml": true,
"fileExtension": "html",
"smartReplace": 0,
"junkFolderExpiry": 14,
"publishEmptyArchive": false,
"dateLanguage": "ja",
"listOnIndex": 10,
"pingWeblogs": false,
"emailNewComments": 1,
"language": "",
"autolinkUrls": true,
"sanitizeSpec": 0,
"customFields": [],
"emailNewPings": 1,
"nofollowUrls": true,
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"pingGoogle": false,
"convertParasComments": 1,
"sitePath": "/path/to/document_root/",
"id": "10",
"parent": null,
"archiveTypePreferred": "",
"contentCss": null,
"junkScoreThreshold": 0,
"internalAutodiscovery": false,
"createdDate": "2015-03-24T22:03:47+09:00",
"class": "website",
"moderateComments": 2,
"allowCommentsDefault": true,
"includeCache": false,
"allowCommenterRegist": true,
"maxRevisionsEntry": 20,
"updatable": true,
"requireCommentEmails": false,
"ccLicenseImage": "",
"allowComments": true,
"allowPingsDefault": true,
"pingOthers": [],
"dynamicCache": false,
"basenameLimit": 100,
"modifiedDate": "2015-03-24T22:03:47+09:00",
"dynamicConditional": false,
"pageCustomPrefs": [
"title",
"body",
"category",
"tags",
"feedback",
"publishing",
"assets"
],
"allowPings": true,
"commenterAuthenticators": [
"MovableType"
],
"host": "example.com",
"ccLicenseUrl": "",
"newCreatedUserRoles": [],
"wordsInExcerpt": 40,
"sortOrderComments": "ascend",
"followAuthLinks": true,
"allowUnregComments": false,
"maxRevisionsTemplate": 20,
"moderatePings": true,
"customDynamicTemplates": "none"
}
deleteSite ¶
New in v2.0: Delete an existing blog or website.DELETE/sites/{site_id}
-
Authorization is required.
-
This method accepts DELETE and POST with __method=DELETE.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to delete an existing blog or website. |
404 | Not Found | Site not found. |
Permissions
-
delete_website (for website)
-
delete_blog (for blog)
Example URI
- site_id
number
(required)The site ID.
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
200
Headers
Content-Type: application/json
Body
{
"serverOffset": 9,
"themeId": "rainier",
"statusDefault": "Publish",
"autodiscoverLinks": false,
"useRevision": true,
"relativeUrl": "/",
"entryCustomPrefs": [
"title",
"body",
"category",
"tags",
"feedback",
"publishing",
"assets"
],
"archivePath": "/path/to/document_root/",
"useCommentConfirmation": true,
"url": "http://example.com/",
"smartReplaceFields": [
"title",
"text",
"text_more",
"keywords",
"excerpt",
"tags"
],
"timezone": "+09:00",
"daysOrPosts": "posts",
"sortOrderPosts": "descend",
"convertParas": "richtext",
"name": "Our new Website",
"description": null,
"includeSystem": null,
"archiveUrl": "http://example.com/",
"allowCommentHtml": true,
"fileExtension": "html",
"smartReplace": 0,
"junkFolderExpiry": 14,
"publishEmptyArchive": false,
"dateLanguage": "ja",
"listOnIndex": 10,
"pingWeblogs": false,
"emailNewComments": 1,
"language": "",
"autolinkUrls": true,
"sanitizeSpec": 0,
"customFields": [],
"emailNewPings": 1,
"nofollowUrls": true,
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"pingGoogle": false,
"convertParasComments": 1,
"sitePath": "/path/to/document_root/",
"id": "10",
"parent": null,
"archiveTypePreferred": "",
"contentCss": null,
"junkScoreThreshold": 0,
"internalAutodiscovery": false,
"createdDate": "2015-03-24T22:03:47+09:00",
"class": "website",
"moderateComments": 2,
"allowCommentsDefault": true,
"includeCache": false,
"allowCommenterRegist": true,
"maxRevisionsEntry": 20,
"updatable": true,
"requireCommentEmails": false,
"ccLicenseImage": "",
"allowComments": true,
"allowPingsDefault": true,
"pingOthers": [],
"dynamicCache": false,
"basenameLimit": 100,
"modifiedDate": "2015-03-24T22:03:47+09:00",
"dynamicConditional": false,
"pageCustomPrefs": [
"title",
"body",
"category",
"tags",
"feedback",
"publishing",
"assets"
],
"allowPings": true,
"commenterAuthenticators": [
"MovableType"
],
"host": "example.com",
"ccLicenseUrl": "",
"newCreatedUserRoles": [],
"wordsInExcerpt": 40,
"sortOrderComments": "ascend",
"followAuthLinks": true,
"allowUnregComments": false,
"maxRevisionsTemplate": 20,
"moderatePings": true,
"customDynamicTemplates": "none"
}
getBlog ¶
Retrieve a single website/blog by its ID.GET/sites/{site_id}{?fields}
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to get an existing Site. |
404 | Not Found | Site not found. |
Example URI
- site_id
number
(required)The site ID.
- fields
string
(optional)The field list to retrieve as part of the Sites resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
200
Headers
Content-Type: application/json
Body
{
"serverOffset": 9,
"themeId": "rainier",
"statusDefault": "Publish",
"autodiscoverLinks": false,
"useRevision": true,
"relativeUrl": "/blog/",
"entryCustomPrefs": [
"title",
"body",
"category",
"tags",
"feedback",
"publishing",
"assets"
],
"archivePath": "/path/to/document_root/blog",
"useCommentConfirmation": true,
"url": "http://example.com/blog/",
"smartReplaceFields": [
"title",
"text",
"text_more",
"keywords",
"excerpt",
"tags"
],
"timezone": "+09:00",
"daysOrPosts": "posts",
"sortOrderPosts": "descend",
"convertParas": "richtext",
"name": "New Blog",
"description": null,
"includeSystem": null,
"archiveUrl": "http://example.com/blog/",
"allowCommentHtml": true,
"fileExtension": "html",
"smartReplace": 0,
"junkFolderExpiry": 14,
"publishEmptyArchive": false,
"dateLanguage": "ja",
"listOnIndex": 10,
"pingWeblogs": false,
"emailNewComments": 1,
"language": "",
"autolinkUrls": true,
"sanitizeSpec": 0,
"customFields": [],
"emailNewPings": 1,
"nofollowUrls": true,
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"pingGoogle": false,
"convertParasComments": 1,
"sitePath": "/path/to/document_root/blog",
"id": "9",
"parent": {
"name": "First Website",
"id": "1"
},
"archiveTypePreferred": "",
"contentCss": null,
"junkScoreThreshold": 0,
"internalAutodiscovery": false,
"createdDate": "2015-03-24T15:15:56+09:00",
"class": "blog",
"moderateComments": 2,
"allowCommentsDefault": true,
"includeCache": false,
"allowCommenterRegist": true,
"maxRevisionsEntry": "20",
"updatable": true,
"requireCommentEmails": false,
"ccLicenseImage": "",
"allowComments": true,
"allowPingsDefault": true,
"pingOthers": [],
"dynamicCache": false,
"basenameLimit": 100,
"modifiedDate": "2015-03-24T15:15:56+09:00",
"dynamicConditional": false,
"pageCustomPrefs": [
"title",
"body",
"category",
"tags",
"feedback",
"publishing",
"assets"
],
"allowPings": true,
"commenterAuthenticators": [
"MovableType"
],
"host": "example.com",
"ccLicenseUrl": "",
"newCreatedUserRoles": [],
"wordsInExcerpt": 40,
"sortOrderComments": "ascend",
"followAuthLinks": true,
"allowUnregComments": false,
"maxRevisionsTemplate": "20",
"moderatePings": true,
"customDynamicTemplates": "none"
}
Stats ¶
This is the PageStats(byPath) resource.
Property Name | Type | Data Type | Database Column | Private | Read Only | Description | Version |
---|---|---|---|---|---|---|---|
path | value | String | Y | The relative path of the target. | v1 | ||
pageviews | value | Number | Y | The number of pageviews for the path. This property exists only if request endpoint is “pageviewsForPath”. | v1 | ||
visits | value | Number | Y | The number of visits for the path. This property exists only if request endpoint is “visitsForPath”. | v1 | ||
archiveType | value | String | mt_fileinfo.fileinfo_archive_type | Y | The archive type of the path. This property is null if the path is not managed by MT. | v1 | |
entry | Object | - | Y | This property is null if “archiveType” is not “Individual”. | v1 | ||
entry.id | value | Number | mt_entry.entry_id | Y | The ID of entry. | v1 | |
author | Object | - | Y | This property is null if “archiveType” is neither “Author” nor “Author-∗”. | v1 | ||
author.id | value | Number | mt_author.author_id | Y | The ID of author. | v1 | |
category | Object | - | Y | This property is null if “archiveType” is neither “Category” nor “Category-∗”. | v1 | ||
category.id | value | Number | mt_category.category_id | Y | The ID of category. | v1 |
{ “totalResults”: 2, “items”: [ { “entry”: null, “pageviews”: “56”, “author”: null, “path”: “/”, “title”: “Your site”, “archiveType”: “index”, “category”: null, “startDate”: null }, { “entry”: { “id”: “1198” }, “pageviews”: “44”, “author”: null, “path”: “/2015/03/exapmle.html”, “title”: “Entry title is here”, “archiveType”: “Individual”, “category”: null, “startDate”: null }, ], “totals”: { “pageviews”: “329” } }
Also, This is the PageStats(byDate) resource.
Property Name | Type | Data Type | Database Column | Private | Read Only | Description | Version |
---|---|---|---|---|---|---|---|
date | value | iso 8601 date | Y | The date of the target. The format is “YYYY-MM-DD”. | v1 | ||
pageviews | value | Number | Y | The pageviews for the path. This property exists only if request endpoint is “pageviewsForDate”. | v1 | ||
visits | value | Number | Y | The visits for the path. This property exists only if request endpoint is “visitsForDate”. | v1 |
{ “totalResults”: 6, “items”: [ { “visits”: “1”, “date”: “2015-05-20” }, { “visits”: “1”, “date”: “2015-05-21” }, { “visits”: “2”, “date”: “2015-05-22” }, { “visits”: “1”, “date”: “2015-05-23” }, { “visits”: “1”, “date”: “2015-05-24” }, { “visits”: “4”, “date”: “2015-05-25” } ], “totals”: { “visits”: “10” } }
visitsForPath ¶
- Authorization is required.
Retrieve visits count for each path from provider.GET/sites/{site_id}/stats/path/visits{?startDate,endDate,limit,offset,path}
Example URI
- site_id
Number
(required)The site ID.
- startDate
String
(required)This is an required parameter. Start date of data. The format is “YYYY-MM-DD”.
- endDate
String
(required)This is an required parameter. End date of data. The format is “YYYY-MM-DD”.
- limit
Number
(optional)This is an optional parameter. Maximum number of paths to retrieve. Default is 10.
- offset
Number
(optional)This is an optional parameter. 0-indexed offset. Default is 0.
- path
String
(optional)This is an optional parameter. The target path of data to retrieve. Default is the path of the current site.
200
Headers
Content-Type: application/json
Body
{
"totalResults": 2,
"items": [
{
"entry": null,
"pageviews": "56",
"author": null,
"path": "/",
"title": "Your site",
"archiveType": "index",
"category": null,
"startDate": null
},
{
"entry": {
"id": "1198"
},
"pageviews": "44",
"author": null,
"path": "/2015/03/exapmle.html",
"title": "Entry title is here",
"archiveType": "Individual",
"category": null,
"startDate": null
},
],
"totals": {
"pageviews": "329"
}
}
401
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Unauthorized",
"code": 401
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Readied provider is not found",
"code": "404"
}
}
visitsForDate ¶
- Authorization is required.
Retrieve visits count for each date from provider.GET/sites/{site_id}/stats/date/visits{?startDate,endDate,limit,offset,path}
Example URI
- site_id
Number
(required)The site ID.
- startDate
String
(required)This is an required parameter. Start date of data. The format is “YYYY-MM-DD”.
- endDate
String
(required)This is an required parameter. End date of data. The format is “YYYY-MM-DD”.
- limit
Number
(optional)This is an optional parameter. Maximum number of paths to retrieve. Default is 10.
- offset
Number
(optional)This is an optional parameter. 0-indexed offset. Default is 0.
- path
String
(optional)This is an optional parameter. The target path of data to retrieve. Default is the path of the current site.
200
Headers
Content-Type: application/json
Body
{
"totalResults": 6,
"items": [
{
"visits": "1",
"date": "2015-05-20"
},
{
"visits": "1",
"date": "2015-05-21"
},
{
"visits": "2",
"date": "2015-05-22"
},
{
"visits": "1",
"date": "2015-05-23"
},
{
"visits": "1",
"date": "2015-05-24"
},
{
"visits": "4",
"date": "2015-05-25"
}
],
"totals": {
"visits": "10"
}
}
401
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Unauthorized",
"code": 401
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Readied provider is not found",
"code": "404"
}
}
pageviewsForPath ¶
- Authorization is required.
Retrieve pageviews count for each path from provider.GET/sites/{site_id}/stats/path/pageviews{?startDate,endDate,limit,offset,path,uniquePath}
Example URI
- site_id
Number
(required)The site ID.
- startDate
String
(required)This is an required parameter. Start date of data. The format is “YYYY-MM-DD”.
- endDate
String
(required)This is an required parameter. End date of data. The format is “YYYY-MM-DD”.
- limit
Number
(optional)This is an optional parameter. Maximum number of paths to retrieve. Default is 10.
- offset
Number
(optional)This is an optional parameter. 0-indexed offset. Default is 0.
- path
String
(optional)This is an optional parameter. The target path of data to retrieve. Default is the path of the current site.
- uniquePath
Boolean
(optional)This is an optional parameter. If true is given, the MT can return total pageviews for each uniqueness paths. However, that data does not contains page title because its spec. (Sometimes, Google Analytics will return another pageviews by same path.)
200
Headers
Content-Type: application/json
Body
{
"totalResults": 2,
"items": [
{
"entry": null,
"pageviews": "56",
"author": null,
"path": "/",
"title": "Your site",
"archiveType": "index",
"category": null,
"startDate": null
},
{
"entry": {
"id": "1198"
},
"pageviews": "44",
"author": null,
"path": "/2015/03/exapmle.html",
"title": "Entry title is here",
"archiveType": "Individual",
"category": null,
"startDate": null
},
],
"totals": {
"pageviews": "329"
}
}
401
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Unauthorized",
"code": 401
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Readied provider is not found",
"code": "404"
}
}
pageviewsForDate ¶
- Authorization is required.
Retrieve pageviews count for each date from provider.GET/sites/{site_id}/stats/date/pageviews{?startDate,endDate,limit,offset,path,uniquePath}
Example URI
- site_id
Number
(required)The site ID.
- startDate
String
(required)This is an required parameter. Start date of data. The format is “YYYY-MM-DD”.
- endDate
String
(required)This is an required parameter. End date of data. The format is “YYYY-MM-DD”.
- limit
Number
(optional)This is an optional parameter. Maximum number of paths to retrieve. Default is 10.
- offset
Number
(optional)This is an optional parameter. 0-indexed offset. Default is 0.
- path
String
(optional)This is an optional parameter. The target path of data to retrieve. Default is the path of the current site.
- uniquePath
Boolean
(optional)This is an optional parameter. If true is given, the MT can return total pageviews for each uniqueness paths. However, that data does not contains page title because its spec. (Sometimes, Google Analytics will return another pageviews by same path.)
200
Headers
Content-Type: application/json
Body
{
"totalResults": 6,
"items": [
{
"visits": "1",
"date": "2015-05-20"
},
{
"visits": "1",
"date": "2015-05-21"
},
{
"visits": "2",
"date": "2015-05-22"
},
{
"visits": "1",
"date": "2015-05-23"
},
{
"visits": "1",
"date": "2015-05-24"
},
{
"visits": "4",
"date": "2015-05-25"
}
],
"totals": {
"visits": "10"
}
}
401
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Unauthorized",
"code": 401
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Readied provider is not found",
"code": "404"
}
}
getProvider ¶
- Authorization is required.
Retrieve a current effective provider.GET/sites/{site_id}/stats/provider
Example URI
- site_id
Number
(required)The site ID.
200
Headers
Content-Type: application/json
Body
{
"id": "GoogleAnalytics"
}
401
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Unauthorized",
"code": 401
}
}
Templates ¶
This is the Templates resource.
Property Name | Type | Data Type | Database Column | Private | Read Only | Description | Version |
---|---|---|---|---|---|---|---|
archiveTypes | ARRAY | Templatemap | Y | Y | This archive types for this template. | v2 | |
archiveType.id | value | Number | mt_templatemap.templatemap_id | Y | Y | The ID for this archive type. | v2 |
archiveType.isPreferred | value | boolean | mt_templatemap.templatemap_is_preferred | Y | Y |
|
v2 |
archiveType.fileTemplate | value | String | mt_templatemap.templatemap_file_template | Y | Y | The file template for this archive type. | v2 |
archiveType.archiveType | value | String | mt_templatemap.templatemap_archive_type | Y | Y | The archive type for this archive type. | v2 |
archiveType.buildType | value | String | mt_templatemap.templatemap_build_type | Y | Y | The build type for this archive type. | v2 |
archiveType.updatable | value | boolean | Y | Y |
|
v2 | |
updatable | value | boolean | Y | Y |
|
v2 | |
blog | Object | Blog | Y | Y | The blog of this template. | v2 | |
blog.id | value | Number | mt_template.template_blog_id | Y | Y | The ID of the blog that contains this template. | v2 |
buildType | value | String | mt_template.template_build_type | Y | The build type for this template. Available value is follows.
|
v2 | |
createdBy | Object | User | Y | Y | Created user of this template. | v2 | |
createdBy.id | value | Number | mt_template.template_created_by | Y | Y | The ID of this template creator. | v2 |
createdBy.displayName | value | String | mt_author.author_nickname | Y | Y | The display name of this template creator. | v2 |
createdBy.userpicUrl | value | String | mt_author.author_userpic_url | Y | Y | The URL of this template 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. | v2 |
createdDate | value | iso 8601 datetime | mt_template.template_created_on | Y | Y | Created date of this template. | v2 |
customFields | ARRAY | Field | Y | Y | The list of customfields data of this template. | v2 | |
customField.basename | value | String | mt_field.field_basename | Y | Y | The basename of this customfield. | v2 |
customField.value | value | String | mt_template_meta.* | Y | The value of this customfield. | v2 | |
id | value | Number | mt_template.template_id | Y | Y | The ID for this template. | v2 |
linkToFie | value | String | mt_template.template_linked_file | Y | The linked output filename for this template. | v2 | |
modifiedBy | Object | User | Y | Y | Last modified user of this template. | v2 | |
modifiedBy.id | value | Number | mt_template.template_modified_by | Y | Y | The ID of this template modifier. | v2 |
modifiedBy.displayName | value | String | mt_author.author_nickname | Y | Y | The display name of this template modifier. | v2 |
modifiedBy.userpicUrl | value | String | mt_author.author_userpic_url | Y | Y | The URL of this template modifier’s userpic. The userpic modifiedDate | value |
will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. | v2 | ||||||
name | value | String | mt_template.template_name | Y | The name for this template. | v2 | |
outputFile | value | String | mt_template.template_outfile | Y | The output filename for this template. | v2 | |
text | value | String | mt_template.template_text | Y | The text for this template. | v2 | |
type | value | String | mt_template.template_type | Y | The type for this template. | v2 | |
templateType | value | String | mt_template.template_identifier | Y | The identifier for this template. | v2 |
{ “createdBy”: { “userpicUrl”: null, “id”: “1”, “displayName”: “Yuji Takayama” }, “name”: “HTML Header”, “updatable”: true, “blog”: { “id”: “1” }, “text”: " <meta name=“viewport” content=“width=device-width,initial-scale=1”>\n <link rel=“stylesheet” href="<$mt:Link template=“styles” encode_html=“1”$>">\n \n <mt:Assets tag="@SITE_FAVICON" limit=“1”><link rel=“shortcut icon” href="<$mt:AssetURL encode_html=“1”$>"></mt:Assets>\n <link rel=“start” href="<$mt:BlogURL encode_html=“1”$>">\n <link rel=“alternate” type=“application/atom+xml” title=“Recent Entries” href="<$mt:Link template=“feed_recent”$>" />\n <$mt:CanonicalLink$>\n <$mt:StatsSnippet$>\n", “linkToFile”: “”, “createdDate”: “2015-05-22T13:19:53+09:00”, “id”: “33”, “type”: “custom”, “modifiedDate”: “2015-05-22T13:19:53+09:00”, “customFields”: [] }
listTemplates ¶
new in v2.0: Retrieve a list of templates in the specified site.GET/sites/{site_id}/templates{?site_id,limit,offset,sortBy,sortOrder,fields,searchFields,search,includeIds,excludeIds,type}
- Authorization is required.
Permissions
- edit_templates
Example URI
- site_id
number
(required)The site ID. If 0 specified, will load from global template in the system.
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: labelThe comma separated list of field names to search.
- limit
number
(optional) Default: 10Maximum number of templates to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: name- id
- Sort by the ID of each template.
- name
- Sort by the name of each template.
- created_on
- Sort by the created time of each template.
- modified_on
- Sort by the modified time of each template.
- created_by
- Sort by the ID of user who created each template.
- modified_by
- Sort by the ID of user who modified each template.
- type
- Sort by the type of each template.
- sortOrder
string
(optional) Default: descend- descend
- Return templates in descending order. For sorting by date, it means from newest to oldest.
- ascend
- Return templates in ascending order. For sorting by date, it means from oldest to newest.
- fields
string
(optional)The field list to retrieve as part of the Templates resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
- includeIds
string
(optional)The comma separated list of template IDs to include in result.
- excludeIds
string
(optional)The comma separated list of template IDSs to exclude from result.
- type
string
(optional)Filter by template type. The list should be separated by commas. (e.g. archive, custom, index, individual, page etc…)
200
Headers
Content-Type: application/json
Body
{
"totalResults": "29",
"items": [
{
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"name": "HTML Header",
"updatable": true,
"blog": {
"id": "1"
},
"text": " <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n <link rel=\"stylesheet\" href=\"<$mt:Link template=\"styles\" encode_html=\"1\"$>\">\n <!--[if lt IE 9]>\n <link rel=\"stylesheet\" href=\"<$mt:Link template=\"styles_ie\" encode_html=\"1\"$>\">\n <script src=\"<$mt:SupportDirectoryURL encode_html=\"1\"$>theme_static/rainier/js/html5shiv.js\"></script>\n <![endif]-->\n <mt:Assets tag=\"@SITE_FAVICON\" limit=\"1\"><link rel=\"shortcut icon\" href=\"<$mt:AssetURL encode_html=\"1\"$>\"></mt:Assets>\n <link rel=\"start\" href=\"<$mt:BlogURL encode_html=\"1\"$>\">\n <link rel=\"alternate\" type=\"application/atom+xml\" title=\"Recent Entries\" href=\"<$mt:Link template=\"feed_recent\"$>\" />\n <$mt:CanonicalLink$>\n <$mt:StatsSnippet$>\n",
"linkToFile": "",
"createdDate": "2015-05-22T13:19:53+09:00",
"id": "33",
"type": "custom",
"modifiedDate": "2015-05-22T13:19:53+09:00",
"customFields": []
},
{
"outputFile": "mt-theme-scale2.js",
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"name": "JavaScript - Theme",
"updatable": true,
"blog": {
"id": "1"
},
"buildType": "Static",
"templateType": "javascript_theme",
"text": "$(function() {\n $('<select />').appendTo('header [role=\"navigation\"]');\n\n $('<option />', {\n 'value': '',\n 'text': 'Menu',\n 'selected': 'selected'\n }).appendTo('header [role=\"navigation\"] > select');\n\n $('header [role=\"navigation\"] a').each(function() {\n var el = $(this);\n $('<option />', {\n 'value': el.attr('href'),\n 'text': el.text()\n }).appendTo('header [role=\"navigation\"] > select');\n });\n\n $('header [role=\"navigation\"] > select, .widget-archive-dropdown select').change(function() {\n window.location = $(this).find('option:selected').val();\n });\n});\n",
"linkToFile": "",
"type": "index",
"id": "9",
"createdDate": "2015-05-22T13:19:53+09:00",
"modifiedDate": "2015-05-22T13:19:53+09:00",
"customFields": []
}
]
}
401
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Unauthorized",
"code": 401
}
}
403
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Do not have permission to retrieve the list of templates.",
"code": "403"
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Site not found",
"code": "404"
}
}
500
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Some error message is here",
"code": "500"
}
}
getTemplate ¶
new in v2.0: Retrieve single template by its ID.GET/sites/{site_id}/templates/{template_id}{?fields}
- Authorization is required.
Permissions
- edit_templates
Example URI
- site_id
number
(required)The site ID. If 0 specified, will load from global template in the system.
- template_id
number
(required)The template ID.
- fields
string
(optional)The field list to retrieve as part of the Templates resource. The list of field names should be separated by commas. If this parameter is not specified, all fields will be returned.
200
Headers
Content-Type: application/json
Body
{
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"name": "HTML Header",
"updatable": true,
"blog": {
"id": "1"
},
"text": " <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n <link rel=\"stylesheet\" href=\"<$mt:Link template=\"styles\" encode_html=\"1\"$>\">\n <!--[if lt IE 9]>\n <link rel=\"stylesheet\" href=\"<$mt:Link template=\"styles_ie\" encode_html=\"1\"$>\">\n <script src=\"<$mt:SupportDirectoryURL encode_html=\"1\"$>theme_static/rainier/js/html5shiv.js\"></script>\n <![endif]-->\n <mt:Assets tag=\"@SITE_FAVICON\" limit=\"1\"><link rel=\"shortcut icon\" href=\"<$mt:AssetURL encode_html=\"1\"$>\"></mt:Assets>\n <link rel=\"start\" href=\"<$mt:BlogURL encode_html=\"1\"$>\">\n <link rel=\"alternate\" type=\"application/atom+xml\" title=\"Recent Entries\" href=\"<$mt:Link template=\"feed_recent\"$>\" />\n <$mt:CanonicalLink$>\n <$mt:StatsSnippet$>\n",
"linkToFile": "",
"createdDate": "2015-05-22T13:19:53+09:00",
"id": "33",
"type": "custom",
"modifiedDate": "2015-05-22T13:19:53+09:00",
"customFields": []
}
+ Response 401 (application/json)
{
"error": {
"message": "Unauthorized",
"code": 401
}
}
+ Response 403 (application/json)
{
"error": {
"message": "Do not have permission to retrieve the list of templates.",
"code": "403"
}
}
+ Response 404 (application/json)
{
"error": {
"message": "Site not found / Template not found",
"code": "404"
}
}
+ Response 500 (application/json)
{
"error": {
"message": "Some error message is here",
"code": "500"
}
}
createTemplate ¶
new in v2.0: Create a new template.POST/sites/{site_id}/templates
- Authorization is required.
Permissions
- edit_templates
Example URI
- site_id
number
(required)The site ID. If 0 specified, will create into the global template in the system.
Templates resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
template={ "name": "New Template", "text": "some template code here", "linkToFile": "", "type": "custom" }
200
Headers
Content-Type: application/json
Body
{
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"name": "New Template",
"updatable": true,
"blog": {
"id": "1"
},
"text": "some template code here",
"linkToFile": "",
"createdDate": "2015-06-29T16:47:09+09:00",
"id": "152",
"type": "custom",
"modifiedDate": "2015-06-29T16:47:09+09:00",
"customFields": []
}
401
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Unauthorized",
"code": 401
}
}
403
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Do not have permission to retrieve a template.",
"code": "403"
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Site not found",
"code": "404"
}
}
500
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Some error message is here",
"code": "500"
}
}
updateTemplate ¶
new in v2.0: Update a template.PUT/sites/{site_id}/templates/{template_id}
-
Authorization is required.
-
This method accepts PUT or POST with __method=PUT.
Permissions
- edit_templates
Example URI
- site_id
number
(required)The site ID. If 0 specified, will update a global template in the system.
- template_id
number
(required)The template ID.
Templates resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
template={ "name": "new template name" }
200
Headers
Content-Type: application/json
Body
{
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"name": "New Template name",
"updatable": true,
"blog": {
"id": "1"
},
"text": "some template code here",
"linkToFile": "",
"createdDate": "2015-06-29T16:47:09+09:00",
"id": "152",
"type": "custom",
"modifiedDate": "2015-06-29T16:47:09+09:00",
"customFields": []
}
401
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Unauthorized",
"code": 401
}
}
403
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Do not have permission to update a template.",
"code": "403"
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Site not found / Template not found",
"code": "404"
}
}
405
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Request method is not PUT or 'POST' with __PUT"
"code": "405"
}
}
500
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Some error message is here",
"code": "500"
}
}
deleteTemplate ¶
new in v2.0: Delete a template.DELETE/sites/{site_id}/templates/{template_id}
-
Authorization is required.
-
This method accepts DELETE or POST with __method=DELETE.
Permissions
- edit_templates
Example URI
- site_id
number
(required)The site ID. If 0 specified, delete from global template in the system.
- template_id
number
(required)The template ID.
200
Headers
Content-Type: application/json
Body
{
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"name": "New Template name",
"updatable": true,
"blog": {
"id": "1"
},
"text": "some template code here",
"linkToFile": "",
"createdDate": "2015-06-29T16:47:09+09:00",
"id": "152",
"type": "custom",
"modifiedDate": "2015-06-29T16:47:09+09:00",
"customFields": []
}
401
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Unauthorized",
"code": 401
}
}
403
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Do not have permission to delete a template.",
"code": "403"
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Site not found / Template not found",
"code": "404"
}
}
405
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Request method is not PUT or 'POST' with __PUT"
"code": "405"
}
}
500
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Some error message is here",
"code": "500"
}
}
publishTemplate ¶
new in v2.0: Publish a template.POST/sites/{site_id}/templates/{template_id}/publish
-
Authorization is required.
-
Only available for following templates
- index
- archive
- individual
- page
- category
Permissions
- rebuild
Example URI
- site_id
number
(required)The site ID
- template_id
number
(required)The template ID.
200
Headers
Content-Type: application/json
Body
{
"status": "success"
}
400
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Cannot publish [template type] template.",
"code": "400"
}
}
403
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Do not have permission to publish a template.",
"code": "403"
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Site not found / Template not found",
"code": "404"
}
}
500
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Some error message is here",
"code": "500"
}
}
refreshTemplate ¶
new in v2.0: Reset template text to theme default or tempalte_set default.POST/sites/{site_id}/templates/{template_id}/refresh
- Authorization is required.
Permissions
- edit_templates
Example URI
- site_id
number
(required)The site ID. If 0 specified, refresh a global template in the system.
- template_id
number
(required)The template ID.
200
Headers
Content-Type: application/json
Body
{
"messages": [
"「New Template name」を初期化します。"
],
"status": "success"
}
403
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Do not have permission to refresh a template.",
"code": "403"
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Site not found / Template not found",
"code": "404"
}
}
500
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Some error message is here",
"code": "500"
}
}
refreshTemplateForSite ¶
new in v2.0: Reset all templates in the site.POST/sites/{site_id}/refresh_templates{?refresh_type}
- Authorization is required.
Permissions
- edit_templates
Example URI
- site_id
number
(required)The site ID. If 0 specified, refresh a global template in the system.
- refresh_type
string
(optional) Default: refreshThe type of refresh mode.
- refresh
- Refresh all templates. However, A template that created by user will never refreshed and never removed from a site.
- clean
- Refresh all templates. In this mode, A template that created by user will removed from a site.
200
Headers
Content-Type: application/json
Body
{
"status": "success"
}
403
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Do not have permission to refresh templates of the request site.",
"code": "403"
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Site not found",
"code": "404"
}
}
500
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Some error message is here",
"code": "500"
}
}
cloneTemplate ¶
new in v2.0: Make a clone of a template.POST/sites/{site_id}/templates/{template_id}/clone
- Authorization is required.
Permissions
- edit_templates
Example URI
- site_id
number
(required)The site ID. If 0 specified, refresh a global template in the system.
- template_id
number
(required)The template ID.
200
Headers
Content-Type: application/json
Body
{
"status": "success"
}
403
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Do not have permission to clone a template.",
"code": "403"
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Site not found / Template not found",
"code": "404"
}
}
500
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Some error message is here",
"code": "500"
}
}
previewTemplate ¶
new in v2.0: Make a preview for a template.POST/sites/{site_id}/templates/preview{?raw}
-
Authorization is required.
-
This endpoint is available in Movable Type 6.1.2 or later.
-
type
parameter in the Templates resource is required.
Permissions
- edit_templates
Example URI
- site_id
number
(required)The site ID.
- raw
number
(optional)If specify “1”, will be returned preview contents.
Templates resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
template={ "name": "New Template", "text": "some template code here", "type": "custom" }
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"preview": "http://example.com/index.html"
}
403
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Do not have permission to get template preview.",
"code": "403"
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Site not found",
"code": "404"
}
}
500
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Some error message is here",
"code": "500"
}
}
previewTemplateById ¶
new in v2.0: Make a preview for a template with existing data.POST/sites/{site_id}/templates/{template_id}/preview{?raw}
-
Authorization is required.
-
This endpoint is available in Movable Type 6.1.2 or later.
-
Only available for following templates
- index
- archive
- individual
- page
- category
- template parameter is required. If you just want to get preview template from existing data, you should provide template parameter with empty json.
Permissions
- edit_templates
Example URI
- site_id
number
(required)The site ID.
- template_id
number
(required)The template ID.
- raw
number
(optional)If specify “1”, will be returned preview contents.
Templates resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
template={}
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"preview": "http://example.com/index.html"
}
403
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Do not have permission to get template preview.",
"code": "403"
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Site not found / Template not found",
"code": "404"
}
}
500
Headers
Content-Type: application/json
Body
{
"error": {
"message": "Some error message is here",
"code": "500"
}
}
Themes ¶
This is the Themes resource. The Themes resource is not stored in the database.
Property Name | Type | Data Type | Database Column | Private | Read Only | Description | Version |
---|---|---|---|---|---|---|---|
authorLink | value | string | - | Y | Y | The author link of this theme. | v2 |
authorName | value | string | - | Y | Y | The author name of this theme. | v2 |
current | value | boolean | - | Y | Y | DEPRECATAD | |
description | value | string | - | Y | Y | The description for this theme. | v2 |
id | value | string | - | Y | Y | The ID for this theme. | v2 |
inUse | value | boolean | - | Y | Y | This property is displayed only in system scope.
|
v2 |
label | value | string | - | Y | Y | The label for this theme. | v2 |
uninstallable | value | boolean | - | Y | Y |
|
v2 |
version | value | string | - | Y | Y | The version number for this theme. | v2 |
{ “authorName”: “Six Apart Ltd.”, “authorLink”: "http://www.movabletype.org/", “version”: “1.14”, “description”: ““Rainier” is a customizable Responsive Web Design theme, designed for blogs. In addition to multi-device viewing support, provided by Media Query (CSS), Movable Type functions make customizing navigational contents as well as image elements, such as logos, headers, very simple.”, “uninstallable”: false, “inUse”: true, “id”: “rainier”, “label”: “Rainier” }
listThemes ¶
New in v2.0: Retrieve a list of themes.GET/themes
- Authentication is required
Permissions
- manage_themes
Example URI
Headers
X-MT-Authorization: MTAuth accessToken=<Token>
200
Headers
Content-Type: application/json
Body
{
"totalResults": 9,
"items": [
{
"authorName": "Six Apart Ltd.",
"authorLink": "http://www.movabletype.org/",
"version": "1.14",
"description": "\"Rainier\" is a customizable Responsive Web Design theme, designed for blogs. In addition to multi-device viewing support, provided by Media Query (CSS), Movable Type functions make customizing navigational contents as well as image elements, such as logos, headers, very simple.",
"uninstallable": false,
"inUse": true,
"id": "rainier",
"label": "Rainier"
},
{
"authorName": "Six Apart Ltd.",
"authorLink": "http://www.movabletype.org/",
"version": "1.3",
"description": "Create a blog portal that aggregates contents from several blogs in one website.",
"uninstallable": false,
"inUse": false,
"label": "Classic Website",
"id": "classic_website"
},
{
"authorName": "Six Apart Ltd.",
"authorLink": "http://www.sixapart.com/",
"version": "1.11",
"description": "Professional designed, well structured and easily adaptable web site. You can customize default pages, footer and top navigation easily.",
"uninstallable": false,
"inUse": false,
"label": "Professional Website",
"id": "professional_website"
},
{
"authorName": "Six Apart Ltd",
"authorLink": "http://www.sixapart.com/",
"version": "1.44",
"description": "Eiger is a customizable Responsive Web Design theme, designed for blogs and corporate websites. In addition to multi-device viewing support, provided via Media Query (CSS), Movable Type functions make customizing navigational contents as well as image elements, such as logos, headers or banners, very simple.",
"uninstallable": false,
"inUse": false,
"label": "Eiger",
"id": "eiger"
},
{
"authorName": "Six Apart Ltd.",
"authorLink": "http://www.movabletype.org/",
"version": "1.3",
"description": "Pico is a microblogging theme, designed for keeping things simple to handle frequent updates. To put the focus on content we've moved the sidebars below the list of posts.",
"uninstallable": false,
"inUse": false,
"label": "Pico",
"id": "pico"
},
{
"authorName": "Six Apart Ltd.",
"authorLink": "http://www.movabletype.org/",
"version": "1.3",
"description": "A traditional blogging design that comes with plenty of styles and a selection of 2 column / 3 column layouts. Best for use in standard blog publishing applications.",
"uninstallable": false,
"inUse": false,
"label": "Classic Blog",
"id": "classic_blog"
},
{
"authorName": "Six Apart Ltd.",
"authorLink": "http://www.sixapart.com/",
"version": "1.01",
"description": "Increase reader engagement - deploy features to your website that make it easier for your readers to engage with your content and your company.",
"uninstallable": false,
"inUse": false,
"label": "Community Blog",
"id": "mt_community_blog"
},
{
"authorName": "Six Apart Ltd.",
"authorLink": "http://www.sixapart.com/",
"version": "1.01",
"description": "Create forums where users can post topics and responses to topics.",
"uninstallable": false,
"inUse": false,
"label": "Community Forum",
"id": "mt_community_forum"
},
{
"authorName": "Six Apart Ltd.",
"authorLink": "http://www.sixapart.com/",
"version": "1.11",
"description": "Create a blog as a part of structured website. This works best with Professional Website theme.",
"uninstallable": false,
"inUse": false,
"label": "Professional Blog",
"id": "professional_blog"
}
]
}
getTheme ¶
New in v2.0: Retrieve a single theme by its ID.GET/themes/{theme_id}
- Authentication is required
Permissions
- manage_themes
Example URI
- theme_id
string
(required)The theme ID.
Headers
X-MT-Authorization: MTAuth accessToken=<Token>
200
Headers
Content-Type: application/json
Body
{
"authorName": "Six Apart Ltd.",
"authorLink": "http://www.movabletype.org/",
"version": "1.14",
"description": "\"Rainier\" is a customizable Responsive Web Design theme, designed for blogs. In addition to multi-device viewing support, provided by Media Query (CSS), Movable Type functions make customizing navigational contents as well as image elements, such as logos, headers, very simple.",
"uninstallable": false,
"inUse": false,
"id": "rainier",
"label": "Rainier"
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"code": 404,
"message": "Theme not found"
}
}
applyThemeToSite ¶
New in v2.0: Apply a theme to site.POST/sites/{site_id}/themes/{theme_id}/apply
- Authentication is required
Permissions
- manage_themes
Example URI
- site_id
number
(required)The site ID.
- theme_id
string
(required)The theme ID.
Headers
X-MT-Authorization: MTAuth accessToken=<Token>
200
Headers
Content-Type: appication/json
Body
{
"status": "success"
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"code": 404,
"message": "Theme not found"
}
}
uninstall_theme ¶
Uninstall a specified theme from the MT.DELETE/themes/{theme_id}
-
Authentication is required
-
When successful, you can take Themes Resource that was deleted. However, this theme is already removed from the Movable Type. You cannot apply this theme to.
Permissions
- manage_themes
Example URI
- theme_id
string
(required)The theme ID.
Headers
X-MT-Authorization: MTAuth accessToken=<Token>
200
Headers
Content-Type: appication/json
Body
{
"authorName": null,
"authorLink": "",
"version": "1.0",
"description": "",
"uninstallable": true,
"inUse": false,
"id": "theme_from_test",
"label": "Theme from Rainier"
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"code": 404,
"message": "Theme not found"
}
}
exportSiteTheme ¶
New in v2.0: Export site's theme.POST/sites/{site_id}/export_theme
-
Authentication is required
-
This endpoint will export current theme elements of specified site into theme directory.
Permissions
- manage_themes
Example URI
- site_id
number
(required)The site ID.
Headers
X-MT-Authorization: MTAuth accessToken=<Token>
200
Headers
Content-Type: appication/json
Body
{
"status": "success"
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"code": 404,
"message": "Theme not found"
}
}
Users ¶
This is the Users resource.
Property Name | Type | Data Type | Database Column | Private | Read Only | Description | Version |
---|---|---|---|---|---|---|---|
createdBy | Object | User | - | Y | Y | Created user of this user. | v2 |
createdBy.displayName | value | string | mt_author.author_nickname | Y | Y | The display name of this user creator. | v2 |
createdBy.id | value | number | mt_author.author_created_by | Y | Y | The ID of this user creator. | v2 |
createdBy.userpicUrl | value | string | mt_author.author_userpic_url | Y | The URL of this user 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. | v2 | |
createdDate | value | iso 8601 datetime | mt_author.author_created_on | - | Y | Created date of this user. | v2 |
customFields | value | Field | - | - | Y | The list of customfields data of this user. | v2 |
customField.basename | value | string | mt_field.field_basename | - | Y | The basename of this customfield. | v2 |
customField.value | value | string | mt_author_meta.* | - | - | The value of this customfield. | v2 |
dateFormat | value | string | mt_author.author_date_format | Y | The date formatting for this user. | v2 | |
displayName | value | string | mt_author.author_nickname | The public display name for this user. | v1 | ||
value | string | mt_author.author_email | Y | The email address for this user. | v1 | ||
id | value | number | mt_author.author_id | Y | Y | The unique ID for this user. | v1 |
isSuperuser | value | boolean | Y | Y |
|
v2 | |
language | value | string | mt_author.author_preferred_language | The preferred language for this user.
|
v1 | ||
lockedOut | value | boolean | mt_author.author_locked_out_time | Y | Y |
|
v2 |
modifiedBy | Object | User | - | - | Y | Last modified user of this user. | v2 |
modifiedBy.displayName | value | string | mt_author.author_nickname | - | Y | The display name of this user modifier. | v2 |
modifiedBy.id | value | number | mt_author.author_modified_by | - | Y | The ID of this user modifier. | v2 |
modifiedBy.userpicUrl | value | string | mt_author.author_userpic_url | - | Y | The URL of this user modifier’s userpic. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. | v2 |
modifiedDate | value | iso 8601 datetime | mt_author.author_modified_on | - | Y | Last modified date of this user. | v2 |
name | value | string | mt_author.author_name | The account name for this user. [update in v2] This column was changed to updatable from v2. | v1 | ||
password | value | string | mt_author.author_password | Y | Write Only | The password for this user. This property is write only. | v2 |
updatable | value | boolean | Y |
|
v1 | ||
url | value | string | mt_author.author_url | The web site URL for this user. | v1 | ||
userpicUrl | value | string | Y | The profile photo URL for this user. The userpic will be made by UserpicThumbnailSize and UserpicAllowRect settings. If user does not set own userpic, will be returned empty string. | v1 | ||
status | value | string | mt_author.author_status | Y | The status for this user. Available value is follows.
|
v2 | |
systemPermissions | ARRAY | string | - | Y | - | The list of system permissions which this user have. Only system administrator can get this property | v2 |
tagDelimiter | value | string | mt_author.author_entry_prefs | Y | The tag delimiter character for this user. Available value is follow.
|
v2 | |
textFormat | value | string | mt_author.author_text_format | Y | The text formatting for this user. | v2 |
{ “status” : “Active”, “createdBy” : { “userpicUrl” : null, “id” : “1”, “displayName” : “Yuji Takayama” }, “updatable” : true, “lockedOut” : false, “isSuperuser” : true, “dateFormat” : “relative”, “systemPermissions” : [ “administer”, “create_website”, “create_blog”, “edit_templates”, “manage_plugins”, “view_log” ], “email” : "ytakayama@sixapart.com", “userpicUrl” : null, “url” : “”, “id” : “1”, “tagDelimiter” : “comma”, “displayName” : “Yuji Takayama”, “modifiedBy” : { “userpicUrl” : null, “id” : “1”, “displayName” : “Yuji Takayama” }, “modifiedDate” : “2015-03-26T17:12:18+09:00”, “language” : “en-us”, “name” : “takayama”, “textFormat” : “0”, “createdDate” : “2015-03-23T14:53:52+09:00”, “customFields” : [] }
listUsers ¶
New in v2.0: Retrieve a list of users in the specified site.GET/users{?search,searchFields,limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds,status,lockout}
- Authentication is required if want to include non-active users. Also, want to get private properties.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to retrieve the list of users. |
Permissions
- administer
- for retrieve non-active users
- for read private properties
Example URI
- search
string
(optional)Search query.
- searchFields
string
(optional) Default: name,displayName,email,urlThe comma separated field name list to search.
- limit
number
(optional) Default: 10Maximum number of users to retrieve.
- offset
number
(optional) Default: 00-indexed offset.
- sortBy
string
(optional) Default: nameThe field name for sort. You can specify one of following values
- id
- name
- sortOrder
string
(optional) Default: descend- descend
- (default) Return users in descending order.
- ascend
- Return users in ascending order.
- fields
string
(optional)The field list to retrieve as part of the Users resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds
string
(optional)The comma separated ID list of users to include to result.
- excludeIds
string
(optional)The comma separated ID list of users to exclude from result.
- status
string
(optional)Filter by users’s status.
- active
- status is Active
- disabled
- status is Disabled.
- pending
- status is Pending
- lockout
string
(required)Filter by user’s lockout status.
- locked_out
- Locked out user only
- not_locked_out
- Not locked out user only
200
Headers
Content-Type: application/json
Body
{
"totalResults": 1,
"items": [
{
"status": "Active",
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"updatable": true,
"lockedOut": false,
"isSuperuser": true,
"dateFormat": "relative",
"systemPermissions": [
"administer",
"create_website",
"create_blog",
"edit_templates",
"manage_plugins",
"view_log"
],
"email": "ytakayama@sixapart.com",
"userpicUrl": null,
"url": "",
"id": "1",
"tagDelimiter": "comma",
"displayName": "Yuji Takayama",
"modifiedBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"modifiedDate": "2015-03-26T17:12:18+09:00",
"language": "en-us",
"name": "takayama",
"textFormat": "0",
"createdDate": "2015-03-23T14:53:52+09:00",
"customFields": []
}
]
}
createUser ¶
New in v2.0: Create a new user.POST/users
- Authentication is required.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to create a new user. |
Permissions
- administer
Request Body Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
entry | Object | Yes | Single Entries resource |
Example URI
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
user={"email" : "aikawa@example.com","displayName" : "Ichiro Aikawa","name" : "aikawa","password":"password"}
200
Headers
Content-Type: application/json
Body
{
"status": "Active",
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"updatable": true,
"lockedOut": false,
"isSuperuser": false,
"dateFormat": "relative",
"systemPermissions": [],
"email": "aikawa@example.com",
"userpicUrl": null,
"url": null,
"id": "2",
"tagDelimiter": "comma",
"displayName": "Ichiro Aikawa",
"modifiedDate": "2015-03-27T10:45:43+09:00",
"language": "ja",
"name": "aikawa",
"textFormat": 0,
"createdDate": "2015-03-27T10:45:43+09:00",
"customFields": []
}
getUser ¶
Retrieve a single user by its own ID.GET/users/{user_id}{?fields}
- Authentication is required if want to get non-active user or want to get private properties.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to get the user. |
404 | Not Found | User not found. |
Permissions
- administer
Example URI
- user_id
number or the word 'me'
(required)The user ID.
- fields
string
(optional)The field list to retrieve as part of the Users resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
200
Headers
Content-Type: application/json
Body
{
"status": "Active",
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"updatable": true,
"lockedOut": false,
"isSuperuser": true,
"dateFormat": "relative",
"systemPermissions": [
"administer",
"create_website",
"create_blog",
"edit_templates",
"manage_plugins",
"view_log"
],
"email": "ytakayama@sixapart.com",
"userpicUrl": null,
"url": "",
"id": "1",
"tagDelimiter": "comma",
"displayName": "Yuji Takayama",
"modifiedBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"modifiedDate": "2015-03-26T17:12:18+09:00",
"language": "en-us",
"name": "takayama",
"textFormat": "0",
"createdDate": "2015-03-23T14:53:52+09:00",
"customFields": []
}
updateUser ¶
Update oneself or another one's user data.PUT/users/{user_id}
-
Authentication is required.
-
This method accepts PUT and POST with __method=PUT.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to update user. |
404 | Not Found | User not found. |
405 | Method Not Allowed | Request method is not ‘PUT’ or ‘POST’ with ‘__method=PUT’ |
Permissions
- administer
- If you want to update another one’s or non-active user.
Example URI
- user_id
number or the word 'me'
(required)The user ID.
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
user={"displayName": "New Name"}
200
Headers
Content-Type: application/json
Body
{
"status": "Active",
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"updatable": true,
"lockedOut": false,
"isSuperuser": false,
"dateFormat": "relative",
"systemPermissions": [],
"email": "aikawa@example.com",
"userpicUrl": null,
"url": null,
"id": "2",
"tagDelimiter": "comma",
"displayName": "New Name",
"modifiedDate": "2015-03-27T10:45:43+09:00",
"language": "ja",
"name": "aikawa",
"textFormat": "0",
"createdDate": "2015-03-27T10:45:43+09:00",
"customFields": []
}
New in v2.0: Delete user.DELETE/users/{user_id}
-
Authentication is required.
-
This method accepts DELETE and POST with __method=DELETE.
-
Cannot delete oneself. Also, cannot delete system administrator user.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to delete user. |
404 | Not Found | User not found. |
405 | Method Not Allowed | Request method is not ‘DELETE’ or ‘POST’ with ‘__method=DELETE’ |
Permissions
- administer
Example URI
- user_id
number
(required)The user ID.
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
200
Headers
Content-Type: application/json
Body
{
"status": "Active",
"createdBy": {
"userpicUrl": null,
"id": "1",
"displayName": "Yuji Takayama"
},
"updatable": true,
"lockedOut": false,
"isSuperuser": false,
"dateFormat": "relative",
"systemPermissions": [],
"email": "aikawa@example.com",
"userpicUrl": null,
"url": null,
"id": "2",
"tagDelimiter": "comma",
"displayName": "New Name",
"modifiedDate": "2015-03-27T10:45:43+09:00",
"language": "ja",
"name": "aikawa",
"textFormat": "0",
"createdDate": "2015-03-27T10:45:43+09:00",
"customFields": []
}
unlockUser ¶
Unlock user account.POST/users/{user_id}/unlock
- Authentication is required.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to unlock user. |
404 | Not Found | User not found. |
Permissions
- administer
Example URI
- user_id
number
(required)The user ID.
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
200
Headers
Content-Type: application/json
Body
{
"status": "success"
}
recoverPasswordForUser ¶
Send the link for password recovery to specified user by email.POST/users/{user_id}/recover_password
- Authentication is required.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
403 | Forbidden | Do not have permission to send password recovery mail. |
404 | Not Found | User not found. |
Permissions
- administer
Example URI
- user_id
number
(required)The user ID.
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": <Result message>
}
recoverPassword ¶
Send the link for password recovery to specified email.POST/recover_password
-
This method always returns successful code if it does not found a user, because security reason.
-
Authentication is not required.
Status Code
Code | Status | Description |
---|---|---|
200 | OK | No Errors. |
Permissions
- administer
Example URI
Headers
Content-Type: application/x-www-form-urlencoded
X-MT-Authorization: MTAuth accessToken=<Token>
Body
email=<Email address for user>&name=<Name for user>
200
Headers
Content-Type: application/json
Body
{
"status": "success",
"message": <Result message>
}
Comments ¶
This is the Comments resource.
author
.In the database, comment_visible = 1 and comment_junk_status = 1.
In the database, comment_visible = 0 and comment_junk_status = 1.
In the database, comment_visible = 0 and comment_junk_status = -1.
{ “link” : "http://example.com/blog/2014/11/hello-movable-type.html#comment-1", “parent” : null, “entry” : { “id” : “45” }, “createdBy” : { “id” : 2 “userpicUrl” : null, “displayName” : “Ichiro Aikawa” }, “status” : “Approved”, “date” : “2014-11-05T14:41:39+09:00”, “updatable” : false, “blog” : { “id” : “22” }, “author” : { “id” : 2 “userpicUrl” : null, “displayName” : “Ichiro Aikawa” }, “body” : "
Hi, congrats!
", “createdDate” : “2014-11-05T14:41:39+09:00”, “id” : 1, “modifiedDate” : “2014-11-05T14:41:39+09:00”, “customFields” : [] }listComments ¶
/sites/{site_id}/comments{?search,searchFields,limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds,status,entryStatus}
Status Code
Example URI
number
(required)The site ID.
string
(optional)Search query.
string
(optional) Default: bodyThe comma separated field name list to search.
number
(optional) Default: 10Maximum number of comments to retrieve.
number
(optional) Default: 00-indexed offset.
string
(optional) Default: idThe field name for sort.
string
(optional) Default: descendstring
(optional)The field list to retrieve as part of the Comments resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
string
(optional)The comma separated ID list of comments to include to result.
string
(optional)The comma separated ID list of comments to exclude from result.
string
(optional)Filter by status.
string
(optional)Filter by container entry’s status.
200
Headers
Content-Type: application/json
Body
{ "totalResults" : "1", "items" : [ { "link" : "http://example.com/blog/2014/11/hello-movable-type.html#comment-1", "parent" : null, "entry" : { "id" : "45" }, "createdBy" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "status" : "Approved", "date" : "2014-11-05T14:41:39+09:00", "updatable" : false, "blog" : { "id" : "22" }, "author" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "body" : "<p>Hi, congrats!</p>", "createdDate" : "2014-11-05T14:41:39+09:00", "id" : 1, "modifiedDate" : "2014-11-05T14:41:39+09:00", "customFields" : [] } ] }
listCommentsForEntry ¶
/sites/{site_id}/entries/{entry_id}/comments{?search,searchFields,limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds,status}
Status Code
Example URI
number
(required)The site ID.
number
(required)The entry ID.
string
(optional)Search query.
string
(optional) Default: bodyThe comma separated field name list to search.
number
(optional) Default: 10Maximum number of comments to retrieve.
number
(optional) Default: 00-indexed offset.
string
(optional) Default: idThe field name for sort.
string
(optional) Default: descendstring
(optional)The field list to retrieve as part of the Comments resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
string
(optional)The comma separated ID list of comments to include to result.
string
(optional)The comma separated ID list of comments to exclude from result.
string
(optional)Filter by status.
200
Headers
Content-Type: application/json
Body
{ "totalResults" : "1", "items" : [ { "link" : "http://example.com/blog/2014/11/hello-movable-type.html#comment-1", "parent" : null, "entry" : { "id" : "45" }, "createdBy" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "status" : "Approved", "date" : "2014-11-05T14:41:39+09:00", "updatable" : false, "blog" : { "id" : "22" }, "author" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "body" : "<p>Hi, congrats!</p>", "createdDate" : "2014-11-05T14:41:39+09:00", "id" : 1, "modifiedDate" : "2014-11-05T14:41:39+09:00", "customFields" : [] } ] }
listCommentsForPage ¶
/sites/{site_id}/pages/{page_id}/comments{?search,searchFields,limit,offset,sortBy,sortOrder,fields,includeIds,excludeIds,status}
Status Code
Example URI
number
(required)The site ID.
number
(required)The page ID.
string
(optional)Search query.
string
(optional) Default: bodyThe comma separated field name list to search.
number
(optional) Default: 10Maximum number of comments to retrieve.
number
(optional) Default: 00-indexed offset.
string
(optional) Default: idThe field name for sort.
string
(optional) Default: descendstring
(optional)The field list to retrieve as part of the Comments resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
string
(optional)The comma separated ID list of comments to include to result.
string
(optional)The comma separated ID list of comments to exclude from result.
string
(optional)Filter by status.
200
Headers
Content-Type: application/json
Body
{ "totalResults" : "1", "items" : [ { "link" : "http://example.com/blog/2014/11/hello-movable-type.html#comment-1", "parent" : null, "entry" : { "id" : "45" }, "createdBy" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "status" : "Approved", "date" : "2014-11-05T14:41:39+09:00", "updatable" : false, "blog" : { "id" : "22" }, "author" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "body" : "<p>Hi, congrats!</p>", "createdDate" : "2014-11-05T14:41:39+09:00", "id" : 1, "modifiedDate" : "2014-11-05T14:41:39+09:00", "customFields" : [] } ] }
createComment ¶
/sites/{site_id}/entries/{entry_id}/comments
Status Code
Permission
Request Body Parameters
Example URI
number
(required)The site ID.
number
(required)The entry ID.
Assets resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
comment={"body" : "This is a test comment.\nHe he he"}
200
Headers
Content-Type: application/json
Body
{ "link" : "http://example.com/blog/2014/11/hello-movable-type.html#comment-1", "parent" : null, "entry" : { "id" : "45" }, "createdBy" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "status" : "Approved", "date" : "2014-11-05T14:41:39+09:00", "updatable" : false, "blog" : { "id" : "22" }, "author" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "body" : "<p>Hi, congrats!</p>", "createdDate" : "2014-11-05T14:41:39+09:00", "id" : 1, "modifiedDate" : "2014-11-05T14:41:39+09:00", "customFields" : [] }
postNewCommentForEntry ¶
/sites/{site_id}/pages/{page_id}/comments
Status Code
Permission
Request Body Parameters
Example URI
number
(required)The site ID.
number
(required)The page ID.
Assets resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
comment={"body" : "This is a test comment.\nHe he he"}
200
Headers
Content-Type: application/json
Body
{ "link" : "http://example.com/blog/2014/11/hello-movable-type.html#comment-1", "parent" : null, "entry" : { "id" : "45" }, "createdBy" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "status" : "Approved", "date" : "2014-11-05T14:41:39+09:00", "updatable" : false, "blog" : { "id" : "22" }, "author" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "body" : "<p>Hi, congrats!</p>", "createdDate" : "2014-11-05T14:41:39+09:00", "id" : 1, "modifiedDate" : "2014-11-05T14:41:39+09:00", "customFields" : [] }
createReplyComment ¶
/sites/{site_id}/comments/{comment_id}/replies
Status Code
Permission
Request Body Parameters
Example URI
number
(required)The site ID.
number
(required)The page ID.
Assets resource
Headers
Content-Type: application/x-www-form-urlencoded
Body
comment={"body" : "This is a test comment.\nHe he he"}
200
Headers
Content-Type: application/json
Body
{ "link" : "http://example.com/blog/2014/11/hello-movable-type.html#comment-1", "parent" : null, "entry" : { "id" : "45" }, "createdBy" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "status" : "Approved", "date" : "2014-11-05T14:41:39+09:00", "updatable" : false, "blog" : { "id" : "22" }, "author" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "body" : "<p>Hi, congrats!</p>", "createdDate" : "2014-11-05T14:41:39+09:00", "id" : 1, "modifiedDate" : "2014-11-05T14:41:39+09:00", "customFields" : [] }
getComment ¶
/sites/{site_id}/comments/{comment_id}{?fields}
Status Code
Example URI
number
(required)The site ID.
number
(required)The comment ID.
string
(optional)The field list to retrieve as part of the Comments resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
200
Headers
Content-Type: application/json
Body
{ "link" : "http://example.com/blog/2014/11/hello-movable-type.html#comment-1", "parent" : null, "entry" : { "id" : "45" }, "createdBy" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "status" : "Approved", "date" : "2014-11-05T14:41:39+09:00", "updatable" : false, "blog" : { "id" : "22" }, "author" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "body" : "<p>Hi, congrats!</p>", "createdDate" : "2014-11-05T14:41:39+09:00", "id" : 1, "modifiedDate" : "2014-11-05T14:41:39+09:00", "customFields" : [] }
updateComment ¶
/sites/{site_id}/comments/{comment_id}
Authorization is required.
This method accepts PUT and POST with __method=PUT.
Status Code
Example URI
number
(required)The site ID.
number
(required)The comment ID.
200
Headers
Content-Type: application/json
Body
{ "link" : "http://example.com/blog/2014/11/hello-movable-type.html#comment-1", "parent" : null, "entry" : { "id" : "45" }, "createdBy" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "status" : "Approved", "date" : "2014-11-05T14:41:39+09:00", "updatable" : false, "blog" : { "id" : "22" }, "author" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "body" : "<p>Hi, congrats!</p>", "createdDate" : "2014-11-05T14:41:39+09:00", "id" : 1, "modifiedDate" : "2014-11-05T14:41:39+09:00", "customFields" : [] }
updateComment ¶
/sites/{site_id}/comments/{comment_id}
Authorization is required.
This method accepts PUT and POST with __method=DELETE.
Status Code
Example URI
number
(required)The site ID.
number
(required)The comment ID.
200
Headers
Content-Type: application/json
Body
{ "link" : "http://example.com/blog/2014/11/hello-movable-type.html#comment-1", "parent" : null, "entry" : { "id" : "45" }, "createdBy" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "status" : "Approved", "date" : "2014-11-05T14:41:39+09:00", "updatable" : false, "blog" : { "id" : "22" }, "author" : { "id" : 2 "userpicUrl" : null, "displayName" : "Ichiro Aikawa" }, "body" : "<p>Hi, congrats!</p>", "createdDate" : "2014-11-05T14:41:39+09:00", "id" : 1, "modifiedDate" : "2014-11-05T14:41:39+09:00", "customFields" : [] }