Querying Details of a Build Record
Function
This API is used to query details of a build record.
Calling Method
For details, see Calling APIs.
URI
GET /v3/jobs/{job_id}/{build_number}/history-details
| 
        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_number  | 
      
        Yes  | 
      
        Integer  | 
      
        Details: Build number of a task. It starts at 1 and increments by 1 each time the build task runs. Constraints: N/A Value Range: Only numbers that are 1 or greater can be used.  | 
     
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 is obtained by calling the IAM API. 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  | 
     
|---|---|---|
| 
        job_name  | 
      
        String  | 
      
        Definition Build task name. Range N/A.  | 
     
| 
        build_number  | 
      
        Integer  | 
      
        Definition Build number. Range 0–2147483647  | 
     
| 
        project_id  | 
      
        String  | 
      
        Definition CodeArts project ID. ID of the project to which the build task belongs. Range N/A.  | 
     
| 
        project_name  | 
      
        String  | 
      
        Definition Name of the project to which the build task belongs. Range N/A.  | 
     
| 
        parameters  | 
      
        Map<String,String>  | 
      
        Definition Map that contains parameters in this build. Values of sensitive parameters are displayed as asterisks (*) in responses. Range N/A.  | 
     
| 
        build_steps  | 
      
        Array of build_steps objects  | 
      
        Definition Details about the build actions of the task. Returned actions can be viewed on the build page. Range N/A.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        name  | 
      
        String  | 
      
        Definition Action name. Range N/A.  | 
     
| 
        status  | 
      
        String  | 
      
        Definition Action status. (The value can be running, success, or error. The value is an empty string when the build action is not executed.) Range ● running: The action is running. ● success: The action is successful. ● error: The action fails. ● "": The action is not running.  | 
     
| 
        build_time  | 
      
        Integer  | 
      
        Definition Action duration (ms). 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}/v3/jobs/901878212b1a49be9c1a1054c272762a/1/history-details
 Example Responses
Status code: 200
OK
{
  "job_name" : "Test task 01",
  "build_number" : 5,
  "project_id" : "6ecbc5bac7c8442fb3d2563d53c13582",
  "project_name" : "test-project",
  "parameters" : [ {
    "static_limit_param_name" : "static_limit_param_value_1",
    "sentive_param_name" : "******",
    "no_static_param_name" : "no_static_param_value",
    "static_param_name" : "static_param_value",
    "no_static_limit_param_name" : "no_static_limit_param_value_1"
  } ],
  "build_steps" : [ {
    "name" : "Code CheckOut",
    "status" : "success",
    "build_time" : 8366
  }, {
    "name" : "Upload to Release Repos",
    "status" : "",
    "build_time" : 0
  } ]
}
 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.