Movable Type Data API (r.5404)

Download OpenAPI specification:Download

Assets

Upload a file

Upload a file.

Authorization is required.

Authorizations:
mtauth
path Parameters
site_id
required
integer
Request Body schema: multipart/form-data
autoRenameIfExists
integer
Enum: 0 1

If this value is "1" and the file with the same filename exists, the uploaded file is automatically renamed to the random generated name. Default is "0".

file
string <binary>

The actual file data

normalizeOrientation
integer
Enum: 0 1

If this value is "1" and the uploaded file has a orientation information in Exif, this file's orientation is automatically normalized. Default is "1".

path
string

The upload destination. You can specify the path to the under the site path.

Responses

Response samples

Content type
application/json
{
  • "description": "string",
  • "filename": "string",
  • "id": "string",
  • "label": "string",
  • "mimeType": "string",
  • "tags": [
    ],
  • "url": "string"
}

Authentication

Invalidate current access token. This is not logout

Invalidate current session. This is like logout. All access tokens related to that session are invalidated too.

Authorization is required. but if there is an effective session, user can revoke by the following methods.

In the case of a web browser, can be authorized by httponly-cookie.

In the case of other than a browser, can be authorized by sending a sessionId that is retrieved via authentication endpoints in MTAuth request header.

MTAuth sessionId={retrieved sessionId}

Notes

  • This method accepts DELETE and POST with __method=DELETE.
header Parameters
X-MT-Authorization
string

Input MTAuth sessionId={sessionId}

Request Body schema: application/x-www-form-urlencoded
clientId
string

This is not required if you specify session id via "X-MT-Authorization" request header. You can create new access token if you have a session id related to this clientId, although you do not have an access token.

Responses

Response samples

Content type
application/json
{
  • "status": "string"
}

Create new session and access token. This is like login

Create new session and access token. This is like login.

Request Body schema: application/x-www-form-urlencoded
clientId
string

This is not required if you specify session id via "X-MT-Authorization" request header. You can create new access token if you have a session id related to this clientId, although you do not have an access token.

mtDataApiLoginMagicToken
string

This is not required if you authenticate except via browser. If this parameter is passed and valid the MT will set cookie in order to start a session.

password
string <password>

The password of the user.

remember
integer
Enum: 0 1

If true (generally, "1" is specified.), a new session will be created as a persistent session. If you want to specify false, you can pass "" or "0" to this parameter.

username
string

The username to authenticate.

Responses

Response samples

Content type
application/json
{
  • "accessToken": "string",
  • "expiresIn": 0,
  • "remember": true,
  • "sessionId": "string"
}

Return authorization(login) form as HTML

Return authorization(login) form as HTML.

query Parameters
redirectUrl
required
string

This is required. When you succeed in login, you are redirected to the redirectUrl with "#_login".

clientId
required
string

This is required. the client ID of the application.

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Invalidate current session. This is like logout

Invalidate current access token. This is not logout. If the browser has active session id, new access token can be obtained easily.

Authorization is required.

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth

Responses

Response samples

Content type
application/json
{
  • "status": "string"
}

Create new access token related to current session

Create new access token related to current session.

In order to create new access token, in the case of a web browser, it is necessary to create session via authentication endpoints beforehand.

In the case of other than a browser, it is necessary to send a sessionId that is retrieved via authentication endpoints in MTAuth request header.

MTAuth sessionId={retrieved sessionId}

header Parameters
X-MT-Authorization
string

Input MTAuth sessionId={sessionId}

Request Body schema: application/x-www-form-urlencoded
clientId
string

This is not required if you specify session id via "X-MT-Authorization" request header. You can create new access token if you have a session id related to this clientId, although you do not have an access token.

Responses

Response samples

Content type
application/json
{
  • "accessToken": "string",
  • "expiresIn": 0
}

Categories

Retrieve a list of categories

Retrieve a list of categories.

path Parameters
site_id
required
integer
query Parameters
sortBy
string
Enum: "user_custom" "label"

This is an optional parameter.

user_custom

(default) Sort order you specified on the Manage Categories screen.

label

Sort by the label of each categories.

sortOrder
string
Enum: "ascend" "descend"

This is an optional parameter.

ascend

(default) Return categories in ascending order.

descend

Return categories in descending order.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Comments

