查询应用部署列表
功能介绍
该API用于查询应用部署列表。
URI
GET /v2/{project_id}/edgemgr/deployments?{name=xxx,limit=xxx,offset=xxx}
|
名称 |
是否必选 |
说明 |
|---|---|---|
|
project_id |
是 |
项目ID,获取方法请参见获取项目ID。 |
|
名称 |
是否必选 |
参数类型 |
说明 |
|---|---|---|---|
|
limit |
否 |
String |
每页显示的条目数量 |
|
offset |
否 |
String |
查询的起始位置 |
|
name |
否 |
String |
deployment的名称 |
|
node_id |
否 |
String |
节点ID |
|
tags |
否 |
String |
标签的key和value通过点连接,多个标签通过逗号连接,如:tags=key1.value1,key2.value2 |
- 如果不携带任何检索参数,将返回该租户的所有实例信息。
- tags可以和多个其他检索参数同时生效。
请求消息
|
参数 |
是否必选 |
类型 |
描述 |
|---|---|---|---|
|
Content-Type |
是 |
String |
消息体的类型(格式) 推荐您使用默认值application/json。 |
|
X-Auth-Token |
是 |
String |
用户Token 调用接口的认证方式分为Token和AK/SK两种,如果您使用Token方式,此参数为必填,请填写Token的值,获取方式请参见Token认证。 |
响应示例
{
"count": 1,
"deployments": [
{
"created_at": "2020-05-30 09:42:49.055868 +0000 UTC",
"replicas": 1,
"description": "",
"group_id": "",
"group_name": "",
"id": "7a7ffbc6-a247-4898-a24b-4020226978c5",
"name": "e-deployment-auto-qe77",
"project_id": "e78acc02d9d141eda5ca8e88fa35f6f8",
"updated_at": "2020-05-30 09:42:49.132984 +0000 UTC",
"instances": [
{
"id": "12429567-c9dd-4ad7-8a6b-0b1eabf7cef0",
"node_id": "f73b8f40-237a-4994-94ec-e58d4db882b3",
"name": "e-deployment-auto-qe77-65f6c67d7-zptfx",
"image_url": "test-app:latest",
"version": "latest",
"configs": {
"host_network": false,
"restart_policy": "Always",
"privileged": false
},
"envs": [],
"volumes": [],
"message": "",
"state": "RUNNING",
"liveness_probe": {
"initial_delay_seconds": 30,
"timeout_seconds": 60,
"http_get": {
"path": "/",
"port": 80,
"scheme": "HTTP"
}
},
"readiness_probe": {
"initial_delay_seconds": 30,
"timeout_seconds": 60,
"http_get": {
"path": "/",
"port": 80,
"scheme": "HTTP"
}
},
"resources": {
},
"reason": "",
"is_ready": "ABNORMAL",
"restarts": 0
}
],
"visibility": ""
}
]
}
错误码
请参见错误码。