Help Center/CodeArts Build/API Reference/APIs/Build Task Management/Obtaining Information About Build Outputs
Updated on 2026-03-31 GMT+08:00

Obtaining Information About Build Outputs

Function

This API is used to obtain information about build outputs.

Calling Method

For details, see Calling APIs.

URI

GET /v1/job/{job_id}/{build_no}/output

Table 1 Path Parameters

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 history page in your browser, and copy the 32-character string, which includes both digits and letters and appears in the URL immediately after /detail/history/.

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

Request Parameters

Table 2 Request header 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, see Obtaining 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

Table 3 Response body parameters

Parameter

Type

Description

status

String

Definition

API response status.

Range

success: The API call is successful.

fail: The API call failed.

error

Object

Definition

Error message.

Range

N/A.

result

result object

Definition

Data returned after the API is successfully called.

Range

N/A.

Table 4 result

Parameter

Type

Description

package_info

OutPutResult object

Definition

Artifact information.

Range

N/A.

package_infos

Map<String,OutPutResult>

Definition

Second-party package information.

Range

N/A.

image_infos

Map<String,OutPutResult>

Definition

Image package information.

Range

N/A.

Table 5 OutPutResult

Parameter

Type

Description

project_id

String

Definition

CodeArts project ID. ID of the project to which the build task belongs.

Range

N/A.

name

String

Definition

Artifact name.

Range

N/A.

version

String

Definition

Artifact version.

Range

N/A.

package_type

String

Definition

Artifact type.

Range

cmake: The artifact is a CMake file.

jar: The artifact is a JAR file.

py: The artifact is a python file (.py).

zip: The artifact is a ZIP file.

txt: The artifact is a TXT file.

yml: The artifact is a YAML file (.yml).

html: The artifact is an HTML file.

uri

String

Definition

Artifact path.

Range

N/A.

type

String

Definition

Type.

Range

image: The artifact is an image.

package: The artifact is a software package.

daily_build_number

String

Definition

Build number. It starts from 1 every day.

Range

N/A.

Example Requests

GET https://{endpoint}/v1/job/{job_id}/{build_no}/output

{
  "copy_job_id" : "db8467d972cc47f7a1bd2a3a3e77596a",
  "arch" : "x86-64",
  "project_id" : "a287e712be6c404ca26e5f69040fa12b",
  "job_name" : "examplejob",
  "auto_update_sub_module" : "false",
  "flavor" : "2u8g",
  "parameters" : [ {
    "name" : "hudson.model.StringParameterDefinition",
    "params" : [ {
      "name" : "name",
      "value" : "codeBranch"
    }, {
      "name" : "type",
      "value" : "normalparam"
    }, {
      "name" : "defaultValue",
      "value" : "master"
    }, {
      "name" : "description",
      "value" : "description"
    }, {
      "name" : "deletion",
      "value" : "false"
    }, {
      "name" : "defaults",
      "value" : "true"
    }, {
      "name" : "staticVar",
      "value" : "false"
    }, {
      "name" : "sensitiveVar",
      "value" : "false"
    } ]
  } ],
  "scms" : [ {
    "branch" : "master",
    "url" : "git@codehub.devcloud.cn-north-7.ulanqab.huawei.com:soso-test00001/an.git",
    "repo_id" : "2111746211",
    "web_url" : "https://codehub.devcloud.cn-north-7.ulanqab.huawei.com/codehub/2111746211/home",
    "scm_type" : "codehub",
    "is_auto_build" : false,
    "build_type" : "branch",
    "depth" : "1"
  } ],
  "steps" : [ {
    "properties" : null,
    "module_id" : "devcloud2018.codeci_action_20043.action",
    "name" : "Build with Maven",
    "version" : "20231001.6",
    "enable" : true
  } ],
  "host_type" : "devcloud",
  "triggers" : [ {
    "name" : "hudson.triggers.TimerTrigger",
    "parameters" : [ {
      "name" : "spec",
      "value" : "18 15 * * 1,2,3,4,5"
    }, {
      "name" : "timeZoneId",
      "value" : "Asia/Shanghai"
    }, {
      "name" : "timeZone",
      "value" : "China_Standard_Time"
    }, {
      "name" : "isDST",
      "value" : "false"
    } ]
  } ]
}

Example Responses

Status code: 200

OK

{
  "result" : {
    "package_info" : null,
    "package_infos" : {
      "additionalProp1" : {
        "project_id" : "a287e712be6c404ca26e5f69040fa12b",
        "name" : "a287e712be6c404ca26e5f69040fa12b",
        "version" : "a287e712be6c404ca26e5f69040fa12b",
        "package_type" : "a287e712be6c404ca26e5f69040fa12b",
        "uri" : "a287e712be6c404ca26e5f69040fa12b",
        "type" : "a287e712be6c404ca26e5f69040fa12b",
        "daily_build_number" : "a287e712be6c404ca26e5f69040fa12b"
      }
    },
    "image_infos" : null
  },
  "error" : null,
  "status" : "success"
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.