Help Center> Software Repository for Container> API Reference> API> Image Replication Management> Obtaining the List of Automatic Image Replication Tasks
Updated on 2024-04-18 GMT+08:00

Obtaining the List of Automatic Image Replication Tasks

Description

Obtain information required for an image replication task.

Constraints

None

API Calling

For details, see Calling APIs.

URI

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

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.

Table 2 Query parameter

Parameter

Mandatory

Type

Description

filter

Yes

String

Enter limit::{limit}|offset::{offset}|order::{order}. {limit} indicates the number of returned records, and {offset} indicates the start index. Parameters offset and limit should be used together and are mandatory. {order} indicates the sorting order (optional). The value can be desc (descending order) or asc (ascending order).

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

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

The default value is 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.

Response Parameters

Status code: 200

Table 4 Response header parameter

Parameter

Type

Description

Content-Range

String

Offset (Start index) – Count (Number of records on the current page)/Total (Total number of records)

Table 5 Response body parameter

Parameter

Type

Description

[Array]

Array of SyncJob objects

Query succeeded.

Table 6 SyncJob

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, GMT+8 is 8 hours ahead the GMT time.

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.

status

String

Synchronization status. The value can be waiting, running, success, failed, timeout, cancel, or existed.

syncOperatorId

String

Operator account ID.

syncOperatorName

String

Operator account name.

tag

String

Image tag.

updatedAt

String

updatedAt

Example Request

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

Example Response

Status code: 200

Query succeeded.

[ {
  "createdAt" : "2020-03-12T08:11:36.518144Z",
  "domainID" : "0657**************************f60",
  "domainName" : "h**********4",
  "id" : 1,
  "namespace" : "test",
  "override" : false,
  "remoteNamespace" : "remtens",
  "remoteRegionId" : "cn-north-1",
  "repoName" : "testrepo",
  "status" : "success",
  "syncOperatorId" : "065***********************10",
  "syncOperatorName" : "h**********4",
  "tag" : "8",
  "updatedAt" : "2020-03-12T08:11:41.505499Z"
} ]

Status Codes

Status Code

Description

200

Query succeeded.

400

Request error.

401

Authentication failed.

404

The organization, image repository, or task does not exist.

500

Internal error.

Error Codes

For details, see Error Codes.