Updated on 2025-12-16 GMT+08:00

Starting a Build Job

Function

This API is used to start a build job based on the build job ID.

URI

POST /assembling/v1/jobs/{job_id}/builds

Table 1 Path parameter

Parameter

Mandatory

Type

Description

job_id

Yes

String

Build job ID. See Obtaining the Build Job List Based on the Component Name.

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 ID.

job_id

String

Job ID.

job_name

String

Build job name.

index

Integer

Index number of a build job.

started_at

String

Start time.

ended_at

String

End time.

duration

Integer

Build duration.

state

String

Current state. Options:

  • NotStarted
  • Queuing
  • Building
  • Pushing
  • Successful
  • Failed
  • Timeout
  • Cancel
  • Deleted

progress

Number

Build progress.

commit_id

String

Code commit ID.

committer

String

Code committer.

Example Request

None

Example Response

{
  "build_id": "j25yx7qm6apcxin59e3mj7u5byymtjjwsep6r5x2",
  "job_id": "ctilzkwzcs2u22xjr6zh9iroixz2cikbjcd3103l",
  "job_name": "scscscs",
  "index": 2,
  "started_at": "2025-11-14 09:06:28 +0000 UTC",
  "ended_at": "",
  "duration": 0,
  "state": "Building",
  "progress": 0,
  "commit_id": "",
  "committer": ""
}

Status Code

Status Code

Description

200

OK

400

Bad Request

Error Code

See ServiceStage Error Codes.