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 |
Build task ID. The task ID contains the 32 digits and letters at the end of the browser URL when the build task is edited. |
build_no |
Yes |
Integer |
Build number of the task, which automatically increases from 1 by 1 each time the build task is executed. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
Yes |
Integer |
Response offset of the previous request. |
length |
No |
Integer |
The length of the returned content is controllable. The default value is 1,000,000. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API. (Value of X-Subject-Token in the response header.) Global tenant tokens are not supported. Use a region-level token whose scope is project. |
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_data |
String |
Whether there are remaining logs. |
offset |
String |
Offset used for one request. |
content |
String |
Returned log content. Request again if it is empty. |
current_offset |
String |
Offset of the current request. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Example Requests
POST https://{endpoint}/v3/jobs/48c66c6002964721be537cdc6ce0297b/33/real-time-log
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] ------------------------------------------------------------------------\\n[2023/12/21 15:44:18.744 GMT+08:00] [INFO] BUILD SUCCESS\\n[2023/12/21 15:44:18.744 GMT+08:00] [INFO] ------------------------------------------------------------------------\\n[2023/12/21 15:44:18.744 GMT+08:00] [INFO] Total time: 5.408 s\\n[2023/12/21 15:44:18.744 GMT+08:00] [INFO] Finished at: 2023-12-21T15:44:18+08:00\\n[2023/12/21 15:44:18.744 GMT+08:00] [INFO] ------------------------------------------------------------------------\\n[2023/12/21 15:44:18.793 GMT+08:00] [INFO] [Maven build: external_post_maven]: This step starts. \\n[2023/12/21 15:44:18.796 GMT+08:00] [INFO] [Maven build: external_post_maven]: Parameters initialized. \\n[2023/12/21 15:44:18.796 GMT+08:00] [INFO] [Maven build: external_post_maven]: Plug-in context initialized. \\n[2023/12/21 15:44:18.797 GMT+08:00] [INFO] [Maven build: external_post_maven]: This step is complete. \\n[2023/12/21 15:44:18.842 GMT+08:00] $ docker stop --time=1 8db533bfed323ffeb24d4698b65af3b4d6f138c9e7c0297ee9e33442648b87ea\\n", "current_offset" : 121768 }, "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