Updated on 2025-08-06 GMT+08:00

Querying Automatic Image Synchronization Tasks

Description

Query all automatic image synchronization tasks of a repository.

Constraints

None

API Calling

For details, see Calling APIs.

URI

GET /v2/manage/namespaces/{namespace}/repos/{repository}/sync_repo

Table 1 Path parameters

Parameter

Mandatory

Type

Description

namespace

Yes

String

Organization name. Enter 1 to 64 characters, starting with a lowercase letter and ending with a lowercase letter or digit. Only lowercase letters, digits, periods (.), underscores (_), and hyphens (-) are allowed. Periods, underscores, and hyphens cannot be placed next to each other. A maximum of two consecutive underscores are allowed.

repository

Yes

String

Image repository name. Enter 1 to 128 characters. It must start and end with a lowercase letter or digit. Only lowercase letters, digits, periods (.), slashes (/), underscores (_), and hyphens (-) are allowed. Periods, slashes, underscores, and hyphens cannot be placed next to each other. A maximum of two consecutive underscores are allowed. Replace a slash (/) with a dollar sign ($) before you send the request.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format). The value can be application/json or charset=utf-8 application/json.

Default value: application/json

X-Auth-Token

Yes

String

User token.

The token can be obtained 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.

By default, 100 records will be returned.

Response Parameters

Status code: 200

Table 3 Response body parameter

Parameter

Type

Description

[items]

Array of SyncRepo objects

Auto sync policy.

Table 4 SyncRepo

Parameter

Type

Description

createdAt

String

Creation time. It is the UTC standard time. Users need to calculate the offset based on the local time, for example, UTC+8:00 for the East 8th Time Zone.

domainID

String

Tenant ID.

domainName

String

Tenant name.

id

Integer

ID

namespace

String

Organization name.

override

Boolean

Whether to overwrite.

remoteNamespace

String

Target organization.

remoteRegionId

String

Target region.

repoName

String

Repository name.

syncAuto

Boolean

Automatic synchronization.

updatedAt

String

Update time. It is the UTC standard time. Users need to calculate the offset based on the local time, for example, UTC+8:00 for the East 8th Time Zone.

Example Request

GET https://{endpoint}/v2/manage/namespaces/{namespace}/repos/{repository}/sync_repo

{
  "remoteRegionId" : "region1",
  "remoteNamespace" : "sdsad"
}

Example Response

Status code: 200

Query succeeded.

[ {
  "createdAt" : "2020-04-17T02:11:03.53183Z",
  "domainID" : "8b1e81************************633fb",
  "domainName" : "p*********59",
  "id" : 45,
  "namespace" : "test",
  "override" : true,
  "remoteNamespace" : "sdsad",
  "remoteRegionId" : "region1",
  "repoName" : "grpc-helloworld",
  "syncAuto" : true,
  "updatedAt" : "2020-04-17T02:11:03.531831Z"
} ]

Status Codes

Status Code

Description

200

Query succeeded.

400

Request error.

401

Authentication failed.

404

The organization or repository was not found.

500

Internal error.

Error Codes

For details, see Error Codes.