All Products
Search
Document Center

ListInstances

Last Updated: May 14, 2018

Request syntax

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

Attribute description

Attribute Type Required Description
Id string Yes ID of a job.
TaskName string Yes ID of a task.
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 instance list information are returned:

  1. {
  2. "NextMarker": "",
  3. "Items":[{
  4. "InstanceId": 0,
  5. "State": "Running",
  6. "StartTime": "2016-11-01T15:25:03.020203Z",
  7. "EndTime": "",
  8. "RetryCount": 30,
  9. "Progress": 0,
  10. "StderrRedirectPath": "oss://bucket/tests/a44c0ad8-a003-11e6-8f8e-fefec0a80e06/logs/stderr.job-0000000058184218000008150000000D.task.0",
  11. "StdoutRedirectPath": "oss://bucket/tests/a44c0ad8-a003-11e6-8f8e-fefec0a80e06/logs/stdout.job-0000000058184218000008150000000D.task.0",
  12. "Result": {
  13. "ExitCode": 0,
  14. "ErrorCode": "",
  15. "ErrorMessage": "",
  16. "Detail": ""
  17. }
  18. }]
  19. }

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].