List Tasks

Back to Resources

Summary

Returns a collection of all tasks for the request identified by “:requestId” and the cluster identified by “:clusterName”.

GET /clusters/:clusterName/requests/:requestId/tasks

Response

Example

Get the collection of the tasks for the request 2 and the cluster named “c1”.

GET /clusters/c1/requests/2/tasks?fields=Tasks/status

200 OK
{
    "href" : "http://your.ambari.server/api/v1/clusters/c1/requests/2/tasks?fields=Tasks/status",
    "items" : [
      {
        "href" : "http://your.ambari.server/api/v1/clusters/c1/requests/2/tasks/12",
        "Tasks" : {
          "cluster_name" : "c1",
          "id" : 12,
          "request_id" : 2,
          "status" : "COMPLETED"
        }
      },
      {
        "href" : "http://your.ambari.server/api/v1/clusters/c1/requests/2/tasks/13",
        "Tasks" : {
          "cluster_name" : "c1",
          "id" : 13,
          "request_id" : 2,
          "status" : "IN_PROGRESS"
        }
      }
    ]	
  }