Retrieve a list of comments

Retrieve a list of comments.

Authorization is required to include unpublished comments

path Parameters
site_id
required
integer
query Parameters
limit
integer

This is an optional parameter. Maximum number of comments to retrieve. Default is 10.

offset
integer

This is an optional parameter. 0-indexed offset. Default is 0.

includeIds
string

This is an optional parameter. The comma separated ID list of comments to include to result.

excludeIds
string

This is an optional parameter. The comma separated ID list of comments to exclude from result.

status
string
Enum: "Approved" "Pending" "Spam"

This is an optional parameter. Filter by status.

Approved

comment_visible is 1 and comment_junk_status is 1.

Pending

comment_visible is 0 and comment_junk_status is 1.

Spam

comment_junk_status is -1.

entryStatus
string
Enum: "Draft" "Publish" "Review" "Future" "Spam"

This is an optional parameter. Filter by parent 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.

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Delete a comment

Delete a comment.

Authorization is required.

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth
path Parameters
site_id
required
integer
comment_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "blog": {
    },
  • "body": "string",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": {
    },
  • "id": 0,
  • "link": "string",
  • "parent": 0,
  • "status": "string",
  • "updatable": true
}

Retrieve a single comment by its ID

Retrieve a single comment by its ID.

Authorization is required if the comment status is "unpublished". If the comment status is "published", then this method can be called without authorization.

path Parameters
site_id
required
integer
comment_id
required
integer
header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "blog": {
    },
  • "body": "string",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": {
    },
  • "id": 0,
  • "link": "string",
  • "parent": 0,
  • "status": "string",
  • "updatable": true
}

Update a comment

Update a comment.

Authorization is required.

Notes

  • This method accepts PUT and POST with __method=PUT.
Authorizations:
mtauth
path Parameters
site_id
required
integer
comment_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (comment_updatable)

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "blog": {
    },
  • "body": "string",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": {
    },
  • "id": 0,
  • "link": "string",
  • "parent": 0,
  • "status": "string",
  • "updatable": true
}

Retrieve a list of comments for an entry

Retrieve a list of comments for an entry.

Authorization is required to include unpublished comments

path Parameters
site_id
required
integer
entry_id
required
integer
query Parameters
limit
integer

This is an optional parameter. Maximum number of comments to retrieve. Default is 10.

offset
integer

This is an optional parameter. 0-indexed offset. Default is 0.

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Create a new comment on an entry

Create a new comment on an entry.

Authorization is required.

Authorizations:
mtauth
path Parameters
site_id
required
integer
entry_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (comment_updatable)

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "blog": {
    },
  • "body": "string",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": {
    },
  • "id": 0,
  • "link": "string",
  • "parent": 0,
  • "status": "string",
  • "updatable": true
}

Reply to specified comment

Reply to specified comment.

Authorization is required.

Authorizations:
mtauth
path Parameters
site_id
required
integer
entry_id
required
integer
comment_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (comment_updatable)

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "blog": {
    },
  • "body": "string",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": {
    },
  • "id": 0,
  • "link": "string",
  • "parent": 0,
  • "status": "string",
  • "updatable": true
}

Common API

Retrieve OpenAPI schema

Responses

Response samples

Content type
application/json
{ }

Get server API version

Retrieves Data API version of the server.

This endpoint has been available since Movable Type 6.2.4.

This endpoint does not need /v3 or something API endpoint version identifier. You can call like: https://host/path/your-mt-data-api.cgi/version

Responses

Response samples

Content type
application/json
{
  • "apiVersion": 0,
  • "endpointVersion": "string"
}

Endpoints

Retrieve a list of endpoints

Retrieve a list of endpoints.

query Parameters
includeComponents
string

This is an optional parameter. The comma separated ID list of components (a.k.a plugin) to include to result.

excludeComponents
string

This is an optional parameter. The comma separated ID list of components (a.k.a plugin) to exclude from result.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Entries

Rebuild the static archives in relation to specified entries

Rebuild the static archives in relation to specified entries.

Authorization is required.

Authorizations:
mtauth
query Parameters
ids
string

This is an required parameter. The comma separated ID list of entries to rebuild.

blogId
integer

This is an optional parameter.

startTime
string

This is an optional parameter.

Responses

Response samples

