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

Obtaining the Repository Source List

Function

This API is used to obtain the repository source list.

URI

GET /v1/configsets/repos

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

clusterid

Yes

String

Cluster ID

limit

No

Integer

The number of records allowed on each page when the list is queried by page. The default value is -1.

offset

No

Integer

Start offset when the list is queried by page. The default value is 0.

order_by

No

String

Sorting parameter when the list is queried by page. The value can be create_at or update_at. The default value is create_at.

  • create_at: sorting by creation time

  • update_at: sorting by update time

order

No

String

Sorting order when the list is queried by page. The value can be desc or asc. The default value is desc.

  • desc: descending order

  • asc: ascending order

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.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

items

Array of RepoResponse objects

Repository source information list

total

Integer

Total number of records on all pages

Table 4 RepoResponse

Parameter

Type

Description

uid

String

Repository UID

name

String

Repository name

repoType

String

Repository type. The value can be Bucket, HelmChart, GitRepository, or HelmRepository. Currently, only GitRepository is supported.

namespace

String

Namespace

gitRepository

GitRepository object

Git repository information

repoStatus

String

Repository status. The value can be Health, Failed, Unknown, or Progressing.

clusterInfo

ClusterInfo object

Basic cluster information

secretInfo

SecretInfo object

Authentication information for accessing the repository

Table 5 GitRepository

Parameter

Type

Description

metadata

GitRepositoryMetaData object

Resource metadata

spec

GitRepositorySpec object

Git repository configuration information

status

GitRepositoryStatus object

Git repository status

Table 6 GitRepositoryMetaData

Parameter

Type

Description

name

String

Repository name

namespace

String

Namespace

uid

String

UID

resourceVersion

String

Internal version ID of a resource. It is used for concurrency control.

generation

Integer

Generation of the desired resource state. The value increases each time the spec is modified.

creationTimestamp

String

Creation time

finalizers

Array of strings

Cleanup operations before the deletion

managedFields

Array of ManagedFieldsEntry objects

Used to trace resource field management permissions and record the manager of each field

Table 7 ManagedFieldsEntry

Parameter

Type

Description

manager

String

Manager name

operation

String

Operation type that causes this entry being created. The value can only be Apply or Update.

apiVersion

String

Resource API version used by a manager for defining fields

time

String

Timestamp when this entry was created or last updated

fieldsType

String

Field structure format. The value is fixed at "FieldsV1".

fieldsV1

Object

Information about the managed fields

Table 8 GitRepositorySpec

Parameter

Type

Description

url

String

Git repository address

ref

GitRepositoryRef object

Git reference to be parsed and checked out

secretRef

LocalObjectReference object

Secret that contains authentication information

interval

String

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

timeout

String

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

Table 9 GitRepositoryRef

Parameter

Type

Description

branch

String

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

Table 10 LocalObjectReference

Parameter

Type

Description

name

String

Referent name

Table 11 GitRepositoryStatus

Parameter

Type

Description

observedGeneration

Integer

Version of the GitRepository processed by the controller last time

conditions

Array of objects

Current GitRepository condition set, which includes different states of an object

artifact

Artifact object

Artifact generated in the last GitRepository reconciliation

Table 12 Artifact

Parameter

Type

Description

path

String

Relative file path of the artifact

url

String

HTTP address, which can be used to download or access the artifact content

revision

String

Version identifier

digest

String

File digest, in the format of [/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br]:[/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br]

lastUpdateTime

String

Last update time

size

Integer

File size, in bytes

Table 13 ClusterInfo

Parameter

Type

Description

clusterID

String

Cluster ID

clusterName

String

Cluster name

clusterPath

String

Cluster path

Table 14 SecretInfo

Parameter

Type

Description

authMode

String

Authentication mode

secret

Object

Secret that stores the authentication credential

Status code: 400

Table 15 Response body parameters

Parameter

Type

Description

-

String

-

Status code: 403

Table 16 Response body parameters

Parameter

Type

Description

-

String

