Help Center/ ServiceStage/ API Reference/ Historical APIs/ Build APIs/ Obtaining Build Job Instance Details
Updated on 2025-09-25 GMT+08:00

Obtaining Build Job Instance Details

Function

This API is used to obtain build job instance details based on the instance ID.

URI

GET /assembling/v1/builds/{build_id}

Table 1 describes the parameters.

Table 1 Path parameters

Parameter

Mandatory

Type

Description

build_id

Yes

String

Build job instance ID. See Obtaining the Build Job Instance List Based on the Build Job ID.

Request

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format). Default value: application/json;charset=utf8.

X-Auth-Token

Yes

String

API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. For details about how to obtain a token, see Obtaining a User Token.

Response

Table 3 Response parameters

Parameter

Type

Description

build_id

String

Build job instance ID, which is the same as the input parameter.

job_id

String

Job ID, which is the job to which the build instance belongs.

job_name

String

Job name.

enterprise_project_id

String

Enterprise project ID.

index

String

Index of the build job instance.

started_at

String

Start time.

ended_at

String

End time.

build_state

String

Build status. Enumerated values: Successful, Failed, and Building.

repo_type

String

Repository type. Enumerated values: GitHub, DevCloud, Gitlab, and Gitee.

repo

String

Repository address.

branch

String

Repository code branch.

commit_id

String

Code commit ID.

committer

String

Code committer.

commit_time

String

Code commit time.

commit_comment

String

Code commit comment.

language

String

Language type, for example, java or nodejs.

type

String

Type. Value: user (user-created) or system (system-created).

creator

String

Creator.

Example Request

None

Example Response

{
    "build_id": "sxxx",
    "job_id": "xxx",
    "job_name": "test",
    "enterprise_project_id": "0",
    "index": 2,
    "started_at": "2025-06-24 12:10:30 +0000 UTC",
    "ended_at": "2025-06-24 12:11:22 +0000 UTC",
    "build_state": "Failed",
    "repo_type": "DevCloud",
    "repo": "",
    "branch": "master",
    "commit_id": "xx",
    "committer": "xx",
    "commit_time": "2023-09-20",
    "commit_comment": "xx",
    "language": "java",
    "type": "user",
    "creator": "xx",
}

Status Code

Status Code

Description

200

OK

400

Bad Request

Error Code

The error code format is SVCSTG.CPE.[Error_ID], for example, SVCSTG.CPE.5004401. For details, see ServiceStage Error Codes.