Updated on 2024-02-23 GMT+08:00

API Overview

You can query information about organizations, image repositories, and images, and manage organizations, image repositories, and images by using APIs provided by SWR.

Organization Management

API

Description

Creating an Organization

Creates an organization.

Deleting an Organization

Deletes an organization.

Querying the List of Organizations

Queries the list of organizations.

Obtaining Organization Details

Queries the details of an organization, including its ID, name, creator, and user permissions.

Image Repository Management

API

Description

Creating an Image Repository in an Organization

Creates an image repository in an organization.

Deleting an Image Repository in an Organization

Deletes an image repository in an organization.

Updating the Brief Information on an Image Repository

Updates the brief information on an image repository in an organization, including the category, is_public, and description.

Querying the Brief Information on an Image Repository

Queries the brief information on an image repository in an organization, including the image's repository ID, organization ID, repository name, description of the repository, the creator and capacity of the repository, and the image pull address.

Querying the Image Repository List

Queries the image repository list.

Viewing the List of Shared Images

Views the list of shared images.

Image Tag Management

API

Description

Querying the List of Image Repository Tags

Queries all image tags of an image repository.

Deleting the Image with a Specified Tag

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

Shared Account Management

API

Description

Creating an Account Used for Image Sharing

Creates an account used for image sharing. You can share your private images with other users, granting them permissions to pull the images.

Deleting an Account Used for Image Sharing

Deletes an account used for image sharing.

Updating an Account Used for Image Sharing

Updates an account used for image sharing.

Checking the Existence of an Account Used for Image Sharing

Check whether an account used for image sharing exists.

Obtaining the List of Accounts Used for Image Sharing

Obtains the list of accounts used for image sharing.

API Version

API

Description

Querying All API Versions

Queries all available API versions of SWR.

Querying a Specific API Version

Query a specific API version of SWR.

Organization Permission Management

API

Description

Creating Organization Permissions

Grants permissions of an organization to certain users so that they can manage, edit, and read images from the organization.

Deleting Organization Permissions

Deletes the organization operation permissions of certain users.

Updating Organization Permissions

Updates the organization operation permission types for certain users.

Querying Organization Permissions

Queries organization permissions.

Image Permission Management

API

Description

Creating Image Permissions

Grants permissions of an image to certain users so that they can manage, edit, and read the image.

Deleting Image Permissions

Deletes the image operation permissions of certain users.

Updating Image Permissions

Updates the image operation permission types for certain users.

Querying Image Permissions

Queries image permissions.

Automatic Image Synchronization Task Management

API

Description

Obtaining Information About an Automatic Image Synchronization Task

Obtains information required for an image synchronization task.

Obtaining the List of Automatic Image Synchronization Tasks

Obtains all automatic image synchronization tasks of a repository.

Creating an Automatic Image Synchronization Task

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

Deleting an Automatic Image Synchronization Task

Deletes a specified automatic image synchronization task based on the target region and organization.

Manually Synchronizing an Image

Existing images must be manually synchronized. Check whether image synchronization succeeded using the following two ways:

  • If the response status code is 200 and no errors are reported, the image synchronization succeeded.
  • Use the SWR console or call the API of querying the brief information on an image repository, if the synchronized image tag exists in the target organization of the target region, the image synchronization succeeded.

Trigger Management

API

Description

Creating a Trigger

Creates a trigger.

Obtaining the Trigger List of a Specific Image Repository

Obtains the trigger list of a specific image repository.

Deleting a Trigger

Deletes a trigger.

Obtaining Information About a Trigger

Obtains information about a trigger.

Updating Trigger Settings

Updates the status of a trigger.

Image Retention Policy Management

API

Description

Adding an Image Retention Policy

Adds an image retention policy.

Obtaining the List of Image Retention Policy

Obtains the list of image retention policies.

Deleting an Image Retention Policy

Deletes an image retention policy.

Obtaining an Image Retention Policy Record

Obtains the records of image retention policies.

Modifying an Image Retention Policy

Modifies an image retention policy.

Obtaining Image Retention Records

Obtains image retention records.

Temporary Login Command

API

Description

Generating a Temporary Login Command

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

Quota Management

API

Description

Obtaining Quota Information

Obtains quota information.