Querying the Historical Execution Steps of an Agent Job
Function
This API is used to query the historical execution steps of an agent job for a DB instance.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
Authorization Information
- If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
|
Action |
Access Level |
Resource Type (*: required) |
Condition Key |
Alias |
Dependencies |
|---|---|---|---|---|---|
|
rds:instance:update |
write |
- |
- |
rds:instance:modify |
- |
URI
- URI format
GET /v3/{project_id}/instances/{instance_id}/db-jobs/histories/{history_id}/steps?offset={offset}&limit={limit}
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
Constraints
The value cannot be empty.
Range
N/A
Default Value
N/A
instance_id
Yes
Definition
Instance ID.
Constraints
The value cannot be empty.
Range
N/A
Default Value
N/A
history_id
Yes
Definition
Historical execution record ID of a job.
Constraints
The value cannot be empty.
Range
N/A
Default Value
N/A
offset
No
Definition
Index offset. The query starts from the next piece of data indexed by this parameter.
Constraints
N/A
Range
The value must be a non-negative number.
Default Value
0: The query starts from the first data record.
limit
No
Definition
Number of records returned by a query.
Constraints
N/A
Range
1–100
Default Value
10
Request
Response
- Normal response
Table 2 Parameters Parameter
Type
Description
steps
Array of objects
Definition
List of historical execution steps.
For details, see Table 3.
total_count
Integer
Definition
Total number of historical execution steps.
Range
N/A
Table 3 steps element structure description Parameter
Type
Description
step_id
String
Definition
Step ID.
Range
N/A
step_name
String
Definition
Step name.
Range
N/A
run_status
String
Definition
Job execution status.
Range
- failed
- succeeded
- retrying
- canceled
- in_progress
run_time
String
Definition
Latest execution time, in the format of yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.
Range
N/A
run_duration
String
Definition
Job execution duration, in the format of hh:mm:ss.
Range
N/A
message
String
Definition
Execution information.
Range
N/A
- Example normal response
{ "steps": [ { "step_id": "1", "step_name": "Run agent.", "run_time": "2025-11-16T07:39:00+0000", "run_status": "succeeded", "run_duration": "00:00:00", "message": "Executed as user: NT SERVICE\\SQLAgent$MSSQL2019EE. The step succeeded." } ], "total_count": 1 } - Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot