Help Center/ CodeArts Repo/ API Reference/ APIs/ V4/ Repository/ Triggering a Code Navigation Task
Updated on 2026-05-12 GMT+08:00

Triggering a Code Navigation Task

Function

This API is used to trigger a code navigation task.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

Authorization Information

No identity policy-based permission required for calling this API.

URI

POST https://{hostURL}/v4/repositories/{repository_id}/repository/nav/build

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

repository_id

Yes

Integer

Definition

You can call the API used to query all repositories of the user to query the project list to obtain the repository ID.

Constraints

N/A

Default Value

N/A

Value range:

1~2147483647

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. You can obtain the token by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Constraints

N/A

Range

A string that can contain 1 to 100,000 characters.

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

result

String

Definition

Result identifier.

Constraints

N/A

message

String

Definition

Result message.

Constraints

N/A

duration

String

Definition

Time required for triggering a task (in milliseconds).

Constraints

N/A

size

Long

Definition

Size of the current code navigation index (in byte).

Constraints

N/A

Example Requests

POST https://{endpoint}/v4/repositories/123/repository/nav/build

Example Responses

Status code: 200

OK

{
  "result" : "0",
  "message" : "",
  "duration" : "20",
  "size" : 73728
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.