Sync sites with REST API V2

Hi,

I’ve testing to sync child sites via MainWP REST API with this endpoint “/wp-json/mainwp/v2/sites/sync/” but it return with this result instead of the JSON response as in the document. And the sites doesn’t sync after request this API endpoint too.

Here’s result I’ve got:

Here’s JSON response from the API document:

Could you please help to suggest and fix this issue? I’d like to use REST API to sync child sites which around 1000 sites to manage, it would be easier if I can use API to sync sites instead click sync in the MainWP dashboard which very consuming time and slow.

Hey @sandysaille

I cannot reproduce this behavior with the /wp-json/mainwp/v2/sites/sync/ call.

Are other API calls working fine for you?

And can you please post the community system report from your MainWP Dashboard for review? The report is located in your Dashboard under Info → Server (your-mainwp-dashboard.com/wp-admin/admin.php?page=ServerInformation), on the top right of the page.

Be sure to use the button like the one below; this button hides all your private information:

image

Pressing the button auto-copies the report to your clipboard then just paste it in a reply here

Thanks Bojan.

I’ve already figured out why the response return like HTML, because this site still disabled “REST API” so after I’ve tried to save the Permalink of this site again, it works now with the sync API.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.