Obtaining Error Logs When a Task Fails
Function
This API is used to obtain error logs when a task fails.
Calling Method
For details, see Calling APIs.
URI
GET /v1/log/{job_id}/{build_no}/analysis
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 |
---|---|---|---|
limit |
No |
Integer |
Details: Number of items displayed on each page. The value of limit is no more than 100. Constraints: N/A Value Range: Only numbers that are 100 or less can be used. |
offset |
No |
Integer |
Definition The index of the page to start the query from. Constraints N/A. Range Use only numbers that are 0 or greater. |
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 |
---|---|---|
jobName |
String |
Definition Build task name. Constraints N/A. Range The value consists of letters and other characters. |
error_nodes |
Array of AnalysisError objects |
Definition A collection of task error messages. Constraints N/A. Range N/A. |
Parameter |
Type |
Description |
---|---|---|
node_id |
String |
Definition Node ID. Constraints N/A. Range N/A. |
step |
String |
Definition Action. Constraints N/A. Range N/A. |
analyzed_success |
Boolean |
Definition A flag that indicates whether the analysis is successful. Constraints N/A. Range true: Success. false: Failure. |
error_info |
error_info object |
Definition Error message. Constraints N/A. Range N/A. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Definition Error code. Constraints N/A. Range N/A. |
error_message |
String |
Definition Error logs. Constraints N/A. Range N/A. |
faq |
String |
Definition Common issues. Constraints N/A. Range 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/{job_id}/{build_no}/analysis
Example Responses
Status code: 200
OK
{ "result" : { "jobName" : "j_JbgkmAfe", "error_nodes" : [ { "step" : "releasemanArtifactsUploader", "node_id" : 114, "analyzed_success" : true, "error_info" : { "faq" : null, "error_code" : "DEV.CB.0220021", "error_message" : "DEV.CB.0220021: File not found. Possible cause: Incorrect file path (build/*)" } }, { "step" : "releasemanArtifactsUploader", "node_id" : 82, "analyzed_success" : true, "error_info" : { "faq" : null, "error_code" : "DEV.CB.0210032", "error_message" : "File verification failed." } } ] }, "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