Downloading Real-time Build Logs
Function
This API is used to download real-time build logs.
Calling Method
For details, see Calling APIs.
URI
GET /v3/jobs/{job_id}/{build_no}/real-time-log
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
job_id |
Yes |
String |
Definition Enter the ID of the build task whose history you want to query. To obtain this ID, open the build task details page in your browser, and copy the 32-character string, which includes both digits and letters, at the end of the URL. Constraints N/A. Range The value is 32 characters long. Only letters and digits are allowed. 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 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
offset |
Yes |
Integer |
Definition Returned offset of the previous request. Constraints N/A. Range 0–2147483647 Default Value N/A. |
|
length |
No |
Integer |
Definition This parameter defines the length of the returned content. The default value is 1000000. Constraints N/A. Range 0–2147483647 Default Value 1000000 |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition User token. (The value of the X-Subject-Token response header is the user token.) It can be obtained by calling the IAM service API. For details, seeObtaining an IAM User Token. Constraints Global tenant tokens are not supported. Use a region-level token whose scope is project. Range N/A. Default Value N/A. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
result |
result object |
Definition Data returned after the API is successfully called. Range N/A. |
|
error |
String |
Definition Returned error message. Range N/A. |
|
status |
String |
Definition Returned status information. Range ● success: The API call is successful. ● fail: The API call failed. |
|
Parameter |
Type |
Description |
|---|---|---|
|
has_more_data |
Boolean |
Definition Whether there are remaining logs. Range ● true: There are remaining logs. ● false: There are no remaining logs. |
|
offset |
Integer |
Definition Offset used for one request. Range N/A. |
|
content |
String |
Definition Returned log content. Request again if it is empty. Range N/A. |
|
current_offset |
Integer |
Definition Offset of the current request. Range N/A. |
Example Requests
GET https://{endpoint}/v3/jobs/48c66c6002964721be537cdc6ce0297b/33/real-time-log?offset=0
Example Responses
Status code: 200
OK
{
"result" : {
"has_more_data" : true,
"offset" : 126548,
"content" : "[2023/12/21 15:44:18.743 GMT+08:00] [INFO] Building jar: ***//target/server-1.0.jar\\n[2023/12/21 15:44:18.744 GMT+08:00] [INFO]",
"current_offset" : 121768
},
"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.