nav-img
Advanced

Synchronizing the Image List from SWR

Function

This API is used to synchronize the image list from SWR.

URI

POST /v5/{project_id}/image/synchronize

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Enterprise project ID. To query all enterprise projects, set this parameter to all_granted_eps.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It 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 a token.

region

No

String

Region ID

Table 4 Request body parameters

Parameter

Mandatory

Type

Description

image_type

Yes

String

Image type. The options are as follows:

  • private_image: private image repository

  • shared_image: shared image repository

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

error_code

Integer

Error code

error_description

String

Error description

Example Requests

Synchronize private or shared images from SWR.

POST https://{endpoint}/v5/{project_id}/image/synchronize
{
"image_type" : "private_image"
}

Example Responses

Status code: 200

Request succeeded.

{
"error_code" : 0,
"error_description" : "success"
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes