Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel2

...

Repository Management

Get Images

GET /v1/repository/image

Description

List images of the specified project.

Parameters

Name

Type

Required

Default

Description

orderBy

string

no

id

OrderBy allows sorting by id.

order

string

no

desc

Sort order: asc, desc.

page

int

no

1

The page number.

pageSize

int

no

10

The size of per page, 0 for no limited.

projectNamestringyes
The name of project.
imageNamestringno
Image name for filtering result.

...

Code Block
collapsetrue
GET /v1/repository/image
Response:
{
    "data": [
        {
            "projectName": "test",
            "public": false,
            "imageName": "test/test-demo1",
            "imageAddress": "registry.dcdn.baidu.com/test/test-demo1",
            "createTime": 1551758321,
            "updateTime": 1551758321
        },
        {
            "projectName": "test2",
            "public": false,
            "imageName": "test2/test-demo2",
            "imageAddress": "registry.dcdn.baidu.com/test2/test-demo2",
            "createTime": 1551758321,
            "updateTime": 1551758321

        }
    ],
    "total": 2,
    "code": 200,
    "message": "success"
}

Get Tag of Image

GET /v1/repository/image/tag?imageName=[imageName]

Description

List tags under the specific image name.

...

Code Block
collapsetrue
GET /v1/repository/image/tag?imageName=test/demo1

{
    "data": [
        {
            "tag": "latest",
            "imageAddress": "registry.dcdn.baidu.com/test/test-demo1",
            "createTime": 1551758321,
            "updateTime": 1551758321
        },
        {
            "tag": "v1",
            "imageAddress": "registry.dcdn.baidu.com/test/test-demo1",
            "createTime": 1551758321,
            "updateTime": 1551758321

        }
    ],
    "total": 2,
    "code": 200,
    "message": "success"
}

Delete Image

DELETE /v1/repository/image

Description

Delete multiple images specified by name.

...

Delete Tag of Image

DELETE /v1/repository/image/tag

Description

Delete the image specified by name and tags.

Parameters

Name

Type

Required

Default

Description

tag

[ ]stringyes
tags of image that needs to be removed
imageNamestringyes
name of image that needs to be removed

...

Name

Type

Description

projectId

intProject ID.

projectName

stringThe name of the project

createTime

stringThe creation time of the project.

updateTime

stringThe update time of the project.
publicboolThe public status of the project.
imageCountintThe count of the images under this project.

total

intTotal number of the projects.

...

Name

Type

Required

Default

Description

projectNamestringyes
The name of project.
publicboolyes
The public status of the project.

Response code

Code

Description

201

Project created successfully.

400

Unsatisfied with constraints of the project creation.

401

User need to log in first.

409

Project name already exists.

415

The Media Type of the request is not supported, it has to be "application/json"

500

Unexpected internal errors.

...

Name

Type

Required

Default

Description

orderBystringno
id
orderBy allows sorting by id.
orderstringnodescorder sort: asc,desc
businessNamestringno
The name of business for filtering result
pageintno1The page number
pageSizeintno10The page size of per page

...