The app server calls this API to query the execution progress of the export task in Analytics Kit. If the task processing is complete, the app server needs to download data within a specified period (currently 6 hours) and provide the data for end users.
After the app server calls the API for exporting personal data, 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.
Protocol | HTTP POST |
|---|---|
Direction | Your callback API server -> Analytics Kit server |
URL | {rootUrl}/analytics/gdpr/user_data_export_tasks/v2 NOTE: For details about {rootUrl}, please refer to API Access Address. |
Data Format | Response: Content-Type: application/json |
Request header
Parameter | Mandatory | Type | Description |
|---|---|---|---|
x-product-id | Yes | String | Product ID registered in AppGallery Connect. |
x-app-id | Yes | String | App ID registered in AppGallery Connect. |
Authorization | Yes | String | Authentication information. For details, please refer to OAuth 2.0-based Authentication. NOTE: A space character must be added between Bearer and the value of access_token. |
Request body
POST /analytics/gdpr/user_data_export_tasks/v2 HTTP/1.1
Content-Type: application/json; charset=UTF-8
Content-Length: xxxx
Accept: application/json
Authorization: Bearer ***
x-product-id: sample-productid
x-app-id: sample-appid
{
"aaid":"sample-aaid"
} Assume that the status code is 200.
Response header
Parameter | Mandatory | Type | Description |
|---|---|---|---|
Content-Type | Yes | application/json | Response data format. |
Response body
Parameter | Mandatory | Type | Description |
|---|---|---|---|
result_code | Yes | String | Result code. For details, please refer to Result Codes. |
result_msg | Yes | String | Response description. |
task_list | Yes | List<UserDataExportInfo> | Task list. |
UserDataExportInfo parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
request_id | Yes | String | Request ID. |
request_time | Yes | DateTime | Request time. |
status | Yes | String | Task status. |
file_path | No | String | Path for downloading the electronic copy of data. This parameter is valid only when the task status is EXPORTED. |
status_time | No | DateTime | Time when the task status was last updated. |
Assume that the status code is 200.
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" }] }