Skip to content

Data api entries list

masiuchi edited this page Sep 11, 2014 · 1 revision

Entries: list

Retrieve a list of entries.

Authorization is required if want to include unpublished entries.

Request

HTTP Request

This method accepts GET only.

GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/entries

Parameters

Method Parameters

Parameter Type Description
blog_id unsigned integer The blog ID.

Query Parameters

Parameter Type Description
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 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.
limit unsigned integer This is an optional parameter. Maximum number of entries to retrieve. Default is 10.
offset unsigned 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 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 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 unsigned 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 unsigned 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.
Text Search
Example of queries

Request Body

Do not supply a request body.

Response

Parameter Type Description
totalResults unsigned integer The total number of entries found that by the request.
items ARRAY An array of Entries resource.

Status Code

Code Description
200 no error
403 Do not have permission to retrieve the list of entries.
404 Site not found
Clone this wiki locally