Help Center> SoftWare Repository for Container> API Reference> API> Obtaining Information About an Image Synchronization Task

Obtaining Information About an Image Synchronization Task

Function

Obtain information about an image synchronization task.

URI

GET /v2/manage/namespaces/{namespace}/repos/{repository}/sync_job?filter=limit::{limit}|offset::{offset}|order::{order}

Table 1 describes the parameters.

Table 1 Parameter description

Parameter

Mandatory

Type

Description

namespace

Yes

String

Organization name.

repository

Yes

String

Image repository name.

limit

Yes

String

Number of returned records.

Ensure that the limit and offset parameters are used together.

offset

Yes

String

Start index.

Ensure that the limit and offset parameters are used together.

order

No

String

Sorting type. The value can be desc or asc, indicating the results are sorted by creation time in descending or ascending order respectively.

Request

Request parameters

NA

Response

Response parameters

Table 2 Response header parameter description

Parameter

Type

Description

Content-Range

String

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

If the offset and limit parameters are transferred in the request, Content-Range will be added to the response header.

Table 3 Response body parameter description

Parameter

Type

Description

createdAt

String

Creation time

domainID

String

Account ID

domainName

String

Account name

id

Interger

ID

namespace

String

Organization name

override

Bool

Whether to overwrite

remoteNamespace

String

Target organization

remoteRegionId

String

Target region

repoName

String

Image repository

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

Update time

Response example

[
    {
        "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 Code

Table 4 describes the status codes of this API.

Table 4 Status code

Status Code

Description

200

Operation succeeded.

400

Request error.

401

Authentication failed.

404

The organization does not exist.

500

Failed to complete the request because of an internal service error.