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

GetAppPvUv

最近更新时间2023.12.26 16:39:07

首次发布时间2023.03.13 16:59:23

调用GetAppPvUv接口获取App PV和UV的数值。

使用说明

  • 接口名称:GetAppPvUv
  • 请求方式:POST
  • 接口地址:/?Action=GetAppPvUv&Version=2022-10-12

请求参数

Query

参数

类型

是否必选

示例值

描述

Action

string

GetAppPvUv

请求名称。

Version

string

2022-10-12

请求版本。

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

Body

参数

类型

是否必选

示例值

描述

start_time

i32

1677772800

开始时间。

end_time

i32

1678442865

终止时间。

filters

object of filters

-

过滤条件。

time_type

string

-

时间类型。

  • api_time:上报时间(默认)
  • event_time:发生时间

filters

参数

类型

是否必选

示例值

描述

type

string

and

筛选条件类型。

  • expression:表达式
  • map:映射
  • and:且条件
  • or:或条件

op

string

in

操作符。

  • in:包含

dimension

string

aid

条件的名称。

values

array of string

[123456]

筛选值,支持多个。

value

string

123456

筛选值。

map_key

string

key_1

map类型key,当type为map时必填。

sub_conditions

array of sub_conditions

-

子条件。

sub_conditions

参数

类型

是否必选

示例值

描述

type

string

expression

筛选条件类型。

  • expression:表达式
  • map:映射
  • and:且条件
  • or:或条件

op

string

in

操作符。

  • in:包含

dimension

string

os

条件的名称。

values

array of string

[
"Android"
]

筛选值,支持多个。

value

string

123456

筛选值。

map_key

string

key_1

map类型key,当type为map时必填。

sub_conditions

array of string

-

子条件。

返回参数

参数

类型

示例值

描述

data

object of data

-

返回数据。

error_msg

string

-

错误信息。

error_no

i32

0

错误码。

data

参数

类型

示例值

描述

pv

i32

96708

PV值。

uv

i32

2047

UV值。

请求示例

POST https://open.volcengineapi.com/?Action=GetAppPvUv&Version=2022-10-12 
{
    "start_time":1677772800,
    "end_time":1678442865,
    "filters":{
        "type":"and",
        "sub_conditions":[
            {
                "dimension":"os",
                "op":"in",
                "type":"expression",
                "values":[
                    "Android"
                ]
            }
        ]
    }
}

返回示例

正常返回示例

{
    "err_detail":"",
    "data":{
        "pv":96708,
        "uv":2047
    },
    "error_msg":"",
    "error_no":0
}

异常返回示例

{
    "ResponseMetadata": {
        "RequestId": "208060***0232280022D30",
        "Action": "GetAppPvUv",
        "Version": "2022-10-12",
        "Service": "***",
        "Region": "cn-north-1",
        "Error": {
            "Code": "200000",
            "Message": "参数异常"
        }
    }
}