Add filters by Tag, Category and Date to Data API Endpoint of Entries and Content Data.
- Movable Type 7
- Unpack the DataAPIExtendSearch's archive.
- Copy the contents of plugins/DataAPIExtendSearch into /path/to/mt/plugins/
Parameter | Type | Description |
---|---|---|
keywords | string |
e.g.) http://your-host/your-mt-api.cgi/v4/sites/{blog_id}/entries?keywords=hello
Parameter | Type | Description |
---|---|---|
tag | string |
e.g.) http://your-host/your-mt-api.cgi/v4/sites/{blog_id}/entries?tag=news
Parameter | Type | Description |
---|---|---|
category | string |
e.g.) http://your-host/your-mt-api.cgi/v4/sites/{blog_id}/entries?category=technology
Parameter | Type | Description |
---|---|---|
date_type | string | authored_on, created_on, modified_on or unpublished_on |
Parameter | Type | Description |
---|---|---|
date_type | string | authored_on, created_on, modified_on or unpublished_on |
from | string | YYYY-MM-DD |
to | string | YYYY-MM-DD |
Parameter | Type | Description |
---|---|---|
date_type | string | authored_on, created_on, modified_on or unpublished_on |
days | number | N |
e.g.) http://your-host/your-mt-api.cgi/v4/sites/{blog_id}/entries?date_type=authored_on&days=3
Parameter | Type | Description |
---|---|---|
date_type | string | authored_on, created_on, modified_on or unpublished_on |
before | string | YYYY-MM-DD |
e.g.) http://your-host/your-mt-api.cgi/v4/sites/{blog_id}/entries?date_type=authored_on&before=2013-12-31
Parameter | Type | Description |
---|---|---|
date_type | string | authored_on, created_on, modified_on or unpublished_on |
after | string | YYYY-MM-DD |
e.g.) http://your-host/your-mt-api.cgi/v4/sites/{blog_id}/entries?date_type=authored_on&after=2013-01-01
Parameter | Type | Description |
---|---|---|
date_type | string | authored_on |
future | number | '1' only |
e.g.) http://your-host/your-mt-api.cgi/v4/sites/{blog_id}/entries?date_type=authored_on&future=1
Parameter | Type | Description |
---|---|---|
date_type | string | authored_on |
past | number | '1' only |
e.g.)
http://your-host/your-mt-api.cgi/v4/sites/{blog_id}/entries?date_type=authored_on&past=1
http://your-host/your-mt-api.cgi/v4/sites/{blog_id}/entries?date_type=authored_on&past=1
Parameter | Type | Description |
---|---|---|
author_name | string |
e.g.) http://your-host/your-mt-api.cgi/v4/sites/{blog_id}/entries?author_name=bitpart
Note: Label means "Data Label".
Parameter | Type | Description |
---|---|---|
label | string |
e.g.) http://your-host/your-mt-api.cgi/v4/sites/{blog_id}/content?label=bitpart
Note: Identifier is called "Basename" in Entry.
Parameter | Type | Description |
---|---|---|
label | string |
e.g.) http://your-host/your-mt-api.cgi/v4/sites/{blog_id}/content?identifier=bitpart
- sortFieldName: The name of a content field to use to sort
- sortFieldNameOrder:
ascend
ordescend
(default) - fields: The field list to retrieve as part of the content data resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.
- includeIds: The comma separated ID list of content data to include to result.
- excludeIds: The comma separated ID list of content data to exclude from result.
- content_field_[content_field_id]: Filtering the result with a specific content field by the given text (Only support for the text type content field)
- content_field_[content_field_id]=not_empty: Filtering data that a specific content field is not empty