Content type
application/json
{
  • "restIds": "string",
  • "startTime": "2019-08-24T14:15:22Z",
  • "status": "Rebuilding"
}

Retrieve a list of entries

Retrieve a list of entries.

Authorization is required to include unpublished entries.

path Parameters
site_id
required
integer
query Parameters
search
string

This is an optional parameter. Search query.

searchFields
string

This is an optional parameter. The comma separated field name list to search. Default is 'title,body,more,keywords,excerpt,basename'

status
string
Enum: "Draft" "Publish" "Review" "Future" "Spam" "Unpublish"

This is an optional parameter. Filter by 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.

Unpublish

entry_status is 6.

limit
integer

This is an optional parameter. Maximum number of entries to retrieve. Default is 10.

offset
integer

This is an optional parameter. 0-indexed offset. Default is 0.

includeIds
string

This is an optional parameter. The comma separated ID list of entries to include to result.

excludeIds
string

This is an optional parameter. The comma separated ID list of entries to exclude from result.

sortBy
string
Enum: "authored_on" "title" "created_on" "modified_on"

This is an optional parameter.

authored_on

(default) Sort by the Published time of each entries.

title

Sort by the title of each entries.

created_on

Sort by the created time of each entries.

modified_on

Sort by the modified time of each entries.

sortOrder
string
Enum: "descend" "ascend"

This is an optional parameter.

descend

(default) Return entries in descending order. For the date, it means from newest to oldest.

ascend

Return entries in ascending order. For the date, it means from oldest to newset.

maxComments
integer

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
integer

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.

fields
string

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.

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Create a new entry

Create a new entry.

Authorization is required.

Authorizations:
mtauth
path Parameters
site_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (entry_updatable)

Responses

Response samples

Content type
application/json
{
  • "allowComments": true,
  • "allowTrackbacks": true,
  • "assets": [
    ],
  • "author": {
    },
  • "basename": "string",
  • "blog": {
    },
  • "body": "string",
  • "categories": [
    ],
  • "class": "string",
  • "commentCount": 0,
  • "comments": [
    ],
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "excerpt": "string",
  • "id": 0,
  • "keywords": "string",
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "more": "string",
  • "permalink": "string",
  • "pingsSentUrl": [
    ],
  • "status": "string",
  • "tags": [
    ],
  • "title": "string",
  • "trackbackCount": 0,
  • "trackbacks": [
    ],
  • "updatable": true
}

Delete an entry

Delete an entry.

Authorization is required.

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth
path Parameters
site_id
required
integer
entry_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "allowComments": true,
  • "allowTrackbacks": true,
  • "assets": [
    ],
  • "author": {
    },
  • "basename": "string",
  • "blog": {
    },
  • "body": "string",
  • "categories": [
    ],
  • "class": "string",
  • "commentCount": 0,
  • "comments": [
    ],
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "excerpt": "string",
  • "id": 0,
  • "keywords": "string",
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "more": "string",
  • "permalink": "string",
  • "pingsSentUrl": [
    ],
  • "status": "string",
  • "tags": [
    ],
  • "title": "string",
  • "trackbackCount": 0,
  • "trackbacks": [
    ],
  • "updatable": true
}

Retrieve a single entry by its ID

Retrieve a single entry by its ID.

Authorization is required if the entry status is "unpublished". If the entry status is "published", then this method can be called without authorization.

path Parameters
site_id
required
integer
entry_id
required
integer
query Parameters
maxComments
integer

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
integer

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.

fields
string

This is an optional parameter. The field list to retrieve as part of the Entries resource. That list should be separated by commma. If this parameter is not specified, All fields will be returned.

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "allowComments": true,
  • "allowTrackbacks": true,
  • "assets": [
    ],
  • "author": {
    },
  • "basename": "string",
  • "blog": {
    },
  • "body": "string",
  • "categories": [
    ],
  • "class": "string",
  • "commentCount": 0,
  • "comments": [
    ],
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "excerpt": "string",
  • "id": 0,
  • "keywords": "string",
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "more": "string",
  • "permalink": "string",
  • "pingsSentUrl": [
    ],
  • "status": "string",
  • "tags": [
    ],
  • "title": "string",
  • "trackbackCount": 0,
  • "trackbacks": [
    ],
  • "updatable": true
}

Update an entry

Update an entry.

Authorization is required.

