WPX
Return WordPress task progress
Changed onThis function returns the progress of a WordPress installation or import for the supplied install_id parameter.
Note:
- Use this function to read progress with a cPanel API token. The equivalent Server-Sent Events stream (the sse_url field) is only available to an interactive cPanel session, not to an API token.
- create_website and import_website return the install_id in their normal-start responses. Those are the only two functions that return one. create_nova_for_wordpress_website queues no installation task and returns no install_id value; a Nova walkthrough gets one when its later import_website callback starts the import.
- This function is the authoritative source for progress and for success or failure, and it still works after the task finishes, because it reads the run's progress log. get_task_status reads the task queue instead, so it can only report whether the task is still queued, and it cannot tell success from failure.
get/WPX/get_task_progress
Request
- Base URLhttps://cpanel-server.tld:2083/execute
- AuthHTTP basic
Query parameters
install_idstring required
The unique correlator for the install or import run. The function that started the task returns it.
Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "get_task_progress",
"module": "WPX",
"result": {
"data": {
"message": "Creating database",
"percentage": 42,
"status": "running"
},
"metadata": {
"transformed": 1
},
"status": 1
}
}Changes
- info
endpoint added
- info