When a user initiates a personal data export request on the app client, the app server calls this API to help the user export the electronic copy of data in HUAWEI Analytics Kit.
As required by the GDPR, you may need to allow end users to obtain an electronic copy of their personal data by providing a button on your app. When a user taps this button, your app server can call this API to export the electronic copy of personal data that has been collected and reported to the HUAWEI Analytics Kit server.
Each user can export data only once within two months.
Data that has been deleted as requested by the user cannot be exported.
The API can only be called at an interval greater than 1s.
| Protocol | HTTP POST |
|---|---|
| Direction | HUAWEI Analytics Kit server -> Developer callback API server |
| URL | POST https://<URI>/analytics/gdpr/user_data_export_requests/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. |
- HTTP/1.1 200 OK
- Content-Type: application/json; charset=UTF-8
- Connection: Close
- Content-Length: xxxx
- {
- "result_code":"0",
- "result_msg":"success"
- }
| Status Code | Result Code | Response Code | Description | Suggestion |
|---|---|---|---|---|
200 | 0 | Success | The request is received successfully. | - |
400 | 10020 | invalidParameter | Invalid parameter. | Check and correct the parameter value. |
400 | 10030 | userInstanceIdDeleted | The data cannot be exported because it has been deleted at the request of the user. | Provide a message indicating that the user data has been deleted. |
400 | 10031 | userDataExporting | The data cannot be exported because the previous data export request is within two months. | Display a message prompting the user that the interval between two consecutive data export requests must be two months at least. |
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. |
- POST /analytics/gdpr/user_data_export_requests/v2 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
- {
- "aaid":”sample-aaid”
- }