Notes

  • This method accepts PUT and POST with __method=PUT.
Authorizations:
mtauth
path Parameters
site_id
required
integer
entry_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (entry_updatable)

Responses

Response samples

Content type
application/json
{
  • "allowComments": true,
  • "allowTrackbacks": true,
  • "assets": [
    ],
  • "author": {
    },
  • "basename": "string",
  • "blog": {
    },
  • "body": "string",
  • "categories": [
    ],
  • "class": "string",
  • "commentCount": 0,
  • "comments": [
    ],
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "excerpt": "string",
  • "id": 0,
  • "keywords": "string",
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "more": "string",
  • "permalink": "string",
  • "pingsSentUrl": [
    ],
  • "status": "string",
  • "tags": [
    ],
  • "title": "string",
  • "trackbackCount": 0,
  • "trackbacks": [
    ],
  • "updatable": true
}

Retrieve a list of comments for an entry

Retrieve a list of comments for an entry.

Authorization is required to include unpublished comments

path Parameters
site_id
required
integer
entry_id
required
integer
query Parameters
limit
integer

This is an optional parameter. Maximum number of comments to retrieve. Default is 10.

offset
integer

This is an optional parameter. 0-indexed offset. Default is 0.

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Create a new comment on an entry

Create a new comment on an entry.

Authorization is required.

Authorizations:
mtauth
path Parameters
site_id
required
integer
entry_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (comment_updatable)

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "blog": {
    },
  • "body": "string",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": {
    },
  • "id": 0,
  • "link": "string",
  • "parent": 0,
  • "status": "string",
  • "updatable": true
}

Reply to specified comment

Reply to specified comment.

Authorization is required.

Authorizations:
mtauth
path Parameters
site_id
required
integer
entry_id
required
integer
comment_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (comment_updatable)

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "blog": {
    },
  • "body": "string",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": {
    },
  • "id": 0,
  • "link": "string",
  • "parent": 0,
  • "status": "string",
  • "updatable": true
}

Retrieve a list of trackbacks for an entry

Retrieve a list of trackbacks for an entry.

Authorization is required to include unpublished trackbacks

path Parameters
site_id
required
integer
entry_id
required
integer
query Parameters
limit
integer

This is an optional parameter. Maximum number of trackbacks to retrieve. Default is 10.

offset
integer

This is an optional parameter. 0-indexed offset. Default is 0.

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Permissions

Retrieve a list of permissions for a user

Retrieve a list of permissions for a user.

Authorization is required and can specify only 'me' (or user's own user ID) except for a super user.

Authorizations:
mtauth
path Parameters
user_id
required
string
query Parameters
blogIds
string

This is an optional parameter. The comma separated ID list of blogs to retrieve.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Publish

Rebuild the static archives in relation to specified entries

Rebuild the static archives in relation to specified entries.

Authorization is required.

Authorizations:
mtauth
query Parameters
ids
string

This is an required parameter. The comma separated ID list of entries to rebuild.

blogId
integer

This is an optional parameter.

startTime
string

This is an optional parameter.

Responses

Response samples

Content type
application/json
{
  • "restIds": "string",
  • "startTime": "2019-08-24T14:15:22Z",
  • "status": "Rebuilding"
}

Sites

Retrieve a single blog by its ID

path Parameters
site_id
required
integer
query Parameters
fields
string

This is an optional parameter. The field list to retrieve as part of the Entries resource. If this parameter is not specified, All fields will be returned.

Responses

Response samples

Content type
application/json
{
  • "archiveUrl": "string",
  • "class": "string",
  • "description": "string",
  • "id": "string",
  • "name": "string",
  • "url": "string"
}

Retrieve a list of blogs by user

Retrieve a list of blogs by user.

path Parameters
user_id
required
string
query Parameters
limit
integer

This is an optional parameter. Maximum number of blogs to retrieve. Default is 25.

offset
integer

This is an optional parameter. 0-indexed offset. Default is 0.

sortBy
string
Enum: "name" "created_on"

This is an optional parameter.

name

(default) Sort by the name of each blogs.

created_on

Sort by the created time of each blogs.

sortOrder
string
Enum: "ascend" "descend"

This is an optional parameter.

ascend

(default) Return blogs in ascending order. For the date, it means from oldest to newset.

descend

Return blogs in descending order. For the date, it means from newest to oldest.

includeIds
string

This is an optional parameter. The comma separated ID list of blogs to include to result.

excludeIds
string

This is an optional parameter. The comma separated ID list of blogs to exclude from result.

fields
string

This is an optional parameter. the field list to retrieve as part of the Blogs resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Statistics

Retrieve pageviews count for each date from provider (e.g. Google Analytics)

Retrieve pageviews count for each date from provider (e.g. Google Analytics).

Authorization is required.

Authorizations:
mtauth
path Parameters
site_id
required
integer
query Parameters
startDate
required
string <date>

This is an required parameter. Start date of data. The format is "YYYY-MM-DD".

endDate
required
string <date>

This is an required parameter. End date of data. The format is "YYYY-MM-DD".

limit
integer

This is an optional parameter. Maximum number of paths to retrieve. Default is 10.

offset
string

This is an optional parameter. 0-indexed offset. Default is 0.

path
string

This is an optional parameter. The target path of data to retrieve. Default is the path of the current site.

uniquePath
integer
Enum: 0 1

This is an optional parameter. If true is given, the MT can return total pageviews for each uniqueness paths. However, that data does not contain page title because its spec. (Sometimes, Google Analytics will return another pageviews by same path.)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0,
  • "totals": {
    }
}

