Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.

Queue commands in API

Hayden Katz shared this idea 13 months ago
Needs Review

Many operations in cPanel / WHM can take quite a while to complete.

For example, In my testing, a terminatereseller command took over 1 minute, for an empty account with 25 empty subaccounts.

When attempting to manage these things via web based APIs, timeouts can be problematic.

The ability to queue tasks and await status changes would be far more ideal.

It appears that there's a cPanel built-in for this, that is used internally but not available via API or command line (queueprocd)

Ideally, I'd like to see this exposed as a parameter for commands in general (Command line example - `whmapi1 createacct user=bob domain=bob.bob enqueue=1`)

This would then return a queue ID, probably in the metadata key (IE: "queue_id": "2bc831ff9")

From there, new API calls to retrieve the queued item status, and clear items from the queue.

Status would include an integer or enum type stauts symbol, and - where relevant - the typical response from API command in question

Leave a Comment
 
Attach a file