Canceling a Build Job
Function
This API is used to cancel a build job based on the build job instance ID.
URI
PATCH /assembling/v1/builds/{build_id}
|
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
|
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
|
Parameter |
Type |
Description |
|---|---|---|
|
build_id |
String |
Build ID. |
|
job_id |
String |
Job ID. |
|
job_name |
String |
Job name. |
|
enterprise_project_id |
String |
Enterprise project ID. |
|
index |
Integer |
Index number of a build job. |
|
started_at |
String |
Creation time. |
|
ended_at |
String |
End time. |
|
build_state |
String |
State. |
|
repo_type |
String |
Code repository.
|
|
repo_endpoint |
String |
Repository access address. |
|
repo_web_url |
String |
Repository web access address. |
|
repo |
String |
Repository address. |
|
branch |
String |
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 |
Software build language. |
|
swr_repository |
String |
Address where the software or image is archived. |
|
swr_repo_page |
String |
Image URL. |
|
archive_result |
Object |
Archive details. |
|
base_image |
String |
Created basic image. |
|
seccomp_path |
String |
Mounted relative path. |
|
type |
String |
Build type. Options:
|
|
creator |
String |
Creator of the build job. |
|
code_repo_anatomy |
Object |
Code repository details. See Table 4. |
|
os |
Object |
Operating system used in the build job. See Table 5. |
Example Request
None
Example Response
{
"build_id": "kzqjkrvbglqbczhm82kkjlh0ixe2o2wv8v85fpmv",
"job_id": "qexh8qwfmuvlv1y078delx51vn0tsjsmsb23e0e0",
"job_name": "",
"enterprise_project_id": "",
"index": 4,
"started_at": "2025-11-14 08:00:42 +0000 UTC",
"ended_at": "2025-11-14 08:00:54 +0000 UTC",
"build_state": "Cancel",
"repo_type": "BinObs",
"repo_endpoint": "",
"repo_web_url": "",
"repo": "obs://demo/MainLoop.jar",
"branch": "",
"commit_id": "",
"committer": "",
"commit_time": "",
"commit_comment": "",
"language": "java",
"swr_repository": {
"1754123329469": "test.com/test/test-0802-1:afdafds"
},
"swr_repo_page": {
"1754123329469": "https://test.com/dockyard/v2/domains/paas_servicestage_test/namespaces/test/repositories?repository=test-0802-1&is_public=false&description=&category=other"
},
"archive_result": {},
"base_image": "",
"seccomp_path": "",
"type": "user",
"creator": "paas_servicestage_test",
"code_repo_anatomy": null,
"os": {
"arch": "x86_64"
}
}
Status Code
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
Error Code
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