Table of Contents maxLevel 2
...
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. |
projectName | string | yes | The name of project. | |
imageName | string | no | Image name for filtering result. |
...
Code Block | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
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 | [ ]string | yes | tags of image that needs to be removed | |
imageName | string | yes | name of image that needs to be removed |
...
Name | Type | Description |
---|---|---|
projectId | int | Project ID. |
projectName | string | The name of the project |
createTime | string | The creation time of the project. |
updateTime | string | The update time of the project. |
public | bool | The public status of the project. |
imageCount | int | The count of the images under this project. |
total | int | Total number of the projects. |
...
Name | Type | Required | Default | Description |
---|---|---|---|---|
projectName | string | yes | The name of project. | |
public | bool | yes | 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 |
---|---|---|---|---|
orderBy | string | 否no | id | orderBy allows sorting by id. |
order | string | 否no | desc | order sort: asc,desc |
businessName | string | 否no | The name of business for filtering result | |
page | int | 否no | 1 | The page number |
pageSize | int | 否no | 10 | The page size of per page |
...