百度智能云

All Product Document

          Cloud Container Engine

          Image Related Interface

          Create Image Repository User

          Description

          Create image repository user.

          Request structure

          POST /v1/image/user HTTP/1.1 
          Host: cce.bj.agilecloud.com 
          Authorization: authorization string 

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Parameter name Type Required or not Parameter position Description
          username String Yes RequestBody parameter User name
          password String Yes RequestBody parameter User password
          passwordConfirmation String Yes RequestBody parameter Repeat password

          Return header

          There are no other special headers except the public headers.

          Return parameter

          No return value.

          Request example

          POST /v1/image/user  HTTP/1.1 
          Host: cce.bj.agilecloud.com 
          ContentType: application/json 
          Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2019-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de 
          { 
              "username": "ccetest", 
              "password": "passwd@123", 
              "passwordConfirmation": "passwd@123" 
          } 

          Return example

          HTTP/1.1 200 OK     
          x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50     
          Date: Thu, 16 Mar 2019 06:29:48 GMT    
          Content Type: application/json;charset=UTF-8     
          Server: BWS 

          Get Image Repository User

          Description

          Get image repository user.

          Request structure

          GET /v1/image/user   HTTP/1.1   
          Host: cce.bj.agilecloud.com      
          Authorization: authorization string 

          Request header

          There are no other special headers except the public headers.

          Request parameter

          No request parameters.

          Return header

          There are no other special headers except the public headers.

          Return parameter

          Parameter name Type Description
          username String Image repository user name
          createTime Timestamp Image repository user creation time
          updateTime TImestamp Image repository user update time

          Request example

          GET /v1/image/user HTTP/1.1   
          Host: cce.bj.agilecloud.com     
          ContentType: application/json     
          Authorization: bce auth v1/f81d3b34e48048fbb2634dc7882d7e21/2019 03 11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de 

          Return example

          HTTP/1.1 200 OK     
          x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50     
          Date: Thu, 16 Mar 2019 06:29:48 GMT    
          Content Type: application/json;charset=UTF-8     
          Server: BWS        
          { 
              "username": "ccetest", 
              "createTime": "2019-07-13T06:04:16Z", 
              "updateTime": "2019-07-21T03:55:46Z" 
          } 

          Update Image Repository User Password

          Description

          Update image repository user password.

          Request structure

          PUT /v1/image/user   HTTP/1.1   
          Host: cce.bj.agilecloud.com      
          Authorization: authorization string 

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Parameter name Type Required or not Parameter position Description
          username String Yes RequestBody parameter User name (4-30 English lowercase letters and numbers)
          password String Yes RequestBody parameter User password
          passwordConfirmation String Yes RequestBody parameter Repeat the password (the password requires more than 8 digits, and must contain numbers, letters and such symbol such as! @#$%^*())

          Return header

          There are no other special headers except the public headers.

          Return parameter

          None

          Request example

          PUT /v1/image/user  HTTP/1.1 
          Host: cce.bj.agilecloud.com 
          ContentType: application/json 
          Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2019-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de 
          { 
              "username": "ccetest", 
              "password": "passwd@123", 
              "passwordConfirmation": "passwd@1123" 
          } 

          Return example

          HTTP/1.1 200 OK     
          x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50     
          Date: Thu, 16 Mar 2019 06:29:48 GMT    
          Content Type: application/json;charset=UTF-8     
          Server: BWS 

          Create Namespace

          Description

          Create namespace.

          Request structure

          POST /v1/image/namespace   HTTP/1.1   
          Host: cce.bj.agilecloud.com      
          Authorization: authorization string 

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Parameter name Type Required or not Parameter position Description
          username String Yes RequestBody parameter User name (4-30 English lowercase letters and numbers)
          namespace String Yes RequestBody parameter Domain of the image
          isPublic boolean Yes RequestBody parameter Public namespace or not
          notificationUrl String No RequestBody parameter Mirror callback address URL

          Return header

          There are no other special headers except the public headers.

          Return parameter

          No return value.

          Request example

          POST /v1/image/namespace  HTTP/1.1 
          Host: cce.bj.agilecloud.com 
          ContentType: application/json 
          Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2019-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de 
          { 
              "username": "ccetest", 
              "namespace": "namespace-bj", 
              "isPublic": "false" 
          } 

          Return example

          HTTP/1.1 200 OK     
          x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50     
          Date: Thu, 16 Mar 2019 06:29:48 GMT    
          Content Type: application/json;charset=UTF-8     
          Server: BWS 

          Get Namespace List Based on User Name

          Description

          Get namespace list based on user name.

          Request structure

          GET /v1/image/namespace?user={user}   HTTP/1.1   
          Host: cce.bj.agilecloud.com      
          Authorization: authorization string 

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Parameter name Type Required or not Parameter position Description
          marker String No Query parameter namespace name value flag page start point
          maxKeys String No Query parameter Default number of entries per page 1000
          user String Yes Query parameter Image repository user name

          Return header

          There are no other special headers except the public headers.

          Return parameter

          Parameter name Type Description
          marker String It marks the queried starting position.
          isTruncated boolean True means there are additional data in the following pages and false means the current page is the last page.
          nextMarker String The marker value requiring to be passed in order to acquire the next page. The domain doesn't appear when isTruncated is false.
          maxKeys Integer Maximum number contained in each page.
          namespaces List<Namespace> Result of namespace list, where the description of namespace is shown in Appendix.

          Request example

          GET /v1/image/namespace?user=ccetest {'user': 'ccetest'} HTTP/1.1 
          Host: cce.bj.agilecloud.com 
          ContentType: application/json 
          Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2019-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de 

          Return example

          HTTP/1.1 200 OK     
          x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50     
          Date: Thu, 16 Mar 2019 06:29:48 GMT    
          Content Type: application/json;charset=UTF-8     
          Server: BWS 
          { 
              "marker": "", 
              "isTruncated": false, 
              "nextMarker": null, 
              "maxKeys": 1000, 
              "namespaces": [ 
                  { 
                      "name": "test_ns", 
                      "createTime": "2019-07-24T15:11:00Z", 
                      "repositoryNum": 0, 
                      "isPublic": false, 
                      "notificationUrl": null 
                  } 
              ] 
          } 

          Check if a Namespace Exists

          Description

          Check if a namespace exists.

          Request structure

          GET  /v1/image/namespace/{namespace}   HTTP/1.1   
          Host: cce.bj.agilecloud.com      
          Authorization: authorization string 

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Parameter name Type Required or not Parameter position Description
          namespace String Yes URL parameter Namespace

          Return header

          There are no other special headers except the public headers.

          Return parameter

          Parameter name Type Description
          namespace String Namespace
          isPublic String Is it public?
          user String User name

          No return value.

          Request example

          GET /v1/image/namespace/namespace-bj HTTP/1.1   
          Host: cce.bj.agilecloud.com     
          ContentType: application/json     
          Authorization: bce auth v1/f81d3b34e48048fbb2634dc7882d7e21/2019 03 11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de 

          Return example

          HTTP/1.1 200 OK     
          x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50     
          Date: Thu, 16 Mar 2019 06:29:48 GMT    
          Content Type: application/json;charset=UTF-8     
          Server: BWS      
          { 
              "namespace": "namespace-bj", 
              "isPublic": "false", 
              "user": "ccetest" 
          } 

          Delete Namespace

          Description

          Delete namespace.

          Request structure

          DELETE /v1/image/namespace/{namespace}   HTTP/1.1   
          Host: cce.bj.agilecloud.com      
          Authorization: authorization string 

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Parameter name Type Required or not Parameter position Description
          namespace String Yes URL parameter Namespace

          Return header

          There are no other special headers except the public headers.

          Return parameter

          No return value.

          Request example

          DELETE /v1/image/namespace/namespace-bj HTTP/1.1   
          Host: cce.bj.agilecloud.com     
          ContentType: application/json     
          Authorization: bce auth v1/f81d3b34e48048fbb2634dc7882d7e21/2019 03 11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de 

          Return example

          HTTP/1.1 200 OK     
          x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50     
          Date: Thu, 16 Mar 2019 06:29:48 GMT    
          Content Type: application/json;charset=UTF-8     
          Server: BWS 

          Get Image List Based on User Name

          Description

          Get image list based on user name.

          Request structure

          GET  /v1/image?user={user}   HTTP/1.1   
          Host: cce.bj.agilecloud.com      
          Authorization: authorization string 

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Parameter name Type Required or not Parameter position Description
          marker String No Query parameter Flag page start point
          maxKeys Integer No Query parameter Number of entries per page, default 1000
          user String Yes Query parameter Image repository user name

          Return header

          There are no other special headers except the public headers.

          Return parameter

          Parameter name Type Description
          marker String It marks the queried starting position.
          isTruncated boolean True means there are additional data in the following pages and false means the current page is the last page.
          nextMarker String The marker value requiring to be passed in order to acquire the next page. The domain doesn't appear when isTruncated is false.
          maxKeys Integer Maximum number contained in each page.
          images List<Image> Image specific information, where image description is shown in Appendix.

          Request example

          GET /v1/image?user=ccetest  HTTP/1.1 
          Host: cce.bj.agilecloud.com 
          ContentType: application/json 
          Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2019-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de 

          Return example

          HTTP/1.1 200 OK     
          x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50     
          Date: Thu, 16 Mar 2019 06:29:48 GMT    
          Content Type: application/json;charset=UTF-8     
          Server: BWS 
          { 
              "marker": "", 
              "isTruncated": false, 
              "nextMarker": null, 
              "maxKeys": 1000, 
              "images": [ 
                  { 
                      "imageMeta": { 
                          "namespace": "jpaas-public", 
                          "repository": "alertmanager", 
                          "tag": "v0.14.0-backup", 
                          "description": "jpaas-public/alertmanager" 
                      }, 
                      "createTime": "2019-05-13T15:56:53Z", 
                      "address": "hub.agilecloud.com/jpaas-public/alertmanager:v0.14.0-backup", 
                      "isPublic": true 
                  } 
              ] 
          } 

          Add New Image Metadata

          Description

          Add new image metadata.

          Request structure

          POST /v1/image/meta   HTTP/1.1   
          Host: cce.bj.agilecloud.com      
          Authorization: authorization string 

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Parameter name Type Required or not Parameter position Description
          imageMetaRequest ImageMeta Yes RequestBody parameter Add image metadata

          Return header

          There are no other special headers except the public headers.

          Return parameter

          No return value.

          Request example

          POST /v1/image/meta HTTP/1.1   
          Host: cce.bj.agilecloud.com     
          ContentType: application/json     
          Authorization: bce auth v1/f81d3b34e48048fbb2634dc7882d7e21/2019 03 11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de        
          { 
              "imageMeta": { 
                  "namespace": "production-nn", 
                  "repository": "test_image", 
                  "tag": "1.0.2", 
                  "description": "description of image" 
              } 
          } 

          Return example

          HTTP/1.1 200 OK     
          x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50     
          Date: Thu, 16 Mar 2019 06:29:48 GMT    
          Content Type: application/json;charset=UTF-8     
          Server: BWS 

          Delete Image Metadata

          Description

          Delete image metadata.

          Request structure

          DELETE /v1/image/meta   HTTP/1.1   
          Host: cce.bj.agilecloud.com      
          Authorization: authorization string 

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Parameter name Type Required or not Parameter position Description
          namespace String Yes RequestBody parameter Namespace
          repository String Yes RequestBody parameter Repository
          tag String Yes RequestBody parameter Tag

          Return header

          There are no other special headers except the public headers.

          Return parameter

          No return value.

          Request example

          DELETE /v1/image/meta HTTP/1.1   
          Host: cce.bj.agilecloud.com     
          ContentType: application/json     
          Authorization: bce auth v1/f81d3b34e48048fbb2634dc7882d7e21/2019 03 11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de        
          { 
              "namespace": "production-nn", 
              "repository": "test_imagessss", 
              "tag": "1.0.2" 
          } 

          Return example

          HTTP/1.1 200 OK     
          x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50     
          Date: Thu, 16 Mar 2019 06:29:48 GMT    
          Content Type: application/json;charset=UTF-8     
          Server: BWS 

          Check If a Image Metadata Exists

          Description

          Check if a image metadata exists.

          Request structure

          GET /v1/image/meta   HTTP/1.1   
          Host: cce.bj.agilecloud.com      
          Authorization: authorization string 

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Parameter name Type Required or not Parameter position Description
          namespace String Yes RequestBody parameter Namespace
          repository String Yes RequestBody parameter Repository
          tag String Yes RequestBody parameter Tag

          Return header

          There are no other special headers except the public headers.

          Return parameter

          Parameter name Type Description
          namespace String Namespace
          repository String Repository
          tag String Tag
          user String User

          No return value.

          Request example

          GET /v1/image/meta HTTP/1.1   
          Host: cce.bj.agilecloud.com     
          ContentType: application/json     
          Authorization: bce auth v1/f81d3b34e48048fbb2634dc7882d7e21/2019 03 11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de        
          { 
              "namespace": "production-nn", 
              "repository": "test_imagessss", 
              "tag": "1.0.2" 
          } 

          Return example

          HTTP/1.1 200 OK     
          x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50     
          Date: Thu, 16 Mar 2019 06:29:48 GMT    
          Content Type: application/json;charset=UTF-8     
          Server: BWS      
          { 
              "namespace": "namespace-bj", 
              "repository": "repo-bj", 
              "tag": "1.0.2", 
              "user": "ccetest" 
          } 

          Query All Versions of the Specified Image

          Description

          Query a list of all versions with permission to mirror.

          Request structure

           GET /v1/image/tags   HTTP/1.1   
            Host: cce.bj.agilecloud.com      
            Authorization: authorization string 

          Request header

          There are no other special headers except the public headers.

          Request parameter

          Parameter name Type Required or not Parameter position Description
          namespace String Yes Query parameter Namespace
          repository String Yes Query parameter Repository

          Return header

          There are no other special headers except the public headers.

          Return parameter

          Parameter name Type Description
          namespace String Namespace
          repository String Repository
          tags List<ImageDetails> The tag list of image tags, where the description of ImageDetails is shown in the appendix

          Request example

            GET /v1/image/tags HTTP/1.1   
             Host: cce.bj.agilecloud.com     
             ContentType: application/json     
             Authorization: bce auth v1/f81d3b34e48048fbb2634dc7882d7e21/2019 03 11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de        

          Return example

          HTTP/1.1 200 OK     
          x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50     
          Date: Thu, 16 Mar 2019 06:29:48 GMT    
          Content Type: application/json;charset=UTF-8     
          Server: BWS 
          
          { 
              "namespace": "agile-public", 
              "repository": "nginx", 
              "tags": [ 
                  { 
                      "name": "stable", 
                      "digest": "sha256:3fda617a14130bef80244f97ebe174dcf4ef575fa55afeec8e17145add594908", 
                      "description": "agile-public/nginx", 
                      "created_at": "2018-12-12T12:06:16.000+08:00",
                      "updated_at": "2018-12-12T12:06:16.000+08:00"
                  } 
              ] 
          } 
          Previous
          Cluster Related Interface
          Next
          Appendix