How to start a task and retrieve task info using the XL Deploy REST API


One of the key aspects of XL Deploy's execution model is that most actions—whether deployments, control tasks, or running discovery—are ultimately tasks that run in XL Deploy's task engine. For example, if you prepare a control task using the XL Deploy REST API, the output of the last API request is a task ID that you can use to execute the task.

Here, we'll give some examples of how to use XL Deploy's REST API to:

  • Start a task
  • Retrieve task info

Start a task

This is pretty straightforward. To start a task, you simply need to invoke POST /task/{taskid}/start.


curl -u<username>:<password> -X POST http://<xl-deploy-server>:<xl-deploy

Retrieve task info

Retrieving information about a task is also easy: just call GET /task/{taskid}.


curl -u<username>:<password> http://<xl-deploy-server>:<xl-deploy-


<task id="bd4aef1c-3a85-4d1a-a839-03ae619d01df" currentStep="12" totalSteps="12"
failures="0" state="EXECUTED" state2="EXECUTED" owner="admin">
<description>Initial deployment of Environments/Dev/TEST/PetPortal</description>

The return value of this call is a TaskState object.

For a list of the other operations that you can execute on tasks using XL Deploy's REST API, see the documentation for the TaskService and its extension, the TaskBlockService.

The TaskBlockService also supports blocks, which are groups of steps within a task that are aggregated, such as all the steps executing for a particular deployment group. The XL Deploy UI uses blocks to show the deployment plan in "collapsed" form, but you will generally only need to work with them if you are using complex orchestration patterns.

Additional information

For more information on using the REST API with XL Deploy, please browse to the REST API reference on the Developer Docs portal and select your version



Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.