All Products
Search
Document Center

Batch Compute:ListTasks

Last Updated:Apr 12, 2018

Description

Gets description about a task.

Request syntax

  1. GET /jobs/{Id}/tasks?Marker={Marker}&MaxItemCount={MaxItemCount}

Attribute description

Attribute Type Required Description
Id string Yes ID of a job.
Marker String No Start resource ID of the current page.
MaxItemCount int No Maximum number of actually returned resources.

Response

Success

The 200 status code and the following task list information are returned:

  1. {
  2. "NextMarker": "",
  3. "Items":[{
  4. "TaskName": "taskA"
  5. "State": "Running",
  6. "StartTime": "2016-11-01T15:25:03.020203Z",
  7. "EndTime": "",
  8. "InstanceMetrics": {
  9. "WaitingCount": 0,
  10. "RunningCount": 1,
  11. "FinishedCount": 0,
  12. "FailedCount": 0,
  13. "StoppedCount": 0
  14. }
  15. },{
  16. "TaskName": "taskB"
  17. "State": "Running",
  18. "StartTime": "2016-11-01T15:25:04.020203Z",
  19. "EndTime": "",
  20. "InstanceMetrics": {
  21. "WaitingCount": 0,
  22. "RunningCount": 1,
  23. "FinishedCount": 0,
  24. "FailedCount": 0,
  25. "StoppedCount": 0
  26. }
  27. }]
  28. }

Attribute description

Attribute Type Description
NextMarker string Start resource ID on the next page. This value is blank in the last page.
Items array List of resources.

Error codes

Error code Error message Status code Syntax
InvalidResource.NotFound Specified resource is not found. 404 The user requested resource does not exist.
InvalidMaxItemCount Specified parameter MaxItemCount is not valid. Its type must be integer. 400 MaxItemCount must be an integer.
InvalidMaxItemCount Specified parameter MaxItemCount is not valid. It must be in [0, 100]. 400 The MaxItemCount value must be in the range of [0, 100].