WPX
Return background task status
Changed onThis function reports whether a queued background task is still in the caller's task queue. It answers only that one question.
Note:
- This function and get_task_progress are a pair, and they are not interchangeable. get_task_status takes a task_id, reads the task queue, and reports only whether the task is still queued. It cannot tell you whether the work succeeded. get_task_progress takes an install_id parameter, reads the run's progress log, and is the authoritative source for progress and for success or failure. Prefer get_task_progress unless you specifically need to know whether the task is still queued.
- A task_id parameter that is absent from the queue returns done. A finished task, a removed task, a task that never existed, and a task that belongs to another account are indistinguishable, and all four return done. There is no not-found failure.
- Ownership needs no check: the queue lives in the caller's own home directory, so the caller can only ever see its own tasks.
get/WPX/get_task_status
Request
- Base URLhttps://cpanel-server.tld:2083/execute
- AuthHTTP basic
Query parameters
task_idstring required
The task id, as returned in the task_id field of create_website or import_website.
Response
The HTTP request was successful.
Example response
{
"apiversion": 3,
"func": "get_task_status",
"module": "WPX",
"result": {
"data": {
"message": "running",
"status": "running"
},
"metadata": {
"transformed": 1
},
"status": 1
}
}Changes
- info
endpoint added
- info