Updated on 2025-12-01 GMT+08:00

Updating a Repository Source

Function

This API is used to update a repository source.

URI

PUT /v1/configsets/repos/{repoid}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

repoid

Yes

String

Repository ID

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

Identity authentication information. Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

name

No

String

Repository Name

namespace

No

String

Namespace

repoType

No

String

Repository type, including Bucket, HelmChart, GitRepository and HelmRepository. Currently, only GitRepository is supported

gitRepositorySpec

No

GitRepositorySpec object

Git repository information

secretInfo

No

SecretInfo object

Authentication information for accessing the repository

Table 4 GitRepositorySpec

Parameter

Mandatory

Type

Description

url

No

String

Git repository address

ref

No

GitRepositoryRef object

Git reference to be parsed and checked out

secretRef

No

LocalObjectReference object

Secret that contains authentication information

interval

No

String

Interval for periodically checking repository updates. For example, 1m indicates 1 minute.

timeout

No

String

Timeout duration for Git operations (such as clone). The default value is 60 seconds.

Table 5 GitRepositoryRef

Parameter

Mandatory

Type

Description

branch

No

String

Git branch to be checked out. If no other fields are defined, the master branch is checked out by default.

Table 6 LocalObjectReference

Parameter

Mandatory

Type

Description

name

No

String

Referent name

Table 7 SecretInfo

Parameter

Mandatory

Type

Description

authMode

No

String

Authentication mode

secret

No

Object

Secret that stores the authentication credential

Response Parameters

Status code: 200

Repository source updated

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

-

String

-

Status code: 409

Table 9 Response body parameters

Parameter

Type

Description

-

String

-

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

-

String

-

Example Requests

Updating a repository source

PUT https://ucs.myhuaweicloud.com/v1/configsets/repos/{repoid}

{
  "name" : "lwj-repo-0406",
  "namespace" : "default",
  "gitRepositorySpec" : {
    "url" : "https://github.com/wangyuan249/podinfo",
    "ref" : {
      "branch" : "master"
    },
    "interval" : "1m",
    "timeout" : "1m"
  }
}

Example Responses

Status code: 200

Repository source updated

{ }

Status Codes

Status Code

Description

200

Repository source updated

400

Client request error. The server could not execute the request.

409

There was a request conflict.

500

Internal server error

Error Codes

See Error Codes.