Help Center/ CodeArts Build/ API Reference/ APIs/ Build Task Management/ Querying the List of Self-Hosted Repos
Updated on 2025-08-22 GMT+08:00

Querying the List of Self-Hosted Repos

Function

This API is used to query the list of self-hosted repos.

Calling Method

For details, see Calling APIs.

URI

GET /v1/job/{project_id}/nexus

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

CodeArts project ID. For details about how to obtain the CodeArts project ID, see Obtaining a CodeArts Project ID.

Constraints

N/A.

Range

Use a 32-character string containing a mix of digits and letters.

Default Value

N/A.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Details:

Number of items displayed on each page. The value of limit is no more than 100.

Constraints:

N/A

Value Range:

Only numbers that are 100 or less can be used.

offset

No

Integer

Definition

The index of the page to start the query from.

Constraints

N/A.

Range

Use only numbers that are 0 or greater.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

result

result object

Returned result.

error

String

Returned error message.

status

String

Returned status information.

Table 4 result

Parameter

Type

Description

endpoints

Array of EndPointResponse objects

Definition

A list of self-hosted repos.

Constraints

N/A.

Range

N/A.

total

Integer

Definition

Volume of returned data.

Constraints

N/A.

Range

N/A.

Table 5 EndPointResponse

Parameter

Type

Description

authorization

authorization object

Authorization.

uuid

String

uuid

url

String

Access address (URL).

name

String

Name.

project_uuid

String

Project UUID.

region_name

String

Region name.

data

Object

Data.

module_id

String

Module ID.

created_by

created_by object

Creator.

Table 6 authorization

Parameter

Type

Description

parameters

Object

Parameters.

scheme

Object

Scheme.

Table 7 created_by

Parameter

Type

Description

username

String

Creator username.

user_id

String

Creator user ID.

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 401

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 403

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 404

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 12 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

GET https://{endpoint}/v1/job/{project_id}/nexus

Example Responses

Status code: 200

OK

{
  "result" : {
    "endpoints" : [ {
      "uuid" : "f411faccc648483a8cbb0efb63fc1b83",
      "url" : "https://www.huaweicloud.com/",
      "name" : "test2",
      "project_uuid" : "b4d3971c3988463b865f6f920846149e",
      "region_name" : "{region}-7",
      "data" : null,
      "module_id" : "devcloud2018.codeci_endpoint_nexus.nexusEndpoint",
      "authorization" : {
        "parameters" : null,
        "scheme" : null
      },
      "created_by" : {
        "username" : "devcloud_codeci_z00485259_02",
        "user_id" : "ae22fd035f354cfa8d82a3f1c8940446"
      }
    }, {
      "uuid" : "80101f3900f84b82855c81c4474c8969",
      "url" : "https://www.huaweicloud.com/",
      "name" : "test1",
      "project_uuid" : "b4d3971c3988463b865f6f920846149e",
      "region_name" : "{region}-7",
      "data" : null,
      "module_id" : "devcloud2018.codeci_endpoint_nexus.nexusEndpoint",
      "authorization" : {
        "parameters" : null,
        "scheme" : null
      },
      "created_by" : {
        "username" : "devcloud_codeci_z00485259_02",
        "user_id" : "ae22fd035f354cfa8d82a3f1c8940446"
      }
    } ],
    "total" : 2
  },
  "error" : null,
  "status" : "success"
}

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.