由开发者实现,用于接受导出任务的执行状态。当分析服务导出任务完成后,通过该接口将导出的结果和文件的下载路径通过此接口返回。
开发者的应用服务器在调用“创建导出数据任务”接口后,Analytics Kit服务端异步导出数据,当分析服务导出任务完成后,通过该接口通知开发者的应用服务器导出任务的执行状态和文件下载路径,开发者需要提供接收通知的服务端接口,并根据通知及时下载已导出的数据。
开发者需要按接口定义实现服务端接口,用于接收通知消息。
开发者的应用服务器接收到通知消息后,需要在2小时内下载已经导出的数据文件。
| 承载协议 | HTTPS POST |
|---|---|
| 接口方向 | 分析服务服务器→开发者回调接口服务器 |
| 接口URL | {rootUrl}/sub/applications/{apiVersion}/purchases/get |
| 数据格式 | 请求消息:Content-Type: application/json 响应消息:Content-Type: application/json |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
request_id | 是 | string | 请求编号,由创建数据导出任务接口返回。 |
app_id | 是 | string | 用户在AppGallery Connect上的AppID。 |
status | 是 | string | 任务状态
|
file_path | 否 | string | 导出文件下载路径,该字段只有在任务状态是“EXPORTED”才会有值。 |
status_time | 否 | DateTime | 状态最后更新时间。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
result_code | 是 | String | 开发者服务端返回的处理结果状态。 |
result_msg | 是 | String | 开发者服务器处理结果的描述信息。 |
- HTTP/1.1 200 OK
- Content-Type: application/json; charset=UTF-8
- Connection: Close
- Content-Length: xxxx
- {
- "result_code":"0",
- "result_msg":"success",
- }
- POST /data/export/notifcation HTTP/1.1
- User-Agent: Jakarta Commons - HttpClient / 3.1
- Host: 10.137.165.233:8566
- Content-Type: application/json; charset=UTF-8
- Content-Length: xxxx
- Accept: application/json
- {
- "request_id": "sample-req-id",
- "app_id": "sample-appid",
- "status": "EXPORTED",
- "file_path": "https://sample.com/sample_path/"
- }