DataAPI SDK english MT.DataAPI Endpoint method listBlogsForUser - movabletype/mt-data-api-sdk-js GitHub Wiki
Retrieve a list of blogs for an user.
GET https://your-host/your-mt-api.cgi/v1/users/:user_id/sites Detail
| Name | Type | Required | Description |
|---|---|---|---|
| userId | Number | Object | Function | yes | User ID |
| params | Object | no | Options |
| callback | Function | no |
XMLHttpRequest: A XMLHttpRequest object
api.listBlogsForUser(userId, function(response) {
if (response.error) {
// Handle error
return;
}
// Do stuff
});Or
var params = {
includeIds: "1,2,3,4",
fields: "name,description,url,archiveUrl"
};
api.listBlogsForUser(userId, params, function(response) {
if (response.error) {
// Handle error
return;
}
// Do stuff
});