You need to enable JavaScript to run this app.
导航
响应结果
最近更新时间:2023.10.13 14:33:20首次发布时间:2023.10.13 14:33:20

响应状态码

API 请求成功时,HTTP 响应状态码是 200。

API 请求失败时,会出现以下任意一个情况:

  • HTTP 响应状态码是 4xx 或 5xx。
  • 响应正文的 ResponseMetadata 结构体包含 Error 字段。

如果响应出现异常,响应正文的内容如下。此时您可根据 Error 结构体中的 CodeNCodeMessage 等提示信息排查问题原因。

API 请求成功的响应示例

{
    "ResponseMetadata": {
        "RequestId": "20230921203134511034E384BB822811ED",
        "Action": "GetOlapData",
        "Version": "2023-08-31",
        "Service": "cloud_detect",
        "Region": "cn-north-1"
    },
    "Result": [
        {
            "groups": [
                {
                    "key": "client.province.name",
                    "value": "\"山西\""
                }
            ],
            "measures": [
                {
                    "key": "success.proportion",
                    "value": "1.0425431069446676"
                }
            ]
        },
        {
            "groups": [
                {
                    "key": "client.province.name",
                    "value": "\"河北\""
                }
            ],
            "measures": [
                {
                    "key": "success.proportion",
                    "value": "23.14745390518418"
                }
            ]
        },
        {
            "groups": [
                {
                    "key": "client.province.name",
                    "value": "\"河南\""
                }
            ],
            "measures": [
                {
                    "key": "success.proportion",
                    "value": "58.575512148642204"
                }
            ]
        }
    ]
}

API 请求失败的响应示例

{
    "ResponseMetadata": {
        "RequestId": "20230922103026C1CCF76DCF84B3F04922",
        "Action": "GetOlapData",
        "Version": "2023-08-31",
        "Service": "cloud_detect",
        "Region": "cn-north-1",
        "Error": {
            "Code": "Bad Request",
            "Message": "invalid request, filed _elem2 not valid, field Key min_len rule failed, current value: 0"
        }
    }
}