获取notebook列表
功能介绍
获取notebook列表
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v1/{project_id}/eihealth-projects/{eihealth_project_id}/notebooks
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| eihealth_project_id | 是 | String | 平台项目ID,您可以在平台单击所需的项目名称,进入项目设置页面查看。 最小长度:1 最大长度:128 |
| project_id | 是 | String | 华为云项目ID,您可以从获取项目ID中获取。 最小长度:1 最大长度:128 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| limit | 否 | Integer | 读取条数 最小值:1 最大值:1000 缺省值:100 |
| name | 否 | String | notebook名称 最小长度:1 最大长度:200 |
| offset | 否 | Integer | 读取偏移量 最小值:0 最大值:100000000 缺省值:0 |
| status | 否 | String | notebook状态 |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| X-Auth-Token | 是 | String | 用户Token。Token认证就是在调用API的时候将Token加到请求消息头,从而通过身份认证,获得操作API的权限,获取Token接口响应消息头中X-Subject-Token的值即为Token。 最小长度:1 最大长度:32768 |
响应参数
状态码: 200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| count | Integer | notebook总数 |
| notebooks | Array of NotebookEntity objects | notebook详情列表 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| id | String | notebook ID |
| name | String | notebook名称 |
| description | String | notebook描述 |
| creator | String | notebook所属用户 |
| url | String | notebook访问URL |
| flavor | FlavorInfo object | notebook规格 |
| status | String | notebook状态 枚举值:
|
| image | NotebookImage object | notebook镜像信息 |
| storages | Array of NotebookStorage objects | notebook存储信息 |
| create_time | String | notebook创建时间 |
| update_time | String | notebook更新时间 |
| failed_message | String | notebook失败信息 |
| events | Array of TaskEventRsp objects | cce事件 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| cpu | Float | notebook占用的cpu,0.1核为100m,单位为"C" 最小值:1 最大值:128 缺省值:1 |
| gpu | Float | notebook占用的gpu,0.1为使用单卡10%,1为占满单个显卡,1+为使用多个显卡 最小值:0 最大值:16 缺省值:0 |
| memory | Float | notebook占用的内存,单位为"G" 最小值:2 最大值:512 缺省值:2 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| image_type | String | 镜像类型 枚举值:
|
| image_info | ImageInfo object | 镜像信息 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| source_project_name | String | 源项目名 最小长度:1 最大长度:128 |
| image_name | String | 镜像名 最小长度:1 最大长度:128 |
| image_tag | String | 镜像tag名 最小长度:1 最大长度:64 |
| profile | String | 系统镜像名 枚举值:
|
请求示例
获取notebook列表
https://eihealth.cn-north-4.myhuaweicloud.com/v1/{project_id}/eihealth-projects/{eihealth_project_id}/notebooks 响应示例
状态码: 200
OK
{
"count" : 1,
"notebooks" : [ {
"id" : "DE-7d558ef8-c73d-11ea-964c-0255ac100033",
"name" : "notebook-example",
"description" : "notebook description in here",
"creator" : "notebook_creator",
"url" : "https://0.0.0.0:0000/0951eb641.../notebook/e4a3b97a.../services/notebook",
"flavor" : {
"cpu" : "1",
"gpu" : "0",
"memory" : "100"
},
"status" : "Running",
"image" : {
"image_type" : "SYSTEM",
"image_info" : {
"source_project_name" : "eihealth-project",
"image_name" : "eihealth-notebook",
"image_tag" : "3.1.0-latest",
"profile" : "PY3"
}
},
"storages" : [ {
"path" : "project_name:/example",
"mount_path" : "/example"
} ],
"create_time" : "2020-09-10T10:07:17Z",
"update_time" : "2020-09-10T10:07:17Z",
"failed_message" : "failed massage in here"
} ]
} 状态码
| 状态码 | 描述 |
|---|---|
| 200 | OK |
错误码
请参见错误码。