DataAPI SDK english MT.DataAPI Endpoint method getEntry - movabletype/mt-data-api-sdk-js GitHub Wiki
Retrieve an entry.
GET https://your-host/your-mt-api.cgi/v1/sites/:site_id/entries/:entry_id Detail
| Name | Type | Required | Description |
|---|---|---|---|
| siteId | Number | Object | Function | yes | Site ID |
| entryId | Number | Object | Function | yes | Entry ID |
| params | Object | no | Options |
| callback | Function | no |
XMLHttpRequest: A XMLHttpRequest object
api.getEntry(siteId, entryId, function(response) {
if (response.error) {
// Handle error
return;
}
// Do stuff
});Or
api.getEntry(siteId, entryId, {fields: "title,permalink,date"}, function(response) {
if (response.error) {
// Handle error
return;
}
// Do stuff
});