DataAPI SDK english MT.DataAPI Endpoint method getBlog - movabletype/mt-data-api-sdk-js GitHub Wiki
Retrieve a blog.
GET https://your-host/your-mt-api.cgi/v1/sites/:blog_id Detail
| Name | Type | Required | Description |
|---|---|---|---|
| blogId | Number | Object | Function | yes | Blog ID |
| params | Object | no | Options |
| callback | Function | no |
XMLHttpRequest: A XMLHttpRequest object
api.getBlog(blogId, function(response) {
if (response.error) {
// Handle error
return;
}
// Do stuff
});Or
api.getBlog(blogId, {fields: "name,description,url,archiveUrl"}, function(response) {
if (response.error) {
// Handle error
return;
}
// Do stuff
});