您的应用服务器在调用创建数据导出任务接口后,Analytics Kit服务端异步导出数据,当分析服务导出任务完成后,通过该接口通知您的应用服务器导出任务的执行状态和文件下载路径,您需要提供接收通知的服务端接口,并根据通知及时下载已导出的数据。
承载协议 | HTTPS POST |
|---|---|
接口方向 | 分析服务服务器->开发者回调接口服务器 |
接口URL | 由您提供在AGC上配置完成的URL |
数据格式 | 请求消息:Content-Type: application/json 响应消息:Content-Type: application/json |
Request Header
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
x-product-id | 是 | String | 用户在AppGallery Connect上的Product ID。 |
x-app-id | 是 | String | 用户在AppGallery Connect上的App ID。 |
Authorization | 是 | String | 请参见基于OAuth 2.0开放鉴权。 说明: Bearer后面拼接空格,再拼接获取的access_token。 |
Request Body
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
request_id | 是 | String | 请求编号,由创建数据导出任务接口返回。 |
app_id | 是 | String | 用户在AppGallery Connect上的App ID。 |
status | 是 | String | 任务状态。 |
file_path | 否 | String | 导出文件下载路径,该字段只有在任务状态是“EXPORTED”才会有值。 |
status_time | 否 | DateTime | 状态最后更新时间。 |
POST /data/export/notification 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/" }