All Products
Search
Document Center

SchedulerX:GetJobInstanceList

Last Updated:Dec 10, 2024

Queries the most recent 10 execution instances of a job.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
edas:ReadSchedulerxJobInstanceQueryget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

cn-hangzhou
NamespacestringYes

The namespace ID. You can obtain the namespace ID on the Namespace page in the SchedulerX console.

adcfc35d-e2fe-4fe9-bbaa-20e90ffc****
NamespaceSourcestringNo

The source of the namespace. This parameter is required only for a special third party.

schedulerx
GroupIdstringYes

The application group ID.

testSchedulerx.defaultGroup
JobIdlongYes

The job ID.

92583
StatusintegerNo

The status of the job instance. Valid values:

1: The job instance is pending. 3: The job instance is running. 4: The job instance is run. 5: The job instance fails. 9: The request for running the job instance is rejected. To specify this parameter, you must declare the following enumeration class: com.alibaba.schedulerx.common.domain.InstanceStatus.

5
StartTimestamplongNo

The beginning of the time range to query. Specify a UNIX timestamp.

1684116000000
EndTimestamplongNo

The end of the time range to query. Specify a UNIX timestamp.

1684202400000
PageNumintegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Default value: 10.

10

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The HTTP status code.

200
Messagestring

The error message that is returned only if the corresponding error occurs.

jobid: 92583 not match groupId: testSchedulerx.defaultGroup
RequestIdstring

The request ID.

4F68ABED-AC31-4412-9297-D9A8F0401108
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
Dataobject

The information about the job instances.

JobInstanceDetailsarray<object>

The details of the job instance.

JobInstanceDetailsobject
Statusinteger

The state of the job instance. Valid values:

  • 1: The job instance is waiting for execution.
  • 3: The job instance is running.
  • 4: The job instance is successful.
  • 5: The job instance failed.
  • 9: The job instance is rejected.

Enumeration class: com.alibaba.schedulerx.common.domain.InstanceStatus

4
Progressstring

The progress of the job instance.

complete
Resultstring

The execution results of the job instance.

success
InstanceIdlong

The job instance ID.

11111111
TimeTypeinteger

The method that is used to specify the time when to schedule the job instance. Valid values:

  • 1: cron
  • 3: fix_rate
  • 4: second_delay
  • 100: api

Enumeration class: com.alibaba.schedulerx.common.domain.TimeType

1
TriggerTypeinteger

The trigger type of the job instance. Valid values:

  • 1: The job instance was triggered at the scheduled time.
  • 2: The job instance was triggered due to data updates.
  • 3: The job instance was triggered by an API call.
  • 4: The job instance was triggered because it is manually rerun.
  • 5: The job instance was triggered because the system automatically reruns the job instance upon a system exception, such as a database exception.

Enumeration class: com.alibaba.schedulerx.common.domain.TriggerType

3
EndTimestring

The end time of the job execution.

2020-07-27 11:52:10
StartTimestring

The start time of the job execution.

2020-07-27 11:52:10
Executorstring

The user who executes the job.

A
JobIdlong

The job ID.

92583
ScheduleTimestring

The time when the job was scheduled to run.

2020-07-27 11:52:10
DataTimestring

The data timestamp of the job instance.

2020-07-27 11:52:10
WorkAddrstring

The endpoint of the triggered client. The value is in the IP address:Port number format.

192.168.0.0:16

Examples

Sample success responses

JSONformat

{
  "Code": 200,
  "Message": "jobid: 92583 not match groupId: testSchedulerx.defaultGroup",
  "RequestId": "4F68ABED-AC31-4412-9297-D9A8F0401108",
  "Success": true,
  "Data": {
    "JobInstanceDetails": [
      {
        "Status": 4,
        "Progress": "complete",
        "Result": "success",
        "InstanceId": 11111111,
        "TimeType": 1,
        "TriggerType": 3,
        "EndTime": "2020-07-27 11:52:10",
        "StartTime": "2020-07-27 11:52:10",
        "Executor": "A",
        "JobId": 92583,
        "ScheduleTime": "2020-07-27 11:52:10",
        "DataTime": "2020-07-27 11:52:10",
        "WorkAddr": "192.168.0.0:16"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-10-18The response structure of the API has changedView Change Details
2024-05-17The request parameters of the API has changedView Change Details
2022-12-26The request parameters of the API has changedView Change Details