Updated on 2023-04-04 GMT+08:00

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 by creation time. The value can be desc (descending order) or asc (ascending order).

Request

  • Request parameters

    N/A

  • Example request
    GET https://{Endpoint}/v2/manage/namespaces/group/repos/busybox/sync_job?filter=limit::10|offset::0

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.

    [Array element]

    Array of objects

    Obtaining the list of image synchronization tasks.

    Table 4 [Array element] parameters description

    Parameter

    Type

    Description

    createdAt

    String

    Creation time.

    domainID

    String

    Account ID.

    domainName

    String

    Account name.

    id

    Integer

    Task ID.

    namespace

    String

    Organization name.

    override

    Boolean

    Whether to overwrite.

    remoteNamespace

    String

    Target organization.

    remoteRegionId

    String

    Target region

    repoName

    String

    Image 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

    Update time.

  • Example response
    [
        {
            "createdAt": "2020-03-12T08:11:36.518144Z",
            "domainID": "0657**************************f60",
            "domainName": "h**********4",
            "id": 172928,
            "namespace": "group",
            "override": false,
            "remoteNamespace": "remtens",
            "remoteRegionId": "region-1",
            "repoName": "busybox",
            "status": "success",
            "syncOperatorId": "065***********************10",
            "syncOperatorName": "h**********4",
            "tag": "8",
            "updatedAt": "2020-03-12T08:11:41.505499Z"
        }
    ]

Status Code

Status Code

Description

200

Request successful.

400

Request error.

401

Authentication failed.

404

The organization does not exist.

500

Internal error.