WPX

Return background task status

Changed on

This 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 URL
    https://cpanel-server.tld:2083/execute
  • Auth
    HTTP 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.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "get_task_status",
  "module": "WPX",
  "result": {
    "data": {
      "message": "running",
      "status": "running"
    },
    "metadata": {
      "transformed": 1
    },
    "status": 1
  }
}

Changes