Namespace APIs
Retrieve namespace list
API description
Return the queried namespace list
Permission description
The Access Key and request signature mechanism are uniformly adopted for all API security authentication. Access Key consists of an Access Key ID and a Secret Access Key, both of which are strings. For each HTTP request, use the algorithm described by the API below to generate an authentication string. Submit the certification string in the Authorization header. The server verifies the correctness of the authentication string based on the generation algorithm. The certification string format is bce-auth-v{version}/{accessKeyId}/{timestamp}/{expirationPeriodInSeconds}/{signedHeaders}/{signature}.
- The version is a positive integer.
- The timestamp refers to the UTC time when the signature is created.
- The expirationPeriodInSeconds specifies the duration during which the signature remains valid.
- SignedHeaders includes the list of headers involved in the signature algorithm. The headers are separated by semicolons (e.g., host;x-bce-date) and arranged in lexicographical order. (This API signature involves only the host and x-bce-date headers.)
- The signature is a 256-bit signature represented as a 64-character lowercase hexadecimal digest.
When Baidu AI Cloud receives a user's request, the system uses the same SK and certification mechanism to generate a certification string. This string is then compared with the one included in the user's request. If the two match, the system confirms the user has the required permissions and proceeds with the operation. If they differ, the system cancels the operation and returns an error code.
For detailed information on the authentication mechanism, please refer to [Authentication](Reference/Authentication mechanism/Introduction.md).
Request structure
1GET /v1/ccr/projects HTTP/1.1
2Host: ccr.baidubce.com
3Authorization: authorization string
4x-bce-date:yyyy-MM-dd'T'HH:mm:ss'Z'
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| keyword | String | No | Query | Query keyword |
| keywordType | String | No | Query | Query keyword types, currently only supporting name |
| order | String | No | Query | Sort order, and support asc, desc |
| orderBy | String | No | Query | Sort fields, and support repositoryId, repositoryName, projectName, updateTime, tagsCount and createTime (default) |
| pageNo | int | No | Query | Current page |
| pageSize | int | No | Query | Records count per page, maximum 100 |
Response headers
There are no special headers required beyond the common headers.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| result | List | Result list |
| order | String | Sorting method |
| orderBy | String | Sorting field |
| pageNo | int | Current page |
| pageSize | int | Records count per page |
| totalCount | int | Total records |
| type | String | Types |
| projectId | Long | Namespace ID |
| projectName | String | Namespace name |
| repoCount | int | Image count |
| chartCount | int | chart count |
| createTime | String | Creation time |
| updateTime | String | Update time |
Error codes
| Error code | Error description | HTTP status code | Chinese explanation |
|---|---|---|---|
| Internal server error | Failed to generate CCR resource. | 500 | Internal error |
Request example
1 GET /v1/ccr/projects HTTP/1.1
2 Host: ccr.baidubce.com
3 Authorization: bce-auth-v1/123456/2020-03-05T09:29:21Z/1800/host/0a859ce949951fe15a4eb6874a9765f9e8a6f7147f206cf47e270c34c862b8c6
4 x-bce-date:2020-03-05T09:31:19Z
Response example
1{
2 "result": [
3 {
4 "projectId": 1001,
5 "projectName": "test1",
6 "type": "private",
7 "repoCount": 0,
8 "chartCount": 0,
9 "createTime": "2020-02-14T11:01:49Z",
10 "updateTime": "2020-02-14T11:01:49Z"
11 },
12 {
13 "projectId": 1002,
14 "projectName": "test2",
15 "type": "private",
16 "repoCount": 0,
17 "chartCount": 0,
18 "createTime": "2020-02-20T08:12:37Z",
19 "updateTime": "2020-02-20T08:12:37Z"
20 },
21 {
22 "projectId": 1003,
23 "projectName": "test3",
24 "type": "public",
25 "repoCount": 1,
26 "chartCount": 0,
27 "createTime": "2020-02-26T04:21:37Z",
28 "updateTime": "2020-02-26T04:21:37Z"
29 },
30 {
31 "projectId": 1004,
32 "projectName": "test4",
33 "type": "private",
34 "repoCount": 0,
35 "chartCount": 0,
36 "createTime": "2020-03-02T08:17:18Z",
37 "updateTime": "2020-03-02T08:17:18Z"
38 },
39 {
40 "projectId": 1005,
41 "projectName": "test5",
42 "type": "private",
43 "repoCount": 0,
44 "chartCount": 0,
45 "createTime": "2020-03-05T11:12:47Z",
46 "updateTime": "2020-03-05T11:12:47Z"
47 }
48 ],
49 "orders": null,
50 "orderBy": "name",
51 "order": "asc",
52 "pageNo": 1,
53 "pageSize": 100,
54 "totalCount": 5
55}
Retrieve namespace member list
API description
Return the namespace member list
Permission description
The Access Key and request signature mechanism are uniformly adopted for all API security authentication. Access Key consists of an Access Key ID and a Secret Access Key, both of which are strings. For each HTTP request, use the algorithm described by the API below to generate an authentication string. Submit the certification string in the Authorization header. The server verifies the correctness of the authentication string based on the generation algorithm. The certification string format is bce-auth-v{version}/{accessKeyId}/{timestamp}/{expirationPeriodInSeconds}/{signedHeaders}/{signature}.
- The version is a positive integer.
- The timestamp refers to the UTC time when the signature is created.
- The expirationPeriodInSeconds specifies the duration during which the signature remains valid.
- SignedHeaders includes the list of headers involved in the signature algorithm. The headers are separated by semicolons (e.g., host;x-bce-date) and arranged in lexicographical order. (This API signature involves only the host and x-bce-date headers.)
- The signature is a 256-bit signature represented as a 64-character lowercase hexadecimal digest.
When Baidu AI Cloud receives a user's request, the system uses the same SK and certification mechanism to generate a certification string. This string is then compared with the one included in the user's request. If the two match, the system confirms the user has the required permissions and proceeds with the operation. If they differ, the system cancels the operation and returns an error code.
For detailed information on the authentication mechanism, please refer to [Authentication](Reference/Authentication mechanism/Introduction.md).
Request structure
1 GET /v1/ccr/projects/{projectId}/members HTTP/1.1
2 Host: ccr.baidubce.com
3 Authorization: authorization string
4 x-bce-date:yyyy-MM-dd'T'HH:mm:ss'Z'
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| projectId | Long | Yes | URL parameter | Namespace ID |
| keyword | String | No | Query | Query keyword |
| keywordType | String | No | Query | Query keyword types, currently only supporting name |
| order | String | No | Query | Sort order, and support asc, desc |
| orderBy | String | No | Query | Sort fields, and support repositoryId, repositoryName, projectName, updateTime, tagsCount and createTime (default) |
| pageNo | int | No | Query | Current page |
| pageSize | int | No | Query | Records count per page, maximum 100 |
Delete namespace
API description
Delete specified namespace
Permission description
The Access Key and request signature mechanism are uniformly adopted for all API security authentication. Access Key consists of an Access Key ID and a Secret Access Key, both of which are strings. For each HTTP request, use the algorithm described by the API below to generate an authentication string. Submit the certification string in the Authorization header. The server verifies the correctness of the authentication string based on the generation algorithm. The certification string format is bce-auth-v{version}/{accessKeyId}/{timestamp}/{expirationPeriodInSeconds}/{signedHeaders}/{signature}.
- The version is a positive integer.
- The timestamp refers to the UTC time when the signature is created.
- The expirationPeriodInSeconds specifies the duration during which the signature remains valid.
- SignedHeaders includes the list of headers involved in the signature algorithm. The headers are separated by semicolons (e.g., host;x-bce-date) and arranged in lexicographical order. (This API signature involves only the host and x-bce-date headers.)
- The signature is a 256-bit signature represented as a 64-character lowercase hexadecimal digest.
When Baidu AI Cloud receives a user's request, the system uses the same SK and certification mechanism to generate a certification string. This string is then compared with the one included in the user's request. If the two match, the system confirms the user has the required permissions and proceeds with the operation. If they differ, the system cancels the operation and returns an error code.
For detailed information on the authentication mechanism, please refer to [Authentication](Reference/Authentication mechanism/Introduction.md).
Request structure
1DELETE /v1/ccr/projects/{projectId} HTTP/1.1
2Host: ccr.baidubce.com
3Authorization: authorization string
4x-bce-date:yyyy-MM-dd'T'HH:mm:ss'Z'
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| projectId | Long | Yes | URL parameter | Namespace ID |
Response headers
There are no special headers required beyond the common headers.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| action | String | Check action |
| targetName | String | Namespace ID |
Error codes
| Error code | Error description | HTTP status code | Chinese explanation |
|---|---|---|---|
| Internal server error | Failed to generate CCR resource. | 500 | Internal error |
Request example
1DELETE /v1/ccr/projects/1 HTTP/1.1
2Host: ccr.baidubce.com
3Authorization: authorization string
4x-bce-date:yyyy-MM-dd'T'HH:mm:ss'Z
Response example
1{
2 "action": "delete",
3 "targetName": 1
4}
