Help Center/ CodeArts Build/ API Reference/ Out-of-DateAPIs (Unavailable Soon)/ Obtaining Build Records (To Be Offline)
Updated on 2023-12-06 GMT+08:00

Obtaining Build Records (To Be Offline)

Function

Obtaining Build Records (To Be Offline)

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

Indicates the ID of the build task. The value is a string of 32 characters consisting of digits and letters at the end of the browser URL when you edit the build task file.

build_no

Yes

Integer

build task build ID, which starts from 1 and increases by 1 for each build.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. Obtain the value by calling the IAM service interface. (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

CodeCI task ID, which uniquely corresponds to build_project_id.

user_id

String

Specifies the user ID.

build_no

Integer

Build ID

daily_build_num

String

Daily build number, starting from 1 every day

execution_id

String

Octopus Fish Task ID

repo_name

String

Repository name.

repo_id

String

Specifies the repository ID.

branch

String

Repository Branch

tag

String

Repository Tag

commit

String

Repository commit ID

commit_message

String

Warehouse Commit Submission Information

commit_create_time

String

Commit creation time.

trigger_type

String

Trigger Type

build_type

String

Building Type

status

String

Status

domain_id

String

Tenant ID.

create_time

String

Indicates the time when the task is created.

schedule_time

String

Time Required for Building and Delivering

queued_time

String

Construction Queuing Duration

start_time

String

Construction Start Time

runnable_time

String

Time for the octopus fish to really start building

finish_time

String

End time of the build.

duration

Float

Build duration

record_status

String

Record status.

use_private_slave

Integer

Whether to use a customized executor

region

String

Region where the tenant is located

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 Codes

error_msg

String

Description

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 404

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 500

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

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.