All Products
Search
Document Center

GetTask

Last Updated: May 14, 2018

Description

Gets information about a task.

Request syntax

  1. GET /jobs/{Id}/tasks/{TaskName}

Attribute description

Attribute Type Required Description
Id string Yes ID of a job.
TaskName string Yes ID of a task.

Response

Success

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

  1. {
  2. "TaskName": "taskA"
  3. "State": "Running",
  4. "StartTime": "2016-11-01T15:25:03.020203Z",
  5. "EndTime": "",
  6. "InstanceMetrics": {
  7. "WaitingCount": 0,
  8. "RunningCount": 1,
  9. "FinishedCount": 0,
  10. "FailedCount": 0,
  11. "StoppedCount": 0
  12. }
  13. }

Attribute description

Attribute Type Required or Not Description
TaskName string Yes Name of a task.
State String Yes State of a task.
StartTime string Yes Start time of a task.
EndTime string Yes End time of a task.
InstanceMetrics object Yes Details about instance metrics.

InstanceMetrics

Attribute Type Required or Not Description
WaitingCount int Yes Number of waiting tasks.
RunningCount int Yes Number of running tasks.
FinishedCount int Yes Number of finished tasks.
FailedCount int Yes Number of failed tasks.
StoppedCount int Yes Number of stopped tasks.

Error codes

Error code Error message Status code Syntax
InvalidResource.NotFound Specified resource is not found. 404 The user requested resource does not exist.