Help Center/ CodeArts Build/ API Reference/ CodeArts Build (Unavailable Soon)/ Obtaining Build Records (Unavailable Soon)
Updated on 2024-04-18 GMT+08:00

Obtaining Build Records (Unavailable Soon)

Function

This API is used to obtain build records (unavailable soon).

Calling Method

For details, see Calling APIs.

URI

GET /v3/jobs/{job_id}/{build_no}/record-info

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

job_id

Yes

String

Build task ID. The task ID contains the 32 digits and letters at the end of the browser URL when the build task is edited.

build_no

Yes

Integer

Build number of the task, which automatically increases from 1 by 1 each time the build task is executed.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API. (Value of X-Subject-Token in the response header.) Global tenant tokens are not supported. Use a region-level token whose scope is project.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

success

Boolean

Status.

message

String

Message.

err_code

String

Error code.

result

result object

Result.

Table 4 result

Parameter

Type

Description

id

String

id

build_project_id

String

Build project ID, which uniquely corresponds to codeci_job_id.

build_record_id

String

Build record ID.

parent_record_id

String

Parent build record ID.

devcloud_project_id

String

Project ID.

codeci_job_id

String

Build task ID, which uniquely corresponds to build_project_id.

user_id

String

User ID.

build_no

Integer

Build ID.

daily_build_num

String

Daily build ID, which starts from 1 every day.

execution_id

String

CloudOctopus task ID.

repo_name

String

Repository name.

repo_id

String

Repository ID.

branch

String

Repository branch.

tag

String

Repository tag.

commit

String

Repository commit ID.

commit_message

String

Information about the repository commit.

commit_create_time

String

Commit creation time.

trigger_type

String

Trigger type.

build_type

String

Build type.

status

String

Build status.

domain_id

String

Tenant ID.

create_time

String

Task creation time.

schedule_time

String

Time for delivering builds.

queued_time

String

Build queuing duration.

start_time

String

Build start time.

runnable_time

String

Time when CloudOctopus really starts building.

finish_time

String

Build end time.

duration

Float

Build duration.

record_status

String

Record status.

use_private_slave

Integer

Whether to use a custom executor.

region

String

Region of the tenant.

err_msg

String

Error message.

build_config_type

String

Build configuration type, which can be YAML or ACTION.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 404

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 500

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

GET https://{endpoint}/v3/jobs/cb5fa20de5fd4cf8be681d4bd6fdd2f6/61/record-info

Example Responses

Status code: 200

OK

{
  "success" : true,
  "result" : {
    "id" : "eb9d73c7-61b3-4823-b476-a7c00c493b8a",
    "build_project_id" : "31581e9f-5772-4053-a50c-d5690578c8fd",
    "build_record_id" : "9d6169b9-022d-458c-9dc8-48cc94cc4083",
    "parent_record_id" : null,
    "devcloud_project_id" : "b4d3971c3988463b865f6f920846149e",
    "codeci_job_id" : "68491d9bc97b4774adb93e29b46d2dc6",
    "user_id" : "ae22fd035f354cfa8d82a3f1c8940446",
    "build_no" : 532,
    "daily_build_num" : "20221011.29",
    "execution_id" : "j_YE1bu9Z7",
    "repo_name" : "maven",
    "repo_id" : "2111616838",
    "branch" : "buildflow_env",
    "tag" : null,
    "commit" : null,
    "commit_message" : null,
    "commit_create_time" : "2022-10-11T08:28:42.000+00:00",
    "trigger_type" : "MANUAL",
    "build_type" : "branch",
    "status" : "SUCCESS",
    "domain_id" : "60021bab32fd450aa2cb89226f425e06",
    "create_time" : "2022-10-11T08:28:42.000+00:00",
    "schedule_time" : "2022-10-11T08:28:45.000+00:00",
    "queued_time" : "2022-10-11T08:28:45.000+00:00",
    "start_time" : "2022-10-11T08:28:47.000+00:00",
    "runnable_time" : "2022-10-11T08:16:04.000+00:00",
    "finish_time" : "2022-10-11T08:30:27.000+00:00",
    "duration" : 100068,
    "record_status" : null,
    "use_private_slave" : 0,
    "region" : "cn-north-7",
    "err_msg" : null,
    "build_config_type" : "YAML"
  }
}

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.