Updated on 2024-12-12 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 Organizations

Queries the list of organizations.

Querying Details About an Organization

Queries details about 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 from 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 Image Repositories

Queries the image repository list.

Viewing Shared Images

Views the list of shared images.

Image Tag Management

API

Description

Querying Image Tags

Queries all image tags of an image repository.

Deleting an 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.

Querying Accounts Used for Image Sharing

Queries 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

Querying Details About an Automatic Image Synchronization Task

Queries details about an image synchronization task. You can use this API to check whether an image synchronization task is successful.

Querying Automatic Image Synchronization Tasks

Queries 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 Synchronizing Images.

Deleting an Automatic Image Synchronization Task

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

Manually Synchronizing Images

Existing images must be manually synchronized. Check whether image synchronization succeeded using either of the 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 Querying the Brief Information on an Image Repository API. 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.

Querying Triggers of a Specific Image Repository

Queries the trigger list of a specific image repository.

Deleting a Trigger

Deletes a trigger.

Querying Details About a Trigger

Queries details about a trigger.

Updating the Status of a Trigger

Updates the status of a trigger.

Image Retention Policy Management

API

Description

Creating an Image Retention Policy

Creates an image retention policy.

Querying Image Retention Policies

Queries the list of image retention policies.

Deleting an Image Retention Policy

Deletes an image retention policy.

Querying Image Retention Policy Records

Queries the records of image retention policies.

Modifying an Image Retention Policy

Modifies an image retention policy.

Querying Image Retention Records

Queries 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

Querying Quotas

Queries quota information.