应用服务端通过该接口查询导出请求任务在分析平台的执行进展,如果平台处理完毕,应用服务器需要在指定时间内(当前是6个小时)将数据下载后提供给终端用户。
应用服务器在调用“创建导出个人数据任务”接口后,Analytics Kit服务端异步导出数据,开发者的应用服务器需要定时查询导出任务的状态,并及时下载导出数据提供给终端用户。
如果平台处理完毕,应用服务器需要在6小时内将数据下载后提供给终端用户。
调用频率不超过1条/秒。
| 承载协议 | HTTP GET |
|---|---|
| 接口方向 | 分析服务服务器→开发者回调接口服务器 |
| 接口URL | GET https://<URI>/analytics/gdpr/user_data_export_tasks/v2 |
| 数据格式 | 请求消息:Content-Type: application/json 响应消息:Content-Type: application/json |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
aaid | 是 | string | 用户设备标识,可以在端侧通过getAAID接口获取。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
result_code | 是 | String | 响应码,详见错误码。 |
result_msg | 是 | String | 响应描述。 |
task_list | 否 | TaskList | 任务列表。 |
TaskList结构
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
request_id | 是 | String | 请求ID。 |
request_time | 是 | DateTime | 请求时间。 |
status | 是 | String | 任务状态:
|
file_path | 否 | String | 电子拷贝下载路径,该字段只有在任务状态是“EXPORTED”才会有值。 |
status_time | 否 | DateTime | 状态最后更新时间。 |
- HTTP/1.1 200 OK
- Content-Type: application/json; charset=UTF-8
- Connection: Close
- Content-Length: xxxx
- {
- "result_code":"0",
- "result_msg":"success",
- "task_list":[{
- "request_id":"12345678",
- "request_time":"datetime",
- "status":"EXPORTED",
- "status_time":"datetime",
- "file_path":"https://xxx/xxx.xx"
- }]
- }
| 状态码 | 错误码 | 响应代码 | 描述 | 处理建议 |
|---|---|---|---|---|
200 | 0 | Success | 请求成功。 | - |
400 | 10020 | invalidParameter | 非法参数。 | 开发者修改填写错误的参数值。 |
400 | 10008 | tooFrequentRequest | 请求过于频繁。 | 开发者修改代码,降低查询导出任务状态的频率。 |
- GET /analytics/gdpr/user_data_export_tasks/v2?aaid=sample-aaid HTTP/1.1
- Content-Type: application/json; charset=UTF-8
- Content-Length: xxxx
- Accept: application/json
- Authorization: Bearer 78C2395236BBF4262CAE4F1172E327C2929AD63EAA0395961A49DEBC3B6F8339
- x-product-id: sample-productid
- x-app-id: sample-appid