SSE site-manager job events
const url = 'https://example.com/wp-json/wp2/site-manager/v1/jobs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/events';const options = {method: 'GET', headers: {'X-WP-Nonce': '<X-WP-Nonce>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/wp-json/wp2/site-manager/v1/jobs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/events \ --header 'X-WP-Nonce: <X-WP-Nonce>'text/event-stream for up to 120 s: event: progress frames when the job JSON changes, then a terminal event: with the status (completed/failed/cancelled). Not a JSON REST response.
`resolve_job` error in the handler — `status_header(404)` and the stream closes (including another user's job). DualRest 401/403 fire in permission_callback before the stream.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Site Manager job UUID. Missing/foreign type — HTTP 404 with no JSON body.
Responses
Section titled “Responses”SSE frames. event: progress, then a terminal status. data: JSON PlatformJob.
SSE frames. event: progress, then a terminal status. data: JSON PlatformJob.
Not authenticated. DualRest: rest_forbidden (status 401) when there is no cookie session. Cookie + X-WP-Nonce or Application Password.
object
Machine-readable error or event code.
Message text (log, PIN, or password reset).
Extra WP_Error or license payload.
object
Examplegenerated
{ "code": "example", "message": "example", "data": {}}Missing manage_network/manage_options or invalid REST nonce (before the stream opens).
object
Machine-readable error or event code.
Message text (log, PIN, or password reset).
Extra WP_Error or license payload.
object
Examplegenerated
{ "code": "example", "message": "example", "data": {}}Job does not resolve. PHP sends status_header(404) and closes the stream, with no JSON WpError.