Obtaining Build Action Run Logs
Function
This API is used to obtain the runtime logs of active build actions within a specified build task.
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: ascending order ● DESC: descending order |
|
size |
Yes |
String |
Definition This parameter defines the length of the returned content. The default value is 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 |
Definition Returned error message. Range N/A. |
|
status |
String |
Definition Returned status information. Range N/A. |
|
Parameter |
Type |
Description |
|---|---|---|
|
has_more |
Boolean |
Definition Whether there are remaining logs. Range ● true: There are remaining logs. ● false: There are no remaining logs. |
|
start_offset |
String |
Definition The offset used to specify a starting point in the result returned by a query. Range The value consists of digits. |
|
end_offset |
String |
Definition The offset used to specify an end point in the result returned by a query. Range The value consists of digits. |
|
log |
String |
Definition Returned log content. Request again if it is empty. Range N/A. |
|
location |
String |
Definition Log source. Range N/A. |
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 |
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