Help Center/ SoftWare Repository for Container/ CLI Reference/ CLI Command Reference (Basic Edition)
Updated on 2026-08-31 GMT+08:00

CLI Command Reference (Basic Edition)

Organization Management

API Name

Command

Description

Operation

Creating an Organization

hcloud SWR CreateNamespace

Create an organization.

Go debug

Querying the List of Organizations

hcloud SWR ListNamespaces

Query the list of organizations.

Go debug

Deleting an Organization

hcloud SWR DeleteNamespaces

Delete an organization.

Go debug

Obtaining Organization Details

hcloud SWR ShowNamespace

Obtain organization details.

Go debug

Image Repository Management

API Name

Command

Description

Operation

Creating an Image Repository in an Organization

hcloud SWR CreateRepo

Create an image repository in an organization.

Go debug

Deleting an Image Repository in an Organization

hcloud SWR DeleteRepo

Delete an image repository in an organization.

Go debug

Updating the Brief Information on an Image Repository

hcloud SWR UpdateRepo

Update the brief information on an image in an organization of the account, including the **category**, **is_public**, and **description**.

Go debug

Querying the Brief Information on an Image Repository

hcloud SWR ShowRepository

Query the brief information on an image repository.

Go debug

Querying Image Repository List

hcloud SWR ListReposDetails

Query image repository list.

Go debug

Querying Details About the Image Repository List

hcloud SWR ListRepoDetails

Querying Details About the Image Repository List.

Go debug

Querying the List of Shared Images

hcloud SWR ListSharedReposDetails

Query the list of shared images.

Go debug

Querying the List of Shared Images

hcloud SWR ListSharedRepoDetails

Query the list of shared images.

Go debug

Image Tag Management

API Name

Command

Description

Operation

Querying the List of Image Tags

hcloud SWR ListRepositoryTags

Query the list of image tags.

Go debug

Creating an Image Tag

hcloud SWR CreateRepoTag

Creating an Image Tag

Go debug

Querying Details About an Image Tag List

hcloud SWR ListRepositoryTag

Querying Details About an Image Tag List

Go debug

Query the list of image accessories

hcloud SWR ListRepoAccessories

Query the list of image accessories

Go debug

Listing the Signed Image Tags Associated with a Signing Image

hcloud SWR ListReferences

Query the list of signed image tags associated with a signing image

Go debug

Query the Image with a Specified Tag

hcloud SWR ShowRepoTag

Query the image with a specified tag in an image repository.

Go debug

Deleting the Image with a Specified Tag

hcloud SWR DeleteRepoTag

Delete the image with a specified tag in an image repository.

Go debug

Shared Account Management

API Name

Command

Description

Operation

Creating a Shared Account

hcloud SWR CreateRepoDomains

Create a shared account. After pushing a private image, you can share it with other users and grant them permissions to pull the image.

Go debug

Obtaining the List of Shared Accounts

hcloud SWR ListRepoDomains

Obtain the list of shared accounts.

Go debug

Deleting a Shared Account

hcloud SWR DeleteRepoDomains

Delete a shared account.

Go debug

Updating a Shared Account

hcloud SWR UpdateRepoDomains

Update a shared account.

Go debug

Checking the Existence of a Shared Account

hcloud SWR ShowAccessDomain

Check the existence of a shared tenant.

Go debug

API Version Information

API Name

Command

Description

Operation

Querying All API Versions

hcloud SWR ListApiVersions

Querying All API Versions

Go debug

Querying a Specified API Version

hcloud SWR ShowApiVersion

Query a specified API version.

Go debug

Organization Permission Management

API Name

Command

Description

Operation

Creating Organization Permissions

hcloud SWR CreateNamespaceAuth

Create organization permissions.

Go debug

Deleting Organization Permissions

hcloud SWR DeleteNamespaceAuth

Delete organization permissions.

Go debug

Updating Organization Permissions

hcloud SWR UpdateNamespaceAuth

Update organization permissions.

Go debug

Querying Organization Permissions

hcloud SWR ShowNamespaceAuth

Query organization permissions.

Go debug

Image Permission Management

API Name

Command

Description

Operation

Creating Image Permissions

hcloud SWR CreateUserRepositoryAuth

Create image permissions.

Go debug

Deleting Image Permissions

hcloud SWR DeleteUserRepositoryAuth

Delete image permissions.

Go debug

Updating Image Permissions

