Quick reference

Yuji Takayama edited this page Oct 31, 2013 · 7 revisions

Endpoints

Assets

Method Endpoint Description
upload POST https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/assets/upload Upload a file.

Authentication

Method Endpoint Description
token POST https://your-host/your-mt-api.cgi/v1/token Create new access token related to current session.
revokeToken DELETE https://your-host/your-mt-api.cgi/v1/token Invalidate current access token. This is not logout.
revokeAuthentication DELETE https://your-host/your-mt-api.cgi/v1/authentication Invalidate current session. This is like logout.
authorization GET https://your-host/your-mt-api.cgi/v1/authorization Return authorization(login) form as HTML.
authentication POST https://your-host/your-mt-api.cgi/v1/authentication Create new session and access token. This is like login.

Blogs

Method Endpoint Description
listByUser GET https://your-host/your-mt-api.cgi/v1/users/{user_id}/sites Retrieve a list of blogs by user.
get GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id} Retrieve a single blog by its ID.

Categories

Method Endpoint Description
list GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/categories Retrieve a list of categories.

Comments

Method Endpoint Description
update PUT https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/comments/{comment_id} Update a comment.
reply POST https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/comments/{comment_id}/replies Reply to specified comment.
listByEntries GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/entries/{entry_id}/comments Retrieve a list of categories for an entry.
list GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/comments Retrieve a list of comments.
insert POST https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/entries/{entry_id}/comments Create a new comment on an entry.
get GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/comments/{comment_id} Retrieve a single comment by its ID.
delete DELETE https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/comments/{comment_id} Delete a comment.

Entries

Method Endpoint Description
update PUT https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/entries/{entry_id} Update an entry.
list GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/entries Retrieve a list of entries.
insert POST https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/entries Create a new entry.
get GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/entries/{entry_id} Retrieve a single entry by its ID.
delete DELETE https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/entries/{entry_id} Delete an entry.

Publish

Method Endpoint Description
entries GET https://your-host/your-mt-api.cgi/v1/publish/entries Rebuild the static archives in relation to specified entries.

Statistics

Method Endpoint Description
visitsForPath GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/stats/path/visits Retrieve visits count for each path from provider (e.g. Google Analytics).
visitsForDate GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/stats/date/visits Retrieve visits count for each date from provider (e.g. Google Analytics).
pageviewsForPath GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/stats/path/pageviews Retrieve pageviews count for each path from provider (e.g. Google Analytics).
pageviewsForDate GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/stats/date/pageviews Retrieve pageviews count for each date from provider (e.g. Google Analytics).
getProvider GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/stats/provider Retrieve a current effective provider.

Trackbacks

Method Endpoint Description
update PUT https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/trackbacks/{trackback_id} Update a trackbacks.
listByEntries GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/entries/{entry_id}/trackbacks Retrieve a list of trackbacks for an entry.
list GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/trackbacks Retrieve a list of trackbacks.
get GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/trackbacks/{trackback_id} Retrieve a single trackback by its ID.
delete DELETE https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/trackbacks/{trackback_id} Delete a trackbacks.

Users

Method Endpoint Description
update PUT https://your-host/your-mt-api.cgi/v1/users/{user_id} Update user data.
get GET https://your-host/your-mt-api.cgi/v1/users/{user_id} Retrieve a single user by its ID.

System

Method Endpoint Description
listEndpoints GET https://your-host/your-mt-api.cgi/v1/endpoints Retrieve a list of endpoints.

Permissions

Method Endpoint Description
list GET https://your-host/your-mt-api.cgi/v1/users/{user_id}/permissions Retrieve a list of permissions for a user.

Resources

Resource Description
Assets Resource object for Asset.
Blogs Resource object for Blog.
Categories Resource object for Category
Comments Resource object for Comment
Endpoints This is not made by MT Object. Resource object for endpoint information.
Entries Resource object for Entry
Permissions This is not made by MT Object. Resource object for permission information.
Statistics items for date This is not made by MT Object. Resource object for Statistics data.
Statistics items for path This is not made by MT Object. Resource object for Statistics data.
Trackbacks Resource object for Trackback.
Users Resource object for Author.
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.