-

Status code: 500

Table 17 Response body parameters

Parameter

Type

Description

-

String

-

Example Requests

None

Example Responses

Status code: 200

Repository source list obtained

{
  "items" : [ {
    "name" : "official-podinfo-repo-06",
    "repoType" : "GitRepository",
    "namespace" : "default",
    "gitRepository" : {
      "metadata" : {
        "name" : "official-podinfo-repo-06",
        "namespace" : "default",
        "uid" : "2ee7be10-8a01-4f10-ae85-e84dd46146eb",
        "resourceVersion" : "726499",
        "generation" : 1,
        "creationTimestamp" : "2023-03-16T07:58:56Z",
        "finalizers" : [ "finalizers.fluxcd.io" ],
        "managedFields" : [ {
          "manager" : "Go-http-client",
          "operation" : "Update",
          "apiVersion" : "source.toolkit.fluxcd.io/v1beta2",
          "time" : "2023-03-16T07:58:56Z",
          "fieldsType" : "FieldsV1",
          "fieldsV1" : {
            "f:spec" : {
              "." : { },
              "f:gitImplementation" : { },
              "f:interval" : { },
              "f:ref" : {
                "." : { },
                "f:branch" : { }
              },
              "f:secretRef" : {
                "." : { },
                "f:name" : { }
              },
              "f:timeout" : { },
              "f:url" : { }
            }
          }
        }, {
          "manager" : "source-controller",
          "operation" : "Update",
          "apiVersion" : "source.toolkit.fluxcd.io/v1beta2",
          "time" : "2023-03-16T07:59:12Z",
          "fieldsType" : "FieldsV1",
          "fieldsV1" : {
            "f:metadata" : {
              "f:finalizers" : {
                "." : { },
                "v:\"finalizers.fluxcd.io\"" : { }
              }
            },
            "f:status" : {
              "f:conditions" : { }
            }
          }
        } ]
      },
      "spec" : {
        "url" : "https://github.com/GitHubxsy/podinfo",
        "secretRef" : {
          "name" : "https-ca-credentials"
        },
        "interval" : "1m0s",
        "timeout" : "1m0s",
        "ref" : {
          "branch" : "master"
        }
      },
      "status" : {
        "observedGeneration" : -1,
        "conditions" : [ {
          "type" : "Reconciling",
          "status" : "True",
          "observedGeneration" : 1,
          "lastTransitionTime" : "2023-03-16T07:58:56Z",
          "reason" : "NoArtifact",
          "message" : "no artifact for resource in storage"
        }, {
          "type" : "Ready",
          "status" : "False",
          "observedGeneration" : 1,
          "lastTransitionTime" : "2023-03-16T08:14:23Z",
          "reason" : "GitOperationFailed",
          "message" : "failed to checkout and determine revision: unable to fetch-connect to remote 'https://github.com/GitHubxsy/podinfo': Get \"https://github.com/GitHubxsy/podinfo/info/refs?service=git-upload-pack\": dial tcp: lookup github.com on 10.247.3.10:53: read udp 172.17.0.16:60193->10.247.3.10:53: i/o timeout"
        }, {
          "type" : "FetchFailed",
          "status" : "True",
          "observedGeneration" : 1,
          "lastTransitionTime" : "2023-03-16T08:14:23Z",
          "reason" : "GitOperationFailed",
          "message" : "failed to checkout and determine revision: unable to fetch-connect to remote 'https://github.com/GitHubxsy/podinfo': Get \"https://github.com/GitHubxsy/podinfo/info/refs?service=git-upload-pack\": dial tcp: lookup github.com on 10.247.3.10:53: read udp 172.17.0.16:60193->10.247.3.10:53: i/o timeout"
        } ]
      }
    },
    "clusterInfo" : { },
    "secretInfo" : { }
  } ],
  "total" : 1
}

Status Codes

Status Code

Description

200

Repository source list obtained

400

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

403

The server refused the request.

500

Internal server error

Error Codes

See Error Codes.