Retrieve visits count for each date from provider (e.g. Google Analytics)

Retrieve visits count for each date from provider (e.g. Google Analytics).

Authorization is required.

Authorizations:
mtauth
path Parameters
site_id
required
integer
query Parameters
startDate
required
string <date>

This is an required parameter. Start date of data. The format is "YYYY-MM-DD".

endDate
required
string <date>

This is an required parameter. End date of data. The format is "YYYY-MM-DD".

limit
integer

This is an optional parameter. Maximum number of paths to retrieve. Default is 10.

offset
string

This is an optional parameter. 0-indexed offset. Default is 0.

path
string

This is an optional parameter. The target path of data to retrieve. Default is the path of the current site.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0,
  • "totals": {
    }
}

Retrieve pageviews count for each path from provider (e.g. Google Analytics)

Retrieve pageviews count for each path from provider (e.g. Google Analytics).

Authorization is required.

Authorizations:
mtauth
path Parameters
site_id
required
integer
query Parameters
startDate
required
string <date>

This is an required parameter. Start date of data. The format is "YYYY-MM-DD".

endDate
required
string <date>

This is an required parameter. End date of data. The format is "YYYY-MM-DD".

limit
integer

This is an optional parameter. Maximum number of paths to retrieve. Default is 10.

offset
string

This is an optional parameter. 0-indexed offset. Default is 0.

path
string

This is an optional parameter. The target path of data to retrieve. Default is the path of the current site.

uniquePath
integer
Enum: 0 1

This is an optional parameter. If true is given, the MT can return total pageviews for each uniqueness paths. However, that data does not contain page title because its spec. (Sometimes, Google Analytics will return another pageviews by same path.)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0,
  • "totals": {
    }
}

Retrieve visits count for each path from provider (e.g. Google Analytics)

Retrieve visits count for each date from provider (e.g. Google Analytics).

Authorization is required.

Authorizations:
mtauth
path Parameters
site_id
required
integer
query Parameters
startDate
required
string <date>

This is an required parameter. Start date of data. The format is "YYYY-MM-DD".

endDate
required
string <date>

This is an required parameter. End date of data. The format is "YYYY-MM-DD".

limit
integer

This is an optional parameter. Maximum number of paths to retrieve. Default is 10.

offset
string

This is an optional parameter. 0-indexed offset. Default is 0.

path
string

This is an optional parameter. The target path of data to retrieve. Default is the path of the current site.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0,
  • "totals": {
    }
}

Retrieve a current effective provider

Retrieve a current effective provider.

Authorization is required.

Authorizations:
mtauth
path Parameters
site_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "id": "string"
}

Trackbacks

Retrieve a list of trackbacks for an entry

Retrieve a list of trackbacks for an entry.

Authorization is required to include unpublished trackbacks

path Parameters
site_id
required
integer
entry_id
required
integer
query Parameters
limit
integer

This is an optional parameter. Maximum number of trackbacks to retrieve. Default is 10.

offset
integer

This is an optional parameter. 0-indexed offset. Default is 0.

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Retrieve a list of trackbacks

Retrieve a list of trackbacks.

Authorization is required to include unpublished trackbacks

path Parameters
site_id
required
integer
query Parameters
limit
integer

This is an optional parameter. Maximum number of trackbacks to retrieve. Default is 10.

offset
integer

This is an optional parameter. 0-indexed offset. Default is 0.

includeIds
string

This is an optional parameter. The comma separated ID list of trackbacks to include to result.

excludeIds
string

This is an optional parameter. The comma separated ID list of trackbacks to exclude from result.

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Delete a trackbacks

Delete a trackbacks.

Authorization is required.

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth
path Parameters
site_id
required
integer
ping_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "blogName": "string",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": "string",
  • "excerpt": "string",
  • "id": 0,
  • "ip": "string",
  • "status": "string",
  • "title": "string",
  • "updatable": true,
  • "url": "string"
}

Retrieve a single trackback by its ID

Retrieve a single trackback by its ID.

Authorization is required if the trackback status is "unpublished". If the trackback status is "published", then this method can be called without authorization.

path Parameters
site_id
required
integer
ping_id
required
integer
header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "blogName": "string",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": "string",
  • "excerpt": "string",
  • "id": 0,
  • "ip": "string",
  • "status": "string",
  • "title": "string",
  • "updatable": true,
  • "url": "string"
}

Update a trackbacks

Update a trackbacks.

Authorization is required.

Notes

  • This method accepts PUT and POST with __method=PUT.
Authorizations:
mtauth
path Parameters
site_id
required
integer
ping_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (trackback_updatable)

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "blogName": "string",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": "string",
  • "excerpt": "string",
  • "id": 0,
  • "ip": "string",
  • "status": "string",
  • "title": "string",
  • "updatable": true,
  • "url": "string"
}

Users

Synchronize users

Authorizations:
mtauth

Responses

Response samples

Content type
application/json
{
  • "status": "string"
}

Retrieve a single user by its ID

Retrieve a single user by its ID.

Authorization is required if you want to retrieve private properties.

path Parameters
user_id
required
string
query Parameters
fields
string

This is an optional parameter. The field list to retrieve as part of the Users resource. This list should be separated by comma. If this parameter is not specified, All fields will be returned.

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "displayName": "string",
  • "email": "string",
  • "id": "string",
  • "language": "string",
  • "name": "string",
  • "updatable": true,
  • "url": "string",
  • "userpicUrl": "string"
}

Update user data

Update user data.

Authorization is required.

Notes

  • This method accepts PUT and POST with __method=PUT.
Authorizations:
mtauth
path Parameters
user_id
required
string
Request Body schema: application/x-www-form-urlencoded
object (user_updatable)

Responses

Response samples

Content type
application/json
{
  • "displayName": "string",
  • "email": "string",
  • "id": "string",
  • "language": "string",
  • "name": "string",
  • "updatable": true,
  • "url": "string",
  • "userpicUrl": "string"
}

Retrieve a list of permissions for a user

Retrieve a list of permissions for a user.

Authorization is required and can specify only 'me' (or user's own user ID) except for a super user.

Authorizations:
mtauth
path Parameters
user_id
required
string
query Parameters
blogIds
string

This is an optional parameter. The comma separated ID list of blogs to retrieve.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Retrieve a list of blogs by user

Retrieve a list of blogs by user.

path Parameters
user_id
required
string
query Parameters
limit
integer

This is an optional parameter. Maximum number of blogs to retrieve. Default is 25.

offset
integer

This is an optional parameter. 0-indexed offset. Default is 0.

sortBy
string
Enum: "name" "created_on"

This is an optional parameter.

name

(default) Sort by the name of each blogs.

created_on

Sort by the created time of each blogs.

sortOrder
string
Enum: "ascend" "descend"

This is an optional parameter.

ascend

(default) Return blogs in ascending order. For the date, it means from oldest to newset.

descend

Return blogs in descending order. For the date, it means from newest to oldest.

includeIds
string

This is an optional parameter. The comma separated ID list of blogs to include to result.

excludeIds
string

This is an optional parameter. The comma separated ID list of blogs to exclude from result.

fields
string

This is an optional parameter. the field list to retrieve as part of the Blogs resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}