Querying a List of Deployments
Function
This API is used to query a list of Deployments.
URI
GET /v2/{project_id}/edgemgr/deployments?{name=xxx,limit=xxx,offset=xxx}
| Parameter | Mandatory | Description |
|---|---|---|
| project_id | Yes | Project ID. For details about how to obtain a project ID, see Obtaining a Project ID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| limit | No | String | Number of records displayed per page. |
| offset | No | String | Start position for a query. |
| name | No | String | Deployment name. |
| node_id | No | String | Node ID. |
| tags | No | String | The key and value of a tag are separated by dots (.), and multiple tags are separated by commas (,). For example, tags=key1.value1,key2.value2. |
- If no query parameter is specified, all instances of an account are returned.
- tags can be used with other parameters for a compound query.
Request
None
Response
| Parameter | Type | Description |
|---|---|---|
| deployments | Array of Table 18 objects | Deployment list. |
| count | Integer | Number of Deployments that meet the conditions. |
Response example:
{
"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": ""
}
]
} Error Codes
For details, see Error Codes.
Last Article: Querying Details About a Deployment
Next Article: Deleting a Deployment
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.