Updated on 2026-03-31 GMT+08:00

Uploading a Unit Test Report

Function

This API is used to upload the unit test report of a specific build action by referencing its ID.

Calling Method

For details, see Calling APIs.

URI

POST /v1/report/junit/report/upload

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

job_id

Yes

String

Definition

Enter the ID of the build task whose history you want to query. To obtain this ID, open the build history page in your browser, and copy the 32-character string, which includes both digits and letters and appears in the URL immediately after /detail/history/.

Constraints

N/A

Range

The value is 32 characters long. Only letters and digits are allowed.

Default Value

N/A

build_no

Yes

Integer

Definition

The build number tracks each run of the build task. This parameter starts at 1, indicating the first build. It increments by 1 for every subsequent run.

Constraints

The value is a positive integer.

Range

Use only numbers that are 1 or greater.

Default Value

1

node_id

Yes

String

Definition

Build action ID. Use the value of node_id in the response body of the API that retrieves the full stages of a task.

Constraints

The value can contain a maximum of 32 characters. Digits, letters, and hyphens (-) are supported.

Range

N/A.

Default Value

N/A.

Request Parameters

Table 2 FormData parameters

Parameter

Mandatory

Type

Description

files

No

Array of files

Definition

Uploaded unit test report files.

Constraints

N/A.

Range

N/A.

Default Value

N/A.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

status

String

Definition

API response status.

Range

success: The API call is successful.

fail: The API call failed.

error

Object

Definition

Error message.

Range

N/A.

result

String

Definition

Data returned after the API is successfully called.

Range

N/A.

Example Requests

POST https://{endpoint}/v1/report/junit/report/upload

Example Responses

Status code: 200

OK

{
  "status" : "success"
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.