数据集添加
请求地址
https://api.e.qq.com/v1.3/data_set/add
请求方法
POST
所属权限
数据上报(User Actions)
请求参数
| 参数名 | 描述 |
|---|---|
| access_token | 密钥信息,可在 DataNexus 的 数据源 - 【查看密钥】获取 |
| timestamp | 当前的时间戳,单位为秒,允许客户端请求最大时间误差为 300 秒。MarketingAPI 所使用的时间戳,若无特殊说明,均为秒级时间戳签名算法。MarketingAPI 所使用的时区为 GMT+8,例如当时间戳为 1494840119 时,表示 2017-05-15 17:21:59 |
| nonce | 随机字串标识,不超过 32 个字符,由调用方自行生成,需保证全局唯一性 |
请求体类型
application/json
请求体参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| account_id | integer | Y | 推广帐号 id或 DataNexus 账号 id |
| user_action_set_id | integer | Y | DataNexus数据源id |
| env_type | integer | Y | 数据集对应的环境类型,0代表测试环境,1代表正式环境 |
请求体示例
curl 'https://api.e.qq.com/v1.1/data_set/add?access_token=<ACCESS_TOKEN>×tamp=<TIMESTAMP>&nonce=<NONCE>' \
-H 'Content-Type: application/json' \
-d '{
"account_id": "<ACCOUNT_ID>",
"data_source_id": 1111111111,
"env_type": 1
}'
应答体结构
| 名称 | 类型 | 描述 |
|---|---|---|
| data_set_id | integer | 数据集 id |
应答示例
{
"code": 0,
"message": "",
"message_cn": "",
"data": {
"data_set_id": 11111
}
}