hcloud SWR UpdateUserRepositoryAuth

Update image permissions.

Go debug

Querying Image Permissions

hcloud SWR ShowUserRepositoryAuth

Query image permissions.

Go debug

Image Replication Management

API Name

Command

Description

Operation

Obtaining the List of Automatic Image Replication Tasks

hcloud SWR ShowSyncJob

Obtain information required for an image replication task.

Go debug

Obtaining the List of Automatic Image Replication Tasks

hcloud SWR ListImageAutoSyncReposDetails

Obtain all automatic image replication tasks of a repository.

Go debug

Creating an Automatic Image Replication Task

hcloud SWR CreateImageSyncRepo

Create an automatic image replication task. New images and image updates can be automatically replicated between regions. Existing images must be manually replicated. For details, see Manually Replicating Images.

Go debug

Deleting an Automatic Image Replication Task

hcloud SWR DeleteImageSyncRepo

Delete a specified automatic image replication task based on the target region and organization.

Go debug

Manually Replicating Images

hcloud SWR CreateManualImageSyncRepo

Existing images must be manually replicated. Check whether image replication succeeded using the following two ways: 1. If the response status code is 200 and no errors are reported, the image replication succeeded. 2. Use the SWR console or call the API of querying image repository information, if the replicated image tag exists in the target organization of the target region, the image replication succeeded.

Go debug

Obtain the list of regions where image synchronization is available.

hcloud SWR ListSyncRegions

Obtain the list of regions where image synchronization is available. You can manually synchronize images or configure automatic image synchronization to the regions returned by this API.

Go debug

Trigger Management

API Name

Command

Description

Operation

Creating a Trigger

hcloud SWR CreateTrigger

Create a trigger.

Go debug

Obtaining the Trigger List of a Specific Image Repository

hcloud SWR ListTriggersDetails

Obtain the trigger list of a specific image repository.

Go debug

Deleting a Trigger

hcloud SWR DeleteTrigger

Delete a trigger.

Go debug

Obtaining Information About a Trigger

hcloud SWR ShowTrigger

Obtain information about a trigger.

Go debug

Updating Trigger Settings

hcloud SWR UpdateTrigger

Update trigger settings.

Go debug

Image Retention Policy Management

API Name

Command

Description

Operation

Adding an Image Retention Policy

hcloud SWR CreateRetention

Add an image retention policy.

Go debug

Obtaining the List of Image Retention Policies

hcloud SWR ListRetentions

Obtain the list of image retention policies.

Go debug

Deleting an Image Retention Policy

hcloud SWR DeleteRetention

Delete an image retention policy.

Go debug

Obtaining an Image Retention Policy Record

hcloud SWR ShowRetention

Obtain the records of image retention policies.

Go debug

Modifying an Image Retention Policy

hcloud SWR UpdateRetention

Modify an image retention policy.

Go debug

Obtaining Image Retention Records

hcloud SWR ListRetentionHistories

Obtain image retention records.

Go debug

Temporary Login Command

API Name

Command

Description

Operation

Generating a Temporary Login Command

hcloud SWR CreateSecret

Generate a temporary login command using the value of **X-Swr-Dockerlogin** in the response header and the value of **host** in the response body.

Go debug

Generating Enhanced Login Instructions (New)

hcloud SWR CreateAuthorizationToken

This API is invoked to obtain the value of X-Swr-Dockerlogin in the response message header and the value of host in the response message body to generate an enhanced login command, Note: This API can be invoked only on the new IAM plane.

Go debug

Quota Management

API Name

Command

Description

Operation

Obtaining Quota Information

hcloud SWR ListQuotas

Obtain quota information.

Go debug

Other

API Name

Command

Description

Operation

Querying Service Feature Status

hcloud SWR ShowShareFeatureGates

Querying Service Feature Status

Go debug

Querying Tenant Resource Statistics

hcloud SWR ShowDomainResourceReports

Querying Tenant Resource Statistics

Go debug

Querying the Tenant Resource Overview

hcloud SWR ShowDomainOverview

Querying the Tenant Resource Overview

Go debug

Create the agency

hcloud SWR CreateAgency

When you use SWR for the first time, an agency for SWR will be created. This API is called by the console, and you do not need to call it.

Go debug

Check if an agency has been created.

hcloud SWR CheckAgency

Check if you have authorized SWR to invoke CCE and CCI through the trigger function. This API is called by the console, and you do not need to call it.

Go debug