# 获取数据拉取配置

调用本接口可以获取数据预拉取和数据周期性更新配置。使用过程中如遇到问题,可在开放平台服务商专区发帖交流。 注意:只能第三方调用

# 请求地址

POST https://api.weixin.qq.com/wxa/fetchdatasetting?access_token=TOKEN

# 请求参数说明

参数 类型 必填 说明
access_token String 第三方平台令牌 authorizer_access_token
action String 填"get"

POST 数据示例:

{
  "action": "get"
}

# 返回参数说明

参数 类型 说明
errcode Number 返回码
errmsg String 错误信息
is_pre_fetch_open bool 数据预拉取是否开启
pre_fetch_type Number 数据来源,0: 开发者服务器;1:云函数
pre_fetch_url String 数据下载地址,当pre_fetch_type=0有效
pre_env String 环境ID,当pre_fetch_type=1有效
pre_function_name String 函数名,当pre_fetch_type=1有效
is_period_fetch_open bool 数据周期性更新是否开启
period_fetch_type Number 0: 开发者服务器;1:云函数
period_fetch_url String 数据下载地址当period_fetch_type=0有效
period_env String 环境ID,当period_fetch_type=1有效
period_function_name String 函数名,当period_fetch_type=1有效

返回结果示例:

{
  "errcode": 0,
  "errmsg": "ok",
  "is_pre_fetch_open": true, 
  "pre_fetch_type": 1, 
  "pre_env": "test-pfyol", 
  "pre_function_name": "test_func",
  "is_period_fetch_open": true, 
  "period_fetch_type": 0, 
  "period_fetch_url": "https://111.qq.com"
}

# 返回码说明

返回码 说明
0 ok
9410013 无效action
40166 非小程序发起调用
其他错误码 请查看全局错误码