WPX
Return active WordPress installs
Changed onThis function lists the WordPress installs that are still queued or running for the account. It joins each queued install task to the run's progress log, so status is the value get_task_progress reports.
Note:
- This function reads the task queue without taking element locks, so it never fails or blocks when another reader or the task runner briefly holds an element.
- A task that is queued but has not written a log line yet reports unknown with a percentage of 0.
- An element in the queue is not proof that an install is in flight. If the task runner dies mid-install (reboot, OOM kill) the element stays in the queue until the account queues another task. The function reports such a row as stale when its log says running but the runner's pid file names a process that is gone or is not a task runner.
- A finished install leaves the queue when the runner completes it. It can appear once with complete or failed in the short window before that removal.
- The rows need no ownership check: the queue and the logs live in the caller's own home directory, so the caller can only ever see its own installs.
get/WPX/list_active_installs
Request
- Base URLhttps://cpanel-server.tld:2083/execute
- AuthHTTP basic
Query parameters
domainstring
Return only the installs for this domain. Omit it to return every active install for the account. The domain must belong to the account; if it doesn't, the function returns an error instead of an empty list.
Response
The HTTP request was successful.
Example response
{
"apiversion": 3,
"func": "list_active_installs",
"module": "WPX",
"result": {
"data": [
{
"domain": "example.com",
"install_id": "1784237244-988110-12345",
"message": "Installing WordPress",
"percentage": 42,
"sse_url": "/sse/UserTasks/00000000_63d7f020927f8f/wpx_install_1784237244-988110-12345.log",
"status": "running",
"task_id": "00000000/63d7f020927f8f"
}
],
"metadata": {
"transformed": 1
},
"status": 1
}
}Changes
- info
endpoint added
- info