分页查询集群列表

接口URL

/api/v1/cluster/tidbs/page

请求方式

POST

Content-Type

application/json

认证方式

Bearer auth

请求Body参数

{
    "Filter": {
        "Alias": "test"
    },
    "Conditions": [
        {
            "Field": "Status",
            "Sign": "LIKE",
            "Value": "%ing%"
        }
    ],
    "CurrentPage": 3,
    "PageSize": 10
}
参数名 示例值 参数类型 是否必填 参数描述
Filter - Object 和返回的结构体是一样的,字段直接用于匹配。
Filter.Alias test String 集群别名,可自定义,可重复
Conditions - Array 扩展条件,可支持大于小于,LIKE IN 等。条件使用and拼接
Conditions.Field Status String 字段需和返回信息的结构体字段一致。
Conditions.Sign LIKE String 判断符
Conditions.Value %ing% String -
CurrentPage 3 Integer 当前页
PageSize 10 Integer -

成功响应示例

{
    "Data": {
        "List": [
            {
                "Alias": "tidb-4ef6d213f0d03263",
                "Arch": "aarch64",
                "Version": "v7.1.1-0",
                "Model": "share",
                "Platform": "tiup",
                "ClusterID": "tidb-e6fbbdd6f4b0affc",
                "TaskID": "",
                "Status": "running",
                "Control": "",
                "Abstract": {
                    "Resource": {
                        "CPU": 14,
                        "Memory": 14
                    },
                    "ComponentSize": {
                        "alertManager": 1,
                        "grafana": 1,
                        "monitor": 1,
                        "pd": 1,
                        "tidb": 1,
                        "tiflash": 1,
                        "tikv": 1
                    }
                },
        "Labels": ["beijing", "prod"],
                "CreatedAt": "2023-09-22T15:59:59.031+08:00",
                "Creator": "admin"
            }
        ],
        "CurrentPage": 1,
        "PageSize": 10,
        "Total": 1,
        "Pages": 1
    },
    "Success": true
}
参数名 示例值 参数类型 参数描述
Data - Object
Data.List - Array
Data.List.Alias tidb-4ef6d213f0d03263 String
Data.List.Arch aarch64 String
Data.List.Version v7.1.1-0 String
Data.List.Model share String
Data.List.Platform tiup String
Data.List.ClusterID tidb-e6fbbdd6f4b0affc String
Data.List.TaskID - String
Data.List.Status running String
Data.List.Control - String
Data.List.Abstract - Object
Data.List.Abstract.
Resource
- Object
Data.List.Abstract.
Resource.CPU
14 Integer
Data.List.Abstract.
Resource.Memory
14 Integer
Data.List.Abstract.
ComponentSize
- Object
Data.List.Abstract.
ComponentSize.alertManager
1 Integer
Data.List.Abstract.
ComponentSize.grafana
1 Integer
Data.List.Abstract.
ComponentSize.monitor
1 Integer
Data.List.Abstract.
ComponentSize.pd
1 Integer
Data.List.Abstract.
ComponentSize.tidb
1 Integer
Data.List.Abstract.
ComponentSize.tiflash
1 Integer
Data.List.Abstract.
ComponentSize.tikv
1 Integer
Data.List.CreatedAt 2023-09-22T15:59:59.031+08:00 String
Data.List.Labels ["beijing", "prod"] Array 自定义标签
Data.List.Creator admin String
Data.CurrentPage 1 Integer
Data.PageSize 10 Integer
Data.Total 1 Integer
Data.Pages 1 Integer
Success true Boolean 调用是否成功
© 2024 平凯星辰(北京)科技有限公司 all right reserved,powered by GitbookFile Modify: 2024-04-02 15:37:04

results matching ""

    No results matching ""