Obtaining Build Action Run Logs
Function
This API is used to obtain build action run logs.
Calling Method
For details, see Calling APIs.
URI
GET /v1/log/task/step
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
job_id |
Yes |
String |
Definition Build task ID. It includes digits and letters. To obtain this ID, open the page for editing the build task in your browser, and copy the 32-character string at the end of the URL. Constraints N/A. Range The 32-character string sits at the end of the URL and includes digits and letters. Default Value N/A. |
build_no |
Yes |
Integer |
Definition The build number tracks each run of the build task. This parameter starts at 1, indicating the first build. It increments by 1 for every subsequent run. Constraints The value is a positive integer. Range Use only numbers that are 1 or greater. Default Value 1 |
step_id |
Yes |
Integer |
Definition Action ID. Constraints N/A. Range N/A. |
start_offset |
Yes |
Integer |
Definition Where the query begins. Constraints N/A. Range Use only numbers that are 0 or greater. |
end_offset |
Yes |
Integer |
Definition Where the query ends. Constraints N/A. Range Use only numbers that are 0 or greater. |
sort |
No |
String |
Definition Sorting order. Constraints N/A. Range AES or DESC. |
size |
Yes |
String |
Definition Length of the returned content. It is fixed at 1000. Constraints N/A. Range Use only numbers that are 0 or greater. Default Value 1000 |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
result |
result object |
Result. |
error |
String |
Returned error message. |
status |
String |
Returned status information. |
Parameter |
Type |
Description |
---|---|---|
has_more |
Boolean |
Definition Whether there are remaining logs. Constraints N/A. Range true or false Default Value N/A. |
start_offset |
String |
Definition The offset used to specify a starting point in the result set returned by a query. Constraints N/A. Range The value consists of numbers. Default Value N/A. |
end_offset |
String |
Definition The offset used to specify an end point in the result set returned by a query. Constraints N/A. Range The value consists of numbers. Default Value N/A. |
log |
String |
Definition Returned log content. Request again if it is empty. Constraints N/A. Range N/A. Default Value N/A. |
location |
String |
Definition Log source. Constraints N/A. Range N/A. Default Value N/A. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
GET https://{endpoint}/v1/log/task/step
Example Responses
Status code: 200
OK
{ "result" : { "start_offset" : 0, "end_offset" : 24351, "log" : "[2025/06/26 14:23:32.169 GMT+08:00] [INFO] [Code checkout:external_pre_checkout] : This action starts.\n[2025/06/26 14:23:32.172 GMT+08:00]...", "has_more" : false, "location" : "jenkins" }, "error" : null, "status" : "success" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
500 |
Internal Server Error |
Error Codes
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