The app server calls this API to query the execution progress of the export task in HUAWEI Analytics Kit. If the task processing is complete, the app server needs to download data within a specified period (currently six hours) and provide the data for end users.
After the app server calls the interface that creates a user data export task, the Analytics Kit server will asynchronously export the data. The app server needs to periodically query the export task status so that it can download the exported data for the end user in a timely manner.
If the export task is processed successfully, the app server needs to download the data within six hours and provide the data to the user.
The API can be called only once within 1s.
| Protocol | HTTP GET |
|---|---|
| Direction | HUAWEI Analytics Kit server -> Developer callback API server |
| URL | GET https://<URI>/analytics/gdpr/user_data_export_tasks/v2 |
| Data Format | Request: Content-Type: application/json Response: Content-Type: application/json |
| Parameter | Mandatory/Optional | Type | Description |
|---|---|---|---|
aaid | Mandatory | string | User device ID, which can be obtained through the getAAID interface on the device side. |
| Parameter | Type | Description |
|---|---|---|
result_code | String | Result code. For details, please refer to Result Codes. |
result_msg | String | Response description. |
task_list | TaskList | Task list. |
| Parameter | Mandatory/Optional | Type | Description |
|---|---|---|---|
request_id | Mandatory | String | Request ID. |
request_time | Mandatory | DateTime | Request time. |
status | Mandatory | String | Task status:
|
file_path | Optional | String | Download path of an electronic copy. This parameter is valid only when the task status is EXPORTED. |
status_time | Optional | DateTime | Last status update time. |
- 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"
- }]
- }
| Status Code | Result Code | Response Code | Description | Suggestion |
|---|---|---|---|---|
200 | 0 | Success | Request succeeded. | - |
400 | 10020 | invalidParameter | Invalid parameter. | Check and correct the parameter value. |
400 | 10008 | tooFrequentRequest | Data export requests are too frequent. | Display a message indicating that data export requests are excessively frequent and asking the user to try again later. |
- 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