You need to enable JavaScript to run this app.
导航

MiniProGetFieldValues

最近更新时间2024.05.08 17:48:42

首次发布时间2024.04.03 17:37:04

调用MiniProGetFieldValues获取具体筛选条件的取值。

请求说明

  • 请求方式:POST
  • 请求地址:?Action=MiniProGetFieldValues&Version=2024-03-12

请求参数

ServiceName : apmplus_openapi 
Region : cn-beijing 
X-App-Ids : xxx 
Content-Type : application/json

Query

参数类型是否必选示例值描述
ActionStringMiniProGetFieldValues接口名称。当前 API 的名称为 MiniProGetFieldValues
VersionString2024-03-12接口版本。当前 API 的版本为 2024-03-12

Body

参数类型是否必选示例值描述
commonObject of Common-通用参数。
filter_conditionsObject of Filter_conditions-筛选条件,嵌套类型。
fieldStringpid筛选维度,可选值集合由GetFieldKeys方法获取。

Common

参数类型是否必选示例值描述
aidLong12345应用ID。

Filter_conditions

参数类型是否必选示例值描述

type

String

and

筛选条件类型。

  • and:children中的条件为“与”关系。
  • rule(默认):当前条件为原子条件。
fieldStringpid条件字段,可选值集合由GetFieldKeys方法获取。
opStringin条件符号,可选值有eq,neq,lt,lte,gt,gte,in,not_in,regex,not_regex。
valuesArray of String["数据探索"]条件值。
childrenArray of Filter_conditions-子参数。当type值为and时必填。children下还可以继续嵌套,与op、field、values不可以共存。

返回参数

参数类型示例值描述
dataArray of Data-返回内容。可选值集合由GetFieldValues方法获取。
error_msgString-错误信息。
error_noInteger0错误码。0为成功。

Data

参数类型示例值描述
valueString看板维度值。
countLong3上报量。

请求示例

POST ?Action=MiniProGetFieldValues&Version=2024-03-12
{
    "field": "pid",
    "common": {
        "aid": 12345
    },
    "time_filter": {
        "start_time": 1664621845,
        "end_time": 1665140253,
        "granularity": 86400
    },
    "filter_conditions": {
        "type": "and",
        "children": [
            {
                "op": "in",
                "field": "pid",
                "values": [
                    "数据探索"
                ]
            }
        ]
    }
}

返回示例

{
    "err_detail": "",
    "data": [
        {
            "value": "看板",
            "count": 3
        }
    ],
    "error_msg": "",
    "error_no": 0
}