Skip to content

DataAPI SDK english MT.DataAPI Endpoint method publishEntries

Taku AMANO edited this page Jul 5, 2013 · 4 revisions

publishEntries

Rebuild the static archives.

GET https://your-host/your-mt-api.cgi/v1/publish/entries

Parameters

Name Type Required Description
callback Function no

Returns

XMLHttpRequest: A XMLHttpRequest object

Example

api.publishEntries({ids: "1,2,3"}, function(response) {
  if (response.error) {
    // Handle error
    return;
  }

  if (response.status === 'Rebuilding') {
    if (response.restIds) {
      // Rebuilding individual archives
    else {
      // Rebuilding index archives
    }
  }
  else if (response.status === 'Complete') {
    // Complete
  }
});
Clone